ITensor for Open quantum systems

Hi, I am new of ITensor and its C++ version. I have seen that the package is complete and efficient for the study of closed quantum systems with DMRG and MPS. Anyway, I didn’t seen anything about open quantum systems.

Are available sample codes for the study of open quantum systems using ITensor with techniques like the vectorization of the density matrix or quantum trajectories? I tried to write a simple code to simulate quantum trajectories, but I’m not sure that it is correct and it is efficient, due to the fact that I am a neophyte of ITensor and c++.

Thus, the possibility of having quantum trajectories ITensor sample codes (or sample codes with more complex methodologies like vectorization of the density matrix) can be very useful.

Kind regards,
Francesco

3 Likes

Hi Francesco,
The short answer to your question is that ITensor does not have so much functionality directly designed for doing open systems, however also ITensor is more of a general library and less of a set of “black box” codes, so we intend it mainly for people to use to write custom codes as you are doing.

That being said, you may find that the Julia version of ITensor has some functionality that could help you a lot with open systems, especially more facilities than the C++ version for dealing with matrix product operators (MPOs) representing density matrices. We have functions for things like tracing MPOs, multiplying MPOs together, and applying gates (such as Trotter gates) to MPOs.

Is there a specific reason you were trying the C++ version instead?

Best regards,
Miles

Dear Miles,

Thank you for the answer. There is not a precise reason why I’m working with c++, if the Julia version can be helpful I can switch to Julia. The problem is that, as I know, in order to simulate the dynamics of the system, it is needed to pass from a vectorization of the density matrix MPO, and I don’t know how to do this using ITensor.

Kind regards,
Francesco Perciavalle

Hi Francesco,
Yes please use the Julia version if you don’t have a strong preference because it has many more features that will help you.

Could you say more about what you mean by the “vectorization of the density matrix MPO”? Do you mean the idea of taking an MPO and then reinterpreting it as an MPS?

Dear Miles,

Yes, the idea is to see the density Matrix MPO as an MPS with two site legs per site; in this way for instance an MPO with d local dimension can be seen as an MPS with d^2 local dimension. Thus, my answer in brief is if in Itensor there is a function that permits to extract from an MPO with d local dimension its MPS representation with d^2 local dimension. In few words, if It Is possibile, given an MPO with one up leg and One down leg per site, to extract an MPS with two down legs per site (the up leg of the MPO becomes the other down leg of the new MPS).

I apologize if the answer is a bit confused,

kind regards,
Francesco Perciavalle

In the Julia version, you can convert between MPS and MPO:

using ITensors
s = siteinds("S=1/2", 3)
ψ = randomMPS(s)
ρ = outer(ψ', ψ)
ρ_vec = convert(MPS, ρ)

You may also just directly be able to use an MPO, depending on what you are trying to do and what algorithms you are implementing. In many ways, MPS and MPO in ITensors.jl act the same way.

1 Like

Yes Matt’s answer above should hopefully answer your question (just calling the convert function).

To elaborate on Matt’s second point, this “mapping” between an MPO and MPS is in many cases just a matter of perspective. For example, if the purpose of vectorizing the MPO into an MPS is say to apply gates to a subset of the MPS indices, then it might be just as easy to apply those gates while leaving the state in the MPO form. So depending on what you want to do, you might be better off just working with the MPO directly, and we have many tools for working with MPOs as Matt said.

Ok thank you. But it is not trivial for me how to apply the gates of the Lindbladian operator to the new vectorized state. For instance, how to apply an operator like Id_{j,j+1} \otimes H_{j,j+1}. Differently from the closed quantum system case in which I have only one spatial index, now I have two. I don’t know what is the correct way in which I can write the gate Id_{j,j+1} \otimes H_{j,j+1} that acts correctly on \rho_vec.