-
Notifications
You must be signed in to change notification settings - Fork 13
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
QIR submission generating incorrect results #550
Comments
This seems to be a problem with the QIR compiler or simulator at the other end. Here is a minimal test case: from pytket.circuit import Bit, Circuit, Qubit
from pytket.extensions.quantinuum import Language, QuantinuumBackend
c = Circuit(2)
c.add_c_register("a", 1)
c.add_c_register("b", 1)
c.PhasedX(0.5, 0.5, 1)
c.Measure(Qubit(0), Bit("a", 0))
c.Measure(Qubit(1), Bit("b", 0))
b = QuantinuumBackend("H1-1E")
h = b.process_circuit(c, n_shots=100, language=Language.QIR)
r = b.get_result(h)
print(r.get_counts()) Unexpectedly we get a 50-50 split between (0,0) and (1,1) results. The QIR we generate for this looks correct:
However, the results returned do not:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This circuit is designed to detect for leakage errors on
Qubit(0)
, writing1
toleakage_detection_bit
if leakage has occurred:Running on "H1-1E", we expect little leakage. Submitting with
Language.QASM
has the expected behaviour, showing no/very few leaked results, while submitting withLanguage.QIR
returns ~half leaked result, incorrect behaviour. We can see how much leakage has occurred by counting the number of shots that hasleakage_detection_bit = 1
.The text was updated successfully, but these errors were encountered: