Symmetry
PauliPropagation.symmetrymerge! — Method
symmetrymerge!(mapfunc, psum::AbstractPauliSum; thread=true)
symmetrymerge!(mapfunc, prop_cache::AbstractPauliPropagationCache; thread=true)In-place version of symmetrymerge. Returns the merged psum or prop_cache, which is the same object that was passed in.
PauliPropagation.symmetrymerge — Method
symmetrymerge(mapfunc, psum::AbstractPauliSum; thread=true)
symmetrymerge(mapfunc, prop_cache::AbstractPauliPropagationCache; thread=true)Merge equivalent Pauli strings under a symmetry mapping, returning a copy. Each Pauli string is transformed using mapfunc(pstr) to its canonical representative, and identical representatives are combined. mapfunc must be constant on symmetry orbits, i.e. equivalent Pauli strings must map to the same integer. On array-backed sums, thread=false turns off multithreading, the same as in propagate.
Example
psum = PauliSum(6)
add!(psum, :Z, 3)
add!(psum, :Z, 6)
# merge under 1D translations, the same as `translationmerge(psum)`
symmetrymerge(pstr -> _translatetolowestinteger(pstr, nqubits(psum)), psum)PauliPropagation.translationmerge! — Method
translationmerge!(psum::AbstractPauliSum, nx::Integer, ny::Integer; thread=true)
translationmerge!(prop_cache::AbstractPauliPropagationCache, nx::Integer, ny::Integer; thread=true)In-place version of translationmerge for a periodic nx x ny grid.
PauliPropagation.translationmerge! — Method
translationmerge!(psum::AbstractPauliSum; thread=true)
translationmerge!(prop_cache::AbstractPauliPropagationCache; thread=true)In-place version of translationmerge for a periodic 1D chain.
PauliPropagation.translationmerge — Method
translationmerge(psum::AbstractPauliSum, nx::Integer, ny::Integer; thread=true)
translationmerge(prop_cache::AbstractPauliPropagationCache, nx::Integer, ny::Integer; thread=true)Shift and merge of a psum in a system with 2D translational symmetry.
psum = PauliSum(6)
add!(psum, :Z, 3)
add!(psum, :Z, 6)
translationmerge(psum, 2, 3)PauliPropagation.translationmerge — Method
translationmerge(psum::AbstractPauliSum; thread=true)
translationmerge(prop_cache::AbstractPauliPropagationCache; thread=true)Shift and merge of a psum in a system with 1D translational symmetry.
psum = PauliSum(6)
add!(psum, :Z, 3)
add!(psum, :Z, 6)
translationmerge(psum)
>>> PauliSum(nqubits: 6, 1 Pauli term:
2.0 * ZIIIII
)