Create operator in a combined Hilbert space that only acts on a single component

35 views
Skip to first unread message

Daniel Duggan

unread,
Aug 11, 2021, 1:03:40 PM8/11/21
to QuTiP: Quantum Toolbox in Python
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

Daniel Duggan

unread,
Aug 11, 2021, 3:25:40 PM8/11/21
to QuTiP: Quantum Toolbox in Python
Correction:

Daniel Duggan

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(0)), (qu.eye(1))

Just to clarify, I am trying implement a loss model using a beam splitter for a quantum optics experiment.


Reply all
Reply to author
Forward
0 new messages