The Pauli string fixes the operator, but it does not fix the circuit used for
the parity computation or terminal rotation. These inputs can be selected when
the gadget is built:
Input
Default
Other supported use
pauli_string
Required zqp.String
Any \(I/X/Y/Z\) tensor product; pauli_exp requires at least one non-identity Pauli.
n_qubits
Required integer
May be larger than the Pauli support, provided every Pauli index is in range.
cx_ladder
CXLadderLog
CXLadderLinear, or another implementation of the Ladder protocol.
rz_method
rz
Any compatible (qubit,angle)->None guppy function, including an RUS \(R_Z\) construction.
controlled_rz_method
crz
For cntrl_pauli_exp, any compatible (control,target,angle)->None guppy function.
For example, this keeps the same \(e^{-i\theta P/2}\) operation while choosing a
linear CX ladder and a repeat-until-success rotation:
The RUS implementation changes how the central \(R_Z\) is synthesized. The
basis changes, parity ladder, angle convention, and resulting Pauli
exponential remain the same.
See the Pauli-exponential notebook for a
complete executable example and alternative rotation implementations.
The Hamiltonian and product-formula order determine the sequence of Pauli
exponentials. The ladder and rotation inputs are passed to every term, so one
choice changes the complete Trotter step consistently.
Builder
Input Hamiltonian or schedule
Result
trotter_first_order
zqp.RealTermSum
One forward pass through the non-identity terms.
cntrl_trotter_first_order
zqp.RealTermSum
Controlled forward pass; retains identity terms as relative phases.
At runtime, each term receives an angle equal to its coefficient multiplied by
the sequence factor and time_step. Negative sequence factors implement
backward evolution. ham_sim_trotter then repeats the completed step
n_steps times.