Skip to content

Commit 03cd75a

Browse files
committed
Fix test assert
1 parent fbf3826 commit 03cd75a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/cirq_utils/test_parallelize.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def test_measurement_and_reset():
5555

5656
print(parallelized_circuit)
5757

58-
assert len(parallelized_circuit.moments) == 11
58+
# NOTE: depending on hardware, cirq produces differing, but unitary equivalent
59+
# native circuits; in some cases, there is a PhZX gate with a negative phase
60+
# which cannot be combined with others in the parallelization leading to a longer circuit
61+
assert len(parallelized_circuit.moments) in (11, 13)
5962

6063
# this circuit should deterministically return all qubits to |0>
6164
# let's check:

0 commit comments

Comments
 (0)