Closed GTorlai closed 3 years ago
site_inds = [typeof(M) == MPS ? siteind(M, s) : firstind(M[s]; tags="Site", plev=0) for s in site]
yes
Also this reminders me that it would be good to have a function, maybe called originalsiteind[s]
, that returns the siteind
in the case of MPS and the unprimed (and daggered) siteind
in the case of an MPO, so then this could be written as:
site_inds = [originalsiteind(M, s) for s in site]
This could be defined as:
originalsiteind(M::MPS, n::Int) = siteind(M, n)
originalsiteind(M::MPO, n::Int) = dag(siteind(M, n; plev=0))
I have fixed this on PastaQ due a time-sensitive project. I assume the originalsiteind
would be a ITensor function. We can change this here once that is implemented.
The following function in
runcircuit.jl
needs to be modified