Tensor product of large number of particles

124 views
Skip to first unread message

Farhad TQ

unread,
Apr 17, 2019, 3:22:50 AM4/17/19
to QuTiP: Quantum Toolbox in Python
HI guys

I want write down the state and Hamiltonian for a large number (say 1000) of spins. In QuTiP, in the naive way, I should write 1000 operators, each of which contains the tensor product of 1000 spins. This is quite cumbersome. Is there a concise way to do that? Maybe using a for loop or so?

Best
Farhad

Rose

unread,
May 5, 2022, 2:26:27 PM5/5/22
to QuTiP: Quantum Toolbox in Python
Hello Guys

I also need help with a similar situation as above. I want to design an n-fold tensor product for the Tranverse-field Ising Hamiltonian.  However, I keep getting a  quantum dimension error when I use a for-loop. Anyone who can help, please do.

Regards
Rose

Simon Cross

unread,
May 12, 2022, 7:04:11 AM5/12/22
to qu...@googlegroups.com
Hi Farhad and Rose,

You can look at the example in
https://nbviewer.ipython.org/github/qutip/qutip-notebooks/blob/master/examples/spin-chain.ipynb
(linked to from the tutorial page, https://qutip.org/tutorials.html).
Cell 5 shows the construction of the spin chain hamiltonian and cell 6
shows the construction of the initial state.

It is a bit involved. Perhaps it would be nice to have a function in
QuTiP that will build a spin chain Hamiltonian.

The qutip.piqs package has spin_algebra --
https://qutip.org/docs/latest/apidoc/functions.html?highlight=spin_algebra#qutip.piqs.spin_algebra
-- which might help make things easier, but I recommend understanding
how to do it the hard way first.

Regards,
Simon

Rose

unread,
May 16, 2022, 5:05:15 AM5/16/22
to QuTiP: Quantum Toolbox in Python
Hello Farhad

This was helpful. Thank you.

Kind regards
Rose

Reply all
Reply to author
Forward
0 new messages