You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to sample from a 14 qubit circuit and I am getting a weird bitstring Array([0.5, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], dtype=float32).
You can download faulty_circuit.picklehere (sorry for the very unsafe way of sharing this object, I am using custom gates and I don't want to paste the whole code here because it's quite bulky).
Error Output
There is no error, but clearly the outcome is wrong.
Does the same code work correctly for a plain circuit?
It would be better that the problem could be reduced to a minimal circuit with potential faulty gates, otherwise, I have to dig out which gate is problematic from c.to_qir() of the shared object anyway.
Hi @refraction-ray, what do you mean by a plain circuit? As per the potential faulty gate, the circuit takes the form of a cascade of two-qubit gates. This means, the circuit is a gate defined on qubits 0 and 1, then another one on qubits 1 and 2, and so on. Just one layer of this pattern. There is no gate defined on the last qubit and qubit 0. So, since the first bit in this sampling procedure gives 0.5 instead of 0 or 1, I would assume that it is the very first gate the faulty one.
It seems that the exact code works well for a "plain circuit". So there must be something special in the definition of the faulty circuit in your case, could you pin down the source of the error by providing me a python code that generates the minimal faulty circuit?
Oh, so, the thing is that this is a completely random thing (I just happened to hit the error for this particular random key). I think that whatever is wrong with the circuit could be deduced from the first gate of the circuit I shared, which should be a custom two-qubit SU4 gate
Issue Description
I am trying to sample from a 14 qubit circuit and I am getting a weird bitstring
Array([0.5, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan], dtype=float32)
.How to Reproduce
You can download
faulty_circuit.pickle
here (sorry for the very unsafe way of sharing this object, I am using custom gates and I don't want to paste the whole code here because it's quite bulky).Error Output
There is no error, but clearly the outcome is wrong.
Environment Context
The text was updated successfully, but these errors were encountered: