Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating list of don't cares #7

Open
wagenaartje opened this issue Apr 9, 2020 · 0 comments
Open

Generating list of don't cares #7

wagenaartje opened this issue Apr 9, 2020 · 0 comments

Comments

@wagenaartje
Copy link

wagenaartje commented Apr 9, 2020

Hi, i'm not sure if this is already possible with the library, but it would be nice to automatically generate a list of "don't cares". For example, if I have string-encoded inputs

ones = ['010', '001']
zeros = ['110', '101']

And when I simplify the expressions I get

qm.simplify_los(ones) # {'001', '010'}

However, I desire output {'0--'} based on the above data. At this moment I can achieve this by generating all states that are not inside ones or zeros, but it would be nice to have this functionality built in to the library. For example as follows

dc = qm.generate_dc_los(ones, zeros) # 
qm.simplify_los(ones, dc) # {'0--'}

Let me know if more people desire this, then I will create a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant