Path Properties
Pauli frequency tracker
PauliPropagation.PauliFreqTracker — TypePauliFreqTracker(coeff::Number, nsins::Int, ncos::Int, freq::Int)Wrapper type for numerical coefficients in Pauli propagation that records the number of sin and cos factors applied via a PauliRotation gate, and the so-called frequency, which is their sum. It appears redundant but these three properties need to be tracked separately because of how merging affects them.
PauliPropagation.PauliFreqTracker — MethodPauliFreqTracker(coeff::Number)Constructor for PauliFreqTracker from only a coefficient. Initializes nsins, ncos, and freq to zero.
PauliPropagation.applytoall! — Methodapplytoall!(gate::PauliRotation, theta, psum, aux_psum; kwargs...)Overload of applytoall! for PauliRotation gates acting onto Pauli sums with PathProperties coefficients.
Abstract type
PauliPropagation.PathProperties — TypeAbstract type for wrapping coefficients and record custom path properties
Base.:* — MethodMultiplication of a PathProperties object with a number. Requires that the PathProperties object has a coeff field defined which will be multiplied.
Base.:* — MethodMultiplication of the coeff field in a PathProperties object with a number. Requires that the PathProperties object has a coeff field defined which will be multiplied.
Base.:+ — MethodAddition of two PathProperties objects of equal concrete type. Adds the coeff fields and takes the minimum of the other fields. Requires that the PathProperties object has a coeff field defined.
Base.float — Methodfloat(path::PathProperties)Returns an equivalent PathProperties object where float() is applied to the coeff field.
Base.show — MethodPretty print for PathProperties
PauliPropagation.tonumber — Methodtonumber(path::PathProperties)Get the numerical coefficient of a PathProperties wrapper.
PauliPropagation.wrapcoefficients — Methodwrapcoefficients(pstr::PauliString, PathPropertiesType<:PathProperties)Wrap the coefficient of a PauliString into a custom PathProperties type. For anything that is not natively supported by the library, you can subtype PathProperties. A one-argument constructor of the custom PathProperties type from a coefficient must be defined.
PauliPropagation.wrapcoefficients — Methodwrapcoefficients(psum::PauliSum, PathPropertiesType<:PathProperties)Wrap the coefficients of a PauliSum into a custom PathProperties type. For anything that is not natively supported by the library, you can subtype PathProperties. A one-argument constructor of the custom PathProperties type from a coefficient must be defined.