-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix a misused 2-qubit sample result type #135
fix a misused 2-qubit sample result type #135
Conversation
Probably orthogonal to this change, but it looks like the buggy code was originally added to fix an issue when a circuit has multiple registers: #51. Do you know if that scenario works now? |
Yes, I added a test to confirm that using multiple registers works correctly out-of-the-box. |
Summary
Measure instructions were wrongly translated. We now construct a 1-qubit sampling instruction.
Details and comments
We were translating a 1-qubit measure instruction into a 2-qubit ZZ observable sampling instruction (using the classical register index for the second qubit). This PR uses the right instruction and renames most of the variables in the function to be clearer.
Fixes #132.