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

Gates should output X (never Z) when inputs are invalid #393

Merged
merged 7 commits into from
Sep 22, 2023

Conversation

dmetis
Copy link
Contributor

@dmetis dmetis commented Jul 20, 2023

Description & Motivation

Some gates (e.g. the Mux) will potentially output a Z if the input (e.g. the control) is a Z instead of outputting an X. We should fix the Mux and also search for any other gates or built-in modules that may be outputting a Z instead of an X when inputs are invalid.

Related Issue(s)

fix #235

Testing

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

@mkorbel1
Copy link
Contributor

Fixed bad tests here: #397

@mkorbel1
Copy link
Contributor

If you pull from main those tests should be fixed now

lib/src/modules/conditional.dart Show resolved Hide resolved
lib/src/modules/conditional.dart Show resolved Hide resolved
Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mkorbel1 mkorbel1 merged commit 10b62d1 into intel:main Sep 22, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

Gates should output X (never Z) when inputs are invalid
2 participants