-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Giving inconsistent measurement key qubits gives unequal repr #4273
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
Comments
@smitsanghavi can you take a look at this? Related: #4040 |
I'll also note that forcing the key to change as part of putting it into a measurement is not ideal because it means certain circuit rewrites become impossible. What if I want to rewrite the circuit in a way that moves the measurement to other qubits, but I want to preserve the key for compatibility with the original circuit? |
Given that @smitsanghavi is currently out of office and it may take some time to come to a good solution on this, I recommend we revert the latest PR in the |
I agree this is an issue. I think it stems from the fact that in direct construction of I'll take a closer look at this (and possibly reevaluate the requirements) when I am back but reverting sounds perfect meanwhile. |
#4277 fixes this by reverting the addition of the |
Ran into this:
It took me an hour to debug that it was the repr lying to me. Very frustrating. Either the repr needs to correctly represent the mkey qubits differing from the operation qubits, or the creation of the object needs to fail.
I'm also worried about the fact that we apparently introduced a whole new way for things to be inconsistent, by allowing the measurement key to mention qubits.
It looks like the issue is that
MeasurementGate.on
rekeys the measurement key to target certain qubits, but that's not the only way to apply a measurement gate to qubits, so the rekeying is inconsistent between various code paths.The text was updated successfully, but these errors were encountered: