quantum_launcher.hampy.utils#
Utility functions for Hampy objects.
Summary#
Functions:
Shifts the qubits affected by the equation by the given amount, wrapping around if the index goes out of bounds. |
Reference#
- quantum_launcher.hampy.utils.shift_affected_qubits(equation: Equation, shift: int) Equation [source]#
Shifts the qubits affected by the equation by the given amount, wrapping around if the index goes out of bounds.
For each Pauli in the equation hamiltonian, shifts the Pauli string by the given amount. i.e (shift = 1) IZIZ -> ZIZI, etc. !Might be unwanted! ZIII -> IIIZ Keeps the coefficients the same.