Skip to content

Commit 9c55a61

Browse files
removed try/except clause
1 parent 4889170 commit 9c55a61

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cirq-core/cirq/ops/linear_combinations_test.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1136,11 +1136,8 @@ def test_paulisum_validation():
11361136
ld = cirq.LinearDict({key: 2.0})
11371137
assert cirq.PauliSum(ld) == cirq.PauliSum.from_pauli_strings([2 * cirq.X(q[0])])
11381138

1139-
try:
1140-
ps = cirq.PauliSum()
1141-
ps += cirq.I(cirq.LineQubit(0))
1142-
except:
1143-
raise Exception("Failed to add identity to PauliSum.")
1139+
ps = cirq.PauliSum()
1140+
ps += cirq.I(cirq.LineQubit(0))
11441141
assert ps == cirq.PauliSum(cirq.LinearDict({frozenset(): complex(1)}))
11451142

11461143

0 commit comments

Comments
 (0)