I am working with sympy.physics.quantum.qubit
to help teach myself more about quantum computing.
I'm confused about how best to simplify two ket expressions that appear to me to be identical. Seems to me that B
and C
below should be the same:
B = Qubit('01')
C = TensorProduct(Qubit('0'),Qubit('1'))
because their representation is identical, i.e.
B.represent() == C.represent() #returns True
it feels like they are the same qubit state. So far, so good.
But now when I print out B
and C
I get:
print("B is", B)
B is |01>
but
print("C is", C)
C is |0>x|1>
My question:
Is there some way I could get the Python library to use the output of B
and C
so that the equivalence between the two would be obvious? Basically, how do I get C
to simplify it's output so that it exactly resembles B
?
Am grateful for any help you could provide.