Hi
I am trying to create an operator that acts on only one component of a Hilbert space, using the following code:
T = 0.5
B = np.array([[T, np.sqrt(1-T)], [-np.sqrt(1-T), T]])
B_quant = qu.Qobj(B, type='oper-ket', isherm=True, isunitary=True)
B_quant
#qu.isherm(B_quant)
#i = qu.identity(N)
c = qu.tensor(B_quant(1)), (qu.eye(1))
However I get the following error:
794 """
795 if not isinstance(other, Qobj):
-->
796 raise TypeError("Only defined for quantum objects.")
797
798 if self.type == "super":
TypeError: Only defined for quantum objects.
I am unsure as to why as when I B_quant has been made a quantum object and an operator. Any help is appreciated!
Thanks