Skip to content

Commit 7978a27

Browse files
codrut3pavoljuhas
andauthored
Fix test assertion in raw_types_test.py. (#7401)
This fixes a small issue that I found while working on #7291 TaggedOperation `_decompose_` calls `protocols.decompose_once` (see [here](https://github.com/quantumlib/Cirq/blob/e27d883d20d4acea97bd96d795170ae984b3dba9/cirq-core/cirq/ops/raw_types.py#L837)). So it must be compared against `cirq.decompose_once`. --------- Co-authored-by: Pavol Juhas <juhas@google.com>
1 parent 4c9b173 commit 7978a27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cirq-core/cirq/ops/raw_types_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ def test_tagged_operation_forwards_protocols() -> None:
653653
np.testing.assert_equal(cirq.unitary(tagged_h), cirq.unitary(h))
654654
assert cirq.has_unitary(tagged_h)
655655
assert cirq.decompose(tagged_h) == cirq.decompose(h)
656-
assert [*tagged_h._decompose_()] == cirq.decompose(h)
656+
assert [*tagged_h._decompose_()] == cirq.decompose_once(h)
657657
assert cirq.pauli_expansion(tagged_h) == cirq.pauli_expansion(h)
658658
assert cirq.equal_up_to_global_phase(h, tagged_h)
659659
assert np.isclose(cirq.kraus(h), cirq.kraus(tagged_h)).all()

0 commit comments

Comments
 (0)