Hi,
Suppose I have a MPO, how to get the trace/ partial trace of it?
For the trace part, I tried
n = 10
s = siteinds("Qubit",n)
A = randomMPO(s)
A_trace = tr(A)
Or
n = 10
s = siteinds("Qubit",n)
A = randomMPO(s)
i = MPO(s,"Id")
A_trace=inner(A,i)
These seem to work and give me very close result. But when I tried
n = 10
s = siteinds("Qubit",n)
A = randomMPO(s)
for i = 1:n
A *= delta(s[i],s[i]')
end
like the MPS case, I failed.
Also, for the partial trace part, I tried
n = 10
j = 6
s = siteinds("Qubit",n)
A = randomMPO(s)
for i = j:n
A *= delta(s[i],s[i]')
end
I also failed. Then what is the correct way to get the partial trace?
Thanks