Open jiannanWang opened 7 months ago
csynque meeting - this looks like a bug, but we need to check if qasm has support for global shift controlled by qubit.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days
Issue closed due to inactivity.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days
Issue closed due to inactivity.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days
Description of the issue Below is a circuit containing two gates: a XPowGate and a YYPowGate with global_shift=1.0. After saving the circuit to the QASM string and loading it back as a new circuit, the new circuit has different results from the original circuit. Noticed that the new circuit evaluates to '5', while the original circuit evaluates to '7'.
I further compared the circuit's result state vector with atol=1e-3. It shows that the two circuits have different result state vectors.
How to reproduce the issue
Cirq version You can get the cirq version by printing
cirq.__version__
. From the command line:Additional investigation Similar inconsistent results can also be found on a circuit with a XXPowGate with global_shift=1.0. The original circuit evaluates to '7' while the new circuit evaluates to '5'.
Reproduction code:
logs: