Restrict an operator to a subspace

336 views
Skip to first unread message

Lucas Verney

unread,
Feb 16, 2016, 4:15:43 PM2/16/16
to QuTiP: Quantum Toolbox in Python
Hi,

Is there an easy way to restrict an operator to a certain subspace?

For instance, when dealing with creation / annihilation operators, we
have to take a hilbert space larger than the actual system hilbert
space, to prevent numerical errors due to the truncation of the hilbert
space. Then, it can be useful to compare some operator matrices and we
would like to compare only on the relevant states (for instance compute
the norm of the difference of two operators, only in the relevant
subpart of the Hilbert space).

I came up with a basic solution by taking manually the relevant matrix
elements, but it is not really scalable nor easy to deal with when using
tensor states and so on. Then, I was wondering if there were some
built-in functions to do it? (I could not find any in the docs).

Thanks!



signature.asc

Andrew Dawes

unread,
Feb 16, 2016, 9:53:37 PM2/16/16
to qu...@googlegroups.com
Can you just make a tensor operator that acts on the space you want and is identity for the rest of the space?

I can see how that gets tedious to track within larger tensor spaces but the concept should work.


Sent from my phone using voice-recognition software and/or clumsy thumbs, please forgive any typos.
> --
> You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andrew M.C. Dawes

unread,
Feb 16, 2016, 10:19:39 PM2/16/16
to qu...@googlegroups.com
Scratch that, I see now why this isn’t what you wanted. I think I’ve done what you are asking, I’ll look back through my notebooks.
Andy

Henry Maguire

unread,
Mar 4, 2016, 3:49:47 PM3/4/16
to QuTiP: Quantum Toolbox in Python, lu...@verney.lv
Hey guys, did you get anywhere with this?
I would like to create a hamiltonian for two coupled cubits in the single-excitation subspace. This means that from the full space of  |gg>, |eg>, |ge> and |ee>, I want to ignore of |ee> so it's an effective three-level system. I have just defined all of the operators manually in the three-level space but I thought there might be something in-built into qutip to choose a subspace.
Let me know.
Cheers,
Henry

jrjoh...@gmail.com

unread,
Mar 4, 2016, 8:10:03 PM3/4/16
to qutip group, lu...@verney.lv
Hi Henry

You can have a look at the extract_states and eliminate_states methods of the Qobj class


and also the state_number_enumerate function (https://github.com/qutip/qutip/blob/master/qutip/states.py#L695, see also the enr_XXX functions in the same module), which let's your generate states with restricted excitation numbers, which you can use to construct operators as well. 

Rob

jrjoh...@gmail.com

unread,
Mar 4, 2016, 8:21:44 PM3/4/16
to qutip group, lu...@verney.lv
and I forgot to mention that there are enr_XXX function for operators in qutip.operators as well:


Rob
Reply all
Reply to author
Forward
0 new messages