Skip to main content
Functions:
NameDescription
linear_pauli_rotations[Qmod Classiq-library function].

linear_pauli_rotations

linear_pauli_rotations(
bases: CArray[Pauli],
slopes: CArray[CReal],
offsets: CArray[CReal],
x: QArray[QBit],
q: QArray[QBit]
) -> None
[Qmod Classiq-library function] Performs a rotation on a series of mm target qubits, where the rotation angle is a linear function of an nn-qubit control register. Corresponds to the braket notation: xnqmxnk=1m(cos(ak2x+bk2)isin(ak2x+bk2)Pk)qk\left|x\right\rangle _{n}\left|q\right\rangle _{m}\rightarrow\left|x\right\rangle _{n}\prod_{k=1}^{m}\left(\cos\left(\frac{a_{k}}{2}x+\frac{b_{k}}{2}\right)- i\sin\left(\frac{a_{k}}{2}x+\frac{b_{k}}{2}\right)P_{k}\right)\left|q_{k}\right\rangle where x\left|x\right\rangle is the control register, q\left|q\right\rangle is the target register, each P{k}P_\{k\} is one of the three Pauli matrices XX, YY, or ZZ, and a{k}a_\{k\}, b{k}b_\{k\} are the user given slopes and offsets, respectively. Parameters:
NameTypeDescriptionDefault
basesCArray[Pauli]List of Pauli Enums.required
slopesCArray[CReal]Rotation slopes for each of the given Pauli bases.required
offsetsCArray[CReal]Rotation offsets for each of the given Pauli bases.required
xQArray[QBit]Quantum state to apply the rotation based on its value.required
qQArray[QBit]List of indicator qubits for each of the given Pauli bases.required