qbraid_algorithms.rodeo

Rodeo Algorithm

Rodeo

This module provides an implementation of the Rodeo algorithm, a quantum algorithm for estimating expectation values of observables with high precision. The Rodeo algorithm is particularly useful for quantum chemistry, quantum simulation, and variational quantum algorithms where accurate expectation value estimation is crucial for optimization and ground state preparation. The algorithm uses controlled Hamiltonian evolution with random phase shifts and ancilla measurements to extract expectation values with reduced resource requirements compared to standard quantum expectation value estimation methods.

FORMULATION

Problem: Given a quantum state \(|\psi\rangle\) and observable \(O\), estimate the expectation value \(\langle\psi|O|\psi\rangle\).

Algorithm Steps:

  1. Ancilla Preparation: Prepare ancilla qubit in superposition:

    \(|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)\)

  2. Controlled Evolution: Apply controlled Hamiltonian evolution with random time \(t\):

    \(|\psi_1\rangle = \frac{1}{\sqrt{2}}(|0\rangle|\psi\rangle + |1\rangle e^{-iOt}|\psi\rangle)\)

  3. Ancilla Rotation: Apply Hadamard to ancilla for interference:

    \(|\psi_2\rangle = \frac{1}{2}[(1 + e^{-iOt})|0\rangle|\psi\rangle + (1 - e^{-iOt})|1\rangle|\psi\rangle]\)

  4. Measurement: Measure ancilla and extract expectation value from statistics

Expectation Value Extraction: For small evolution times \(t\), the expectation value is estimated as:

\(\langle\psi|O|\psi\rangle = \lim_{t \to 0} \frac{1}{t} \arcsin(\sqrt{P_1})\)

where \(P_1\) is the probability of measuring \(|1\rangle\) in the ancilla.

Variance Reduction: The algorithm achieves improved precision through:

  • Random Sampling: Multiple evolution times reduce systematic errors

  • Statistical Averaging: Ensemble measurements improve accuracy

  • Controlled Evolution: Direct access to Hamiltonian eigenvalue information

Classes

RodeoLibrary(*args, **kwargs)

A quantum gate library implementing the Rodeo algorithm for quantum state preparation.