Skip to content

Linear pauli rotation

linear_pauli_rotation

Functions:

Name Description
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 \(m\) target qubits, where the rotation angle is a linear function of an \(n\)-qubit control register.

Corresponds to the braket notation:

\[ \left|x ight angle _{n}\left|q ight angle _{m} ightarrow\left|x ight angle _{n}\prod_{k=1}^{m}\left(\cos\left( rac{a_{k}}{2}x+ rac{b_{k}}{2} ight)- i\sin\left( rac{a_{k}}{2}x+ rac{b_{k}}{2} ight)P_{k} ight)\left|q_{k} ight angle \]

where \(\left|x ight angle\) is the control register, \(\left|q ight angle\) is the target register, each \(P_{k}\) is one of the three Pauli matrices \(X\), \(Y\), or \(Z\), and \(a_{k}\), \(b_{k}\) are the user given slopes and offsets, respectively.

Parameters:

Name Type Description Default
bases CArray[Pauli]

List of Pauli Enums.

required
slopes CArray[CReal]

Rotation slopes for each of the given Pauli bases.

required
offsets CArray[CReal]

Rotation offsets for each of the given Pauli bases.

required
x QArray[QBit]

Quantum state to apply the rotation based on its value.

required
q QArray[QBit]

List of indicator qubits for each of the given Pauli bases.

required

Notice that bases, slopes, offset and q should be of the same size.