MPS quantum circuit simulation with non-local / long-range gates, best strategies?

Hello!

I think there is quite the demand for simulating quantum circuits with tensor network methods to go beyond the ~30 qubit threshold of modern HPC full state vector simulators. I am aware of PastaQ that builds on top of iTensor.

I am interested in the best known strategies for applying non-local gates, such as CNOT(1, 10) on an MPS representation. In particular, is there something more clever beyond swapping and unswapping?

I tried looking into the PastaQ implementation, and found an old PR that seems to be doing that, though that code seems outdated. I couldnt figure out from the source what is currently being done in the case of non-local/long-range gates, so consider this a bonus question in case anyone knows more about this particular library.

The main part of this topic is really just figuring out what the best known methods are, if proposals like 1407.1832v1 ever set foot or if there are others that did. I’m fairly familiar with MPS, DMRG etc. but would really appreciate an expert opinion that is more up-to-date.

Thank you,
Kind regards,
Korbinian

Hi Korbinian,
Good question: yes, compared to swapping/unswapping a nice way to implement non-local gates is to turn them into an MPO. All two-qubit gates have at most a rank of 4 when you SVD them apart, meaning splitting the two legs of the tensor acting on qubit “A” from the other two legs involving qubit “B”.

This result means all two-qubit gates can be written as an MPO of bond dimension at most 4. Internally, you can kind of think of the MPO as doing swapping, but the advantage is that one can use algorithms that apply MPO to MPS which scale rigorously polynomially in the bond dimensions of the MPS and MPO, and linearly in the length of the MPO. In contrast, using a sequence of pairwise swaps can sometimes increase the bond dimension of the MPS quite a bit and push up costs.

1 Like

Hi Miles, thanks so much for this extraordinarily quick and super helpful answer!

Thats great, so I can do something in the lines of the following for a 2-qubit gate, right?

(had to split the answer in two because I am new user, sorry)

For sites further apart I would in general have to work my way through the tensor from the first to the last site (here an example for 3 sites)

I reckon there must be something more clever for genuine 2-qubit gates? Like some fixed form where I place the Q and R tensors of the two-site decomposition at fixed positions of the MPO? But what is that fixed form? I am doubting it is just identities in between the sites?

For this and in general this procedure, are you aware of any literature and/or implementations of this?

Actually seems to be working with identities in between :ok_hand:

Glad you got it working! I was going to upload a diagram but I’m a little rushed this week. There are a few ways one could design such an MPO: basically one way is to imagine taking a two-site gate with four wires coming out, then bending two of the wires and running them “through” the MPO so that the virtual dimension of 4 is really a 2x2 of these two wires running through. For the sites where the wires just pass through another identity operator in the vertical direction is producted on. Then for the other site where the wires finally come out they bend back into the vertical direction.

Here’s sort of a drawing – hope you see the idea. Is it similar to what you did?

|__ _|_  _|_ ,,,,,,,|
___ ___  ___ |,,,,,,|
|    |    |         |

Aha curious! This is what I understand from the description, is that about right?

I am actually just doing this: Taking the 2-site decomposition, place it on the outer sites, and fill the rest with identities (as in \delta_{i i'} \delta_{a_i a_{i+1}} over the virtual and physical indices, respectively). Note that the multi-site operator is implicitly assumed to only act non-trivially on the outer sites.
image

Great, yes your understanding of the method I outlined is right, and thanks for the nice drawing!

I think your way is better, though. Especially if one used the SVD instead of QR, there might be cases where the operator has a lower rank than 4, and that could be used to get an even smaller MPO bond dimension. But sticking with QR and bond dimension 4 is also totally fine for many practical purposes.

1 Like