def test_reshuffle(self): U1 = rand_unitary(2) U2 = rand_unitary(3) U3 = rand_unitary(4) U = tensor(U1, U2, U3) S = to_super(U) S_col = reshuffle(S) assert_equal(S_col.dims[0], [[2, 2], [3, 3], [4, 4]]) assert_(reshuffle(S_col) == S)
def reshuffle(self): return TensorQobj(qt.reshuffle(self))