State Overlap
PauliPropagation.overlapwithcomputational — Method
overlapwithcomputational(psum::PauliSum, onebitinds::Vector{Integer})
overlapwithcomputational(pstr::PauliString, onebitinds::Vector{Integer})Calculates the overlap of a Pauli sum or Pauli string with the computational basis state which has one-bits at all specified indices and zero-bits elsewhere. If |x><x| is a computational basis state, it we compute Tr[psum * |x><x|] = <x|psum|x> or Tr[pstr * |x><x|] = <x|pstr|x>. For example, overlapwithcomputational(psum, [1,2,4]) returns the overlap with |1101000...>.
PauliPropagation.overlapwithmaxmixed — Method
overlapwithmaxmixed(psum::AbstractPauliSum)Calculates the overlap of an AbstractPauliSum with the maximally mixed state I/2^n, i.e., Tr[psum * I/2^n].
PauliPropagation.overlapwithpaulisum — Method
overlapwithpaulisum(rho::PauliSum, psum::PauliSum)Calculate the overlap of a Pauli sum psum and a quantum state rho represented in the Pauli basis via another PauliSum. This is equivalent to the trace Tr[rho * psum]. Calls scalarproduct(rho, psum) * (2^nqubits(rho)) to calculate the overlap.
PauliPropagation.overlapwithplus — Method
overlapwithplus(psum::PauliSum)
overlapwithplus(pstr::PauliString)Calculates the overlap of a Pauli sum or Pauli string with the plus state |+><+|, i.e. Tr[psum * |+><+|] = <+|psum|+> or Tr[pstr * |+><+|] = <+|pstr|+>.
PauliPropagation.overlapwithzero — Method
overlapwithzero(psum::PauliSum)
overlapwithzero(pstr::PauliString)Calculates the overlap of a Pauli sum with the zero state |0><0|, i.e., Tr[psum * |0><0|] = <0|psum|0> or Tr[pstr * |0><0|] = <0|pstr|0>.
PauliPropagation.plusfilter! — Method
zerofilter!(psum)Filter a Pauli sum in-place with only Pauli strings that are not orthogonal to the plus state |+><+|.
PauliPropagation.plusfilter — Method
plusfilter(psum)Return a filtered Pauli sum with only Pauli strings that are not orthogonal to the plus state |+><+|.
PauliPropagation.scalarproduct — Method
scalarproduct(psum1::AbstractPauliSum, psum2::AbstractPauliSum)
scalarproduct(pstr::PauliString, psum::AbstractPauliSum)
scalarproduct(psum::AbstractPauliSum, pstr::PauliString)
scalarproduct(pstr1::PauliString, pstr2::PauliString)Calculates the scalar product between any combination of PauliSum and PauliString. This calculates the sum of the products of their coefficients for all Pauli strings that are present . Important: This is not equivalent to the trace Tr[psum1 * psum2] but instead Tr[psum1 * psum2]/2^n, and equivalently for Pauli strings.
PauliPropagation.zerofilter! — Method
zerofilter!(psum)Filter a Pauli sum in-place with only Pauli strings that are not orthogonal to the zero state |0><0|.
PauliPropagation.zerofilter — Method
zerofilter(psum)Return a filtered Pauli sum with only Pauli strings that are not orthogonal to the zero state |0><0|.