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