Implementing quantum channel for MPO with Kraus operators

Hello,

I have a Kraus operator ITensor, and I would like to apply it to a density MPO to implement a quantum channel:

\sum_i K_i \rho K_i^\dagger

As an example, let’s take \rho to be a 4 qubit MPO:

MPO
[1] ((dim=2|id=910|"Qubit,Site,n=1"), (dim=2|id=910|"Qubit,Site,n=1")', (dim=4|id=585|"Link,l=1"))
[2] ((dim=2|id=316|"Qubit,Site,n=2"), (dim=2|id=316|"Qubit,Site,n=2")', (dim=16|id=948|"Link,l=2"), (dim=4|id=585|"Link,l=1"))
[3] ((dim=2|id=195|"Qubit,Site,n=3"), (dim=2|id=195|"Qubit,Site,n=3")', (dim=4|id=23|"Link,l=3"), (dim=16|id=948|"Link,l=2"))
[4] ((dim=2|id=604|"Qubit,Site,n=4"), (dim=2|id=604|"Qubit,Site,n=4")', (dim=4|id=23|"Link,l=3"))

My Kraus operator applies to sites 2 and 3, and is therefore a 5-index ITensor: two indices for sites 2 and 3, two primed indices for sites 2 and 3, and one index for the virtual Kraus index. Here is an example:

ITensor ord=5 (dim=2|id=316|"Qubit,Site,n=2")' (dim=2|id=195|"Qubit,Site,n=3")' (dim=2|id=316|"Qubit,Site,n=2") (dim=2|id=195|"Qubit,Site,n=3") (dim=4|id=791|"Kraus")
NDTensors.Dense{ComplexF64, Vector{ComplexF64}}

To implement the channel, I initially tried apply(K, rho, apply_dag=true). This ran with no errors, but outputted a MPO with to indices taged as Link,n=1:

MPO
[1] ((dim=2|id=910|"Qubit,Site,n=1"), (dim=2|id=910|"Qubit,Site,n=1")', (dim=4|id=675|"Link,l=1"))
[2] ((dim=2|id=316|"Qubit,Site,n=2")', (dim=4|id=675|"Link,l=1"), (dim=2|id=316|"Qubit,Site,n=2"), (dim=16|id=50|"Link,n=1"))
[3] ((dim=16|id=50|"Link,n=1"), (dim=2|id=195|"Qubit,Site,n=3")', (dim=4|id=23|"Link,l=3"), (dim=2|id=195|"Qubit,Site,n=3"))
[4] ((dim=2|id=604|"Qubit,Site,n=4"), (dim=2|id=604|"Qubit,Site,n=4")', (dim=4|id=23|"Link,l=3"))

I subsequently get errors when running other functions on this MPO. Did I make a mistake here, or is there an alternative way to compute the quantum channel?

Thank you!
Roman

The MPO you print that is the result of applying the Kraus operator looks ok to me, each tensor has two site indices and then link indices connecting to neighboring tensors. The tags don’t matter much in this case, you should focus more on the Index id.