rnz

Contents

rnz#

iqm.qaoa.circuits.rnz(n, theta)[source]#

Construct an n-qubit Pauli-Z string rotation circuit.

This circuit implements the unitary

\[\begin{split}U(\\theta) = e^{-i \\frac{\\theta}{2} Z^{\\otimes n}}\end{split}\]

where \(Z^{\\otimes n}\) denotes the tensor product of Pauli-Z operators acting on all n qubits.

The implementation uses a CNOT ladder to compute the parity of qubits 1 through n-1 onto qubit 0, applies a single-qubit \(R_Z(\\theta)\) rotation on qubit 0, and then uncomputes the parity.

Parameters:
  • n (int) – Number of qubits in the Pauli string.

  • theta (float) – Rotation angle \(\\theta\).

Returns:

A quantum circuit implementing the n-qubit Z-string rotation.

Return type:

QuantumCircuit