File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 24
24
from copy import copy
25
25
from itertools import product
26
26
27
+ import filter_functions as ff
27
28
import numpy as np
28
29
import pytest
29
- from sparse import COO
30
-
31
- import filter_functions as ff
32
30
from filter_functions import util
31
+ from scipy import stats , linalg
32
+ from sparse import COO
33
33
from tests import testutil
34
34
from tests .testutil import rng
35
35
@@ -152,9 +152,15 @@ def test_basis_properties(self):
152
152
153
153
base ._print_checks ()
154
154
155
- basis = util .paulis [1 ].view (ff .Basis )
156
- self .assertTrue (basis .isorthonorm )
157
- self .assertArrayEqual (basis .T , basis .view (np .ndarray ).T )
155
+ orthonorm = stats .ortho_group (d ).rvs ()
156
+ self .assertTrue (orthonorm .view (ff .Basis ).isorthonorm )
157
+
158
+ herm = 1j * linalg .logm (stats .unitary_group (d ).rvs ())
159
+ self .assertTrue (herm .view (ff .Basis ).isherm )
160
+
161
+ traceless = stats .multivariate_normal ().rvs ((d , d ))
162
+ traceless -= traceless .trace () / d
163
+ self .assertTrue (traceless .view (ff .Basis ).istraceless )
158
164
159
165
def test_transpose (self ):
160
166
arr = rng .normal (size = (2 , 3 , 3 ))
You can’t perform that action at this time.
0 commit comments