State Overlap

PauliPropagation.filter!Method
filter!(psum::PauliSum, filterfunc::Function)

Filter a PauliSum in-place by removing all Pauli strings that satisfy the filterfunc.

source
PauliPropagation.filterMethod
filter(psum::PauliSum, filterfunc::Function)

Return a filtered PauliSum by removing all Pauli strings that satisfy the filterfunc.

source
PauliPropagation.overlapbyorthogonalityMethod
overlapbyorthogonality(pstr::PauliString, orthogonalfunc::Function)

Overlap an integer Pauli string with a state or operator via function that returns true if the Pauli string is orthogonal and hence has overlap 0. An example orthogonalfunc is containsXorY which returns true if the Pauli string contains an X or Y Pauli. If not orthogonal, then the overlap is 1. This is particularly useful for overlaps with stabilizer states.

source
PauliPropagation.overlapbyorthogonalityMethod
overlapbyorthogonality(pstr::PauliString, orthogonalfunc::Function)

Overlap a PauliString with a state or operator via function that returns true if the PauliString is orthogonal and hence has overlap 0. An example orthogonalfunc is containsXorY which returns true if the PauliString contains an X or Y Pauli. If not orthogonal, then the overlap is the coefficient of the PauliString. This is particularly useful for overlaps with stabilizer states.

source
PauliPropagation.overlapbyorthogonalityMethod
overlapbyorthogonality(psum::PauliSum, orthogonalfunc::Function)

Overlap a PauliSum with a state or operator via function that returns true if a Pauli string is orthogonal and hence doesn't contribute. An example orthogonalfunc is containsXorY which returns true if a Pauli string contains an X or Y Pauli. If not orthogonal, then a Pauli string contributes with its coefficient. This is particularly useful for overlaps with stabilizer states.

source
PauliPropagation.overlapwithcomputationalMethod
overlapwithcomputational(pstr::PauliString, onebitinds)

Calculates the overlap of a Pauli string with the computational basis state which has one-bits at all specified onebitinds and zero-bits elsewhere. For example, overlapwithcomputational(pstr, [1,2,4]) returns the overlap with |1101000...> and will be either zero or plus/minus pstr.coeff.

source
PauliPropagation.overlapwithcomputationalMethod
overlapwithcomputational(psum::PauliSum, onebitinds)

Calculates the overlap of a Pauli sum with the computational basis state which has one-bits at all specified indices and zero-bits elsewhere. For example, overlapwithcomputational(psum, [1,2,4]) returns the overlap with |1101000...>

source
PauliPropagation.overlapwithpaulisumMethod
overlapwithpaulisum(psum1::PauliSum, psum2::PauliSum)

Calculates the overlap between two PauliSums. Important: We assume 'normalized' Pauli strings, i.e. such that Tr[P^2] = 1 for any n-qubit Pauli string P. If one Pauli sum represents e.g. a normalized quantum state, the result will need to be scaled by 2^n.

source