Ejemplo n.º 1
0
 def test_raises(self):
     p = qu.rand_ket(2) & qu.rand_ket(3)
     with raises(ValueError):
         qu.infer_size(p, base=2)
Ejemplo n.º 2
0
 def test_infer_size(self, d, base, n):
     p = qu.rand_ket(d)
     assert qu.infer_size(p, base) == n