Commit 4343ef3
authored
Fix Linear dict scalar division test (#7361)
This PR fixes a failing test in `LinearDict` by using `cirq.approx_eq`
for floating-point comparisons. The test was failing due to precision
issues when comparing complex numbers in Python 3.11.
The failing test case was:
(-10.0 - 15.0*I, {'X': 2}, {'X':
(-0.061538461538461535+0.0923076923076923j)})
Using `cirq.approx_eq` ensures that small floating-point differences are
ignored, making the test more robust while maintaining the same
functionality.1 parent 9c376c4 commit 4343ef3
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
| 396 | + | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| |||
0 commit comments