Add a function that makes it easier to convert back and forth between the standard ITensor MPO priming convention and the tag convention for Choi matrices. For example:
function choitags(U::Union{MPS, MPO})
U = copy(U)
haschoitags(U) && return U
U = addtags(siteinds, U, "Input"; plev = 0)
U = addtags(siteinds, U, "Output"; plev = 1)
return noprime(U)
end
function mpotags(U::Union{MPS, MPO})
U = copy(U)
hasmpotags(U) && return U
U = prime(U; tags="Output")
U = removetags(U, "Input")
U = removetags(U, "Output")
return U
end
Then, a Choi LPDO can be made from a unitary MPO with:
choi = LPDO(convert(MPS, choitags(U)))
and a unitary MPO can be made from a Choi LPDO with:
Add a function that makes it easier to convert back and forth between the standard ITensor MPO priming convention and the tag convention for Choi matrices. For example:
Then, a Choi LPDO can be made from a unitary MPO with:
and a unitary MPO can be made from a Choi LPDO with:
These could be wrapped in functions like: