Skip to content

Commit ccd2530

Browse files
committed
Tighten atol to simulate insufficient precision
1 parent c5f6a10 commit ccd2530

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cirq-core/cirq/linalg/transformations_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,19 +391,19 @@ def test_sub_state_vector() -> None:
391391

392392
# Reject factoring for very tight tolerance.
393393
assert (
394-
cirq.sub_state_vector(state, [0, 1], default=_DEFAULT_ARRAY, atol=1e-16) is _DEFAULT_ARRAY
394+
cirq.sub_state_vector(state, [0, 1], default=_DEFAULT_ARRAY, atol=0) is _DEFAULT_ARRAY
395395
)
396396
assert (
397-
cirq.sub_state_vector(state, [2, 3, 4], default=_DEFAULT_ARRAY, atol=1e-16)
397+
cirq.sub_state_vector(state, [2, 3, 4], default=_DEFAULT_ARRAY, atol=0)
398398
is _DEFAULT_ARRAY
399399
)
400400
assert (
401-
cirq.sub_state_vector(state, [5, 6, 7, 8], default=_DEFAULT_ARRAY, atol=1e-16)
401+
cirq.sub_state_vector(state, [5, 6, 7, 8], default=_DEFAULT_ARRAY, atol=0)
402402
is _DEFAULT_ARRAY
403403
)
404404

405405
# Ensure None can be passed as the `default` argument
406-
assert cirq.sub_state_vector(state, [0, 1], default=None, atol=1e-16) is None
406+
assert cirq.sub_state_vector(state, [0, 1], default=None, atol=0) is None
407407

408408
# Permit invalid factoring for loose tolerance.
409409
for q1 in range(9):

0 commit comments

Comments
 (0)