GTorlai / PastaQ.jl

Package for Simulation, Tomography and Analysis of Quantum Computers
Apache License 2.0
142 stars 23 forks source link

Define `originalsiteind[s]` functions #177

Closed mtfishman closed 2 years ago

mtfishman commented 3 years ago

We should define a function originalsiteind[s] that returns the site index that would be used to create the MPS/MPO (and therefore is the "correct" site index to create new operators). Something like:

originalsiteind(M::MPS, n::Int) = siteind(M, n)
originalsiteind(M::MPO, n::Int) = dag(siteind(M, 1; plev = 0))

Notice the dag is important because for an MPO with QNs, the site index with prime level 0 is actually the daggered version of the site index used to create it.

Originally posted by @mtfishman in https://github.com/GTorlai/PastaQ.jl/pull/172#r567895496