How to set the bond dimension of a MPO

Hi

I am doing some time evolution simulation with a MPO as my density operator (mixed state). I find that when the system size grows, the memory usage is a big problem. I think this may be solved by limiting my bond dimension. I know for a MPS we can set the maximal bond dimension. But how to do this for a MPO?

Thank you

Typically the truncation can be done in the same way as for MPS by passing the maxdim or cutoff arguments to a function like apply. What method are you using to time evolve the MPO?

Hi Miles:

Sorry for the delay. I basically consider three kind of things within each time slice.

  1. I act a two-body random unitary matrix on two neighboring sites.
gate = [("haar2",s1,s2)]
rho = apply(ops(gate,s),rho;apply_dag = true)
  1. I act a single qubit quantum channel on each qubit with my self defined operators.
g1 = [("K0",k,(gamma=gamma,))]
g2 = [("K1",k,(gamma=gamma,))]
rho = apply(ops(g1,s),rho;apply_dag = true)+apply(ops(g2,s),rho;apply_dag = true)
  1. I also have some random measurements, for instance
Pup = 0.5*(op("Id",s[t])+op("Z",s[t]))
pup = real(tr(apply(Pup,rho;apply_dag= true)))
rho = apply(Pup,rho;apply_dag = true)/pup

My initial state is some product state or some mixed state such as rho = MPO(s,"Id");rho = rho./2

Thanks

Just like with MPS, you can pass truncation arguments to apply, for example:

gate = [("haar2", s1, s2)]
rho = apply(ops(gate, s), rho; apply_dag=true, cutoff=1e-8, maxdim=100)
1 Like

Hi Matt

Thanks for the answer. But I have a naive question. Does it mean that I need to set the maximal bond dimension every time I use the apply function or I just need to set it once? Also, can I do this when I initialize my state? For instance I have rho = MPO(s,"Id"); rho = rho./2

You should set the truncation values every time you call the apply function. When you apply gates to an MPS or MPO, it will in general increase the bond dimension (one exception is that single-site gates don’t change the bond dimension), and if you continue applying gates without truncation the bond dimension will in general grow exponentially.

There isn’t a way to set the truncation when you initialize the state, if I understand your question correctly.

1 Like

Yes this is exactly what I want. Thanks Matt!