(self, a, q, r)
| 55 | self.assertTrue(np.all(self.AdjustedNorm(x - y) < 2400.0)) |
| 56 | |
| 57 | def CheckApproximation(self, a, q, r): |
| 58 | # Tests that a ~= q*r. |
| 59 | precision = self.AdjustedNorm(a - np.matmul(q, r)) |
| 60 | self.assertTrue(np.all(precision < 3200.0)) |
| 61 | |
| 62 | def CheckUnitary(self, x): |
| 63 | # Tests that x[...,:,:]^H * x[...,:,:] is close to the identity. |
no test coverage detected