Surrogate
Datatypes
PauliPropagation.NodePathProperties — TypeNodePathProperties(node::CircuitNode)
NodePathProperties(node::CircuitNode, nsins::Int, ncos::Int, freq::Int)Surrogate PathProperties type. Carries CircuitNodes instead of numerical coefficients. If nsins, ncos, and freq are not provided, they are initialized to 0.
PauliPropagation.tonumber — Methodtonumber(path::NodePathProperties)Get the cummulative coefficient of a NodePathProperties node. This assumes that the surrogate has already been evaluated.
PauliPropagation.wrapcoefficients — Methodwrapcoefficients(pstr::PauliString, ::Type{NodePathProperties})Wrap the coefficient of a PauliString into NodePathProperties.
PauliPropagation.wrapcoefficients — Methodwrapcoefficients(psum::PauliSum, ::Type{NodePathProperties})Wrap the coefficients of a PauliSum into NodePathProperties.
Evaluate
PauliPropagation.evaluate! — Methodevaluate!(psum::PauliSum{<:Integer,NodePathProperties}, thetas; reset=true)Evaluate the expectation value of a Surrogate by evaluating all involved circuit nodes in the correct order. eval_list can be attained as the output of gettraceevalorder(). If reset is false, the function will not reset the is_evaluated flags of the nodes. This should only be done if they are manually reset.
PauliPropagation.reset! — Methodreset!(circuit_node::CircuitNode)Reset a CircuitNode in a the Surrogate. Needs to be done in-between evaluations with different parameters.
PauliPropagation.reset! — Methodreset!(end_node::EvalEndNode)Reset a EvalEndNode in a the Surrogate. These sit on the coeff field of NodePathProperties and are the end of the evaluation chain. Needs to be done in-between evaluations with different parameters.
PauliPropagation.reset! — Methodreset!(paths::Vector{NodePathProperties})Reset a vector of NodePathProperties in a the Surrogate. Needs to be done in-between evaluations with different parameters.
PauliPropagation.reset! — Methodreset!(psum::PauliSum{<:Integer, NodePathProperties})Reset the nodes in a the Surrogate. Needs to be done in-between evaluations with different parameters.
Propagate
PauliPropagation.propagate! — Methodpropagate!(circ, psum::PauliSum{<:Integer,NodePathProperties}; max_weight=Inf, max_freq=Inf, max_sins=Inf, customtruncfunc=nothing, kwargs...)Construct a Pauli propagation surrogate of the propagated PauliSum through the circuit circ in the Heisenberg picture. The PauliSum psum is modified in place. The circuit must only contain CliffordGates and PauliRotations. Truncations based on any numerical coefficient value cannot be used. Everything else is the same as in propagate!() for the non-Surrogate code.
PauliPropagation.propagate — Methodpropagate(circ, pstr::PauliString{<:Integer,NodePathProperties}; max_weight=Inf, max_freq=Inf, max_sins=Inf, customtruncfunc=nothing, kwargs...)Construct a Pauli propagation surrogate of the propagated PauliString through the circuit circ in the Heisenberg picture. The circuit must only contain CliffordGates and PauliRotations. Truncations based on any numerical coefficient value cannot be used. Everything else is the same as in propagate!() for the non-Surrogate code.
PauliPropagation.propagate — Methodpropagate(circ, psum::PauliSum{<:Integer,NodePathProperties}; max_weight=Inf, max_freq=Inf, max_sins=Inf, customtruncfunc=nothing, kwargs...)Construct a Pauli propagation surrogate of the propagated PauliSum through the circuit circ in the Heisenberg picture. The circuit must only contain CliffordGates and PauliRotations. Truncations based on any numerical coefficient value cannot be used. Everything else is the same as in propagate!() for the non-Surrogate code.