Skip to content

Commit 8f6fedf

Browse files
committed
add unit test
1 parent 529f2c9 commit 8f6fedf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

glue/cirq/stimcirq/_stim_to_cirq_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,3 +763,19 @@ def test_id_error_round_trip():
763763
cirq_circuit = stimcirq.stim_circuit_to_cirq_circuit(stim_circuit)
764764
restored_circuit = stimcirq.cirq_circuit_to_stim_circuit(cirq_circuit)
765765
assert restored_circuit == stim_circuit
766+
767+
def test_round_trip_with_pauli_obs():
768+
stim_circuit = stim.Circuit("""
769+
QUBIT_COORDS(5, 5) 0
770+
R 0
771+
OBSERVABLE_INCLUDE(0) X0
772+
TICK
773+
H 0
774+
TICK
775+
M 0
776+
OBSERVABLE_INCLUDE(0) rec[-1]
777+
TICK
778+
""")
779+
cirq_circuit = stimcirq.stim_circuit_to_cirq_circuit(stim_circuit)
780+
restored_circuit = stimcirq.cirq_circuit_to_stim_circuit(cirq_circuit)
781+
assert restored_circuit == stim_circuit

0 commit comments

Comments
 (0)