Skip to content

Commit 46ab275

Browse files
committed
Actually do that
1 parent ca46833 commit 46ab275

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_basis.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,22 @@ def test_basis_properties(self):
152152

153153
base._print_checks()
154154

155-
orthonorm = stats.ortho_group(d).rvs()
155+
# single element always considered orthonormal
156+
orthonorm = rng.normal(size=(d, d))
156157
self.assertTrue(orthonorm.view(ff.Basis).isorthonorm)
157158

158-
herm = 1j * linalg.logm(stats.unitary_group(d).rvs())
159+
herm = testutil.rand_herm(d).squeeze()
159160
self.assertTrue(herm.view(ff.Basis).isherm)
160161

161-
traceless = stats.multivariate_normal().rvs((d, d))
162-
traceless -= traceless.trace() / d
162+
herm[0, 1] += 1
163+
self.assertFalse(herm.view(ff.Basis).isherm)
164+
165+
traceless = testutil.rand_herm_traceless(d).squeeze()
163166
self.assertTrue(traceless.view(ff.Basis).istraceless)
164167

168+
traceless[0, 0] += 1
169+
self.assertFalse(traceless.view(ff.Basis).istraceless)
170+
165171
def test_transpose(self):
166172
arr = rng.normal(size=(2, 3, 3))
167173
b = arr.view(ff.Basis)

0 commit comments

Comments
 (0)