Commit bfba965
authored
Avoid DivisionByZero error when TensorNetwork simplifies to a scalar (#6586)
Problem: Python 3.12 requires quimb-1.8.0, but quimb-1.8.0 cannot
evaluate path-info for TensorNetwork consisting of a scalar Tensor.
Solution: Skip path-info evaluation for scalar TensorNetwork.
Path-info is used for RAM estimation only which is not a problem
for scalar TensorNetwork-s.
This fixes unit test failure for
cirq-core/cirq/contrib/quimb/grid_circuits_test.py::test_tensor_expectation_value
Ref: jcmgray/quimb#2311 parent 69e3de1 commit bfba965
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| |||
0 commit comments