Skip to main content

Module evolution

Module evolution 

Source
Expand description

Pauli evolution gates and operations.

This module provides functionality to implement Pauli rotation gates of the form $e^{-i\theta/2 \cdot P}$ where $P$ is a multi-qubit Pauli string operator.

§Algorithm

The Pauli rotation is implemented using basis transformation and CNOT ladder:

  1. Basis Transformation: For each non-identity Pauli operator $P_i \in {X, Y, Z}$, apply a basis transformation to convert it to the $Z$ basis:

    • $X \to Z$: Apply $H$ gate
    • $Y \to Z$: Apply $H \cdot S^\dagger$ (or equivalently $R_X(\pi/2)$)
    • $Z \to Z$: No transformation needed
  2. CNOT Chain (Cascade): Use CNOT gates to accumulate parity along a chain to the last non-identity qubit:

    • For non-identity qubits at indices $[i_0, i_1, i_2, \ldots, i_{n-1}]$, apply $CNOT(i_0 \to i_1), CNOT(i_1 \to i_2), \ldots, CNOT(i_{n-2} \to i_{n-1})$
    • This computes the product $P_{i_0} \cdot P_{i_1} \cdot \ldots \cdot P_{i_{n-1}}$ in the computational basis
  3. Core Rotation: Apply $RZ(\theta)$ on the last non-identity qubit. The multi-qubit Pauli rotation reduces to a single-qubit RZ after the parity accumulation.

  4. Reverse CNOT Ladder: Apply the CNOT gates in reverse order to uncompute the parity.

  5. Inverse Basis Transformation: Apply the inverse basis transformations in reverse order to restore the original basis.

§Mathematical Background

For a Pauli string $P = \bigotimes_{i} P_i$, the rotation is: $$e^{-i\theta/2 \cdot P} = \cos(\theta/2) I - i\sin(\theta/2) P$$

Since all Pauli operators can be simultaneously diagonalized in the $Z$ basis, they share eigenstates. The CNOT ladder effectively performs a basis change from the individual qubit basis to the joint parity basis, allowing the multi-qubit rotation to be performed as a single-qubit RZ gate.

Enums§

TrotterMode
Trotter-Suzuki decomposition modes for Hamiltonian time evolution.

Traits§

PauliEvolution
Extension trait for Circuit to add Pauli evolution functionality.