---
title: Quantum Rejection Sampling Overview
url: https://www.emergentmind.com/topics/quantum-rejection-sampling
type: topic
---

# Quantum Rejection Sampling Overview

Quantum rejection sampling denotes a set of quantum algorithms and primitives that generalize the classical rejection sampling technique for modifying distributions or state amplitudes, targeting either statistical sampling or quantum state synthesis tasks. In the quantum context, rejection sampling is not only used to generate samples from a target probability distribution but is also integral to the preparation of quantum states with prescribed amplitude profiles, acting as a key component in several quantum algorithms that require amplitude modulation and probabilistic filtering. The quantum versions utilize amplitude amplification (e.g., Grover iterations) or coherent acceptance procedures to achieve quadratic speedups over classical rejection in diverse algorithmic settings, including quantum Bayesian inference, state conversion, quantum Monte Carlo, and state space exploration [1402.7359][1103.2774][2304.09827][1407.7805].

## 1. Conceptual Foundations and Problem Formulations

Quantum rejection sampling extends classical rejection sampling strategies to quantum superpositions and distributions. In classical rejection sampling, one draws candidate samples from a proposal distribution $q(x)$ and accepts each with probability $\min\{1, \pi(x)/Mq(x)\}$ so as to realize a target density $\pi(x)$. In the quantum setting, the analogue is either:

- Accept/reject sampling conditioned on quantum-compatible constraints (e.g., physicality of density matrices, measurement results) [1407.7805],  
- Coherent amplitude modulation and state conversion, whereby the amplitudes in an initial quantum superposition are "remodulated" to match a target set, typically up to normalization and success probability [1103.2774].

In Ozols, Roetteler, and Roland's formulation, the quantum version takes as input a unitary oracle $O$ preparing a known superposition $|\Psi_T\rangle = \sum_k T_k |\xi_k\rangle|k\rangle$ and aims to convert this to another superposition $|\Psi_o\rangle = \sum_k o_k |\xi_k\rangle|k\rangle$ for a different vector of (normalized, nonnegative) amplitudes $o$ [1103.2774].

## 2. Algorithmic Schemes

### 2.1 Quantum Amplitude Amplification for Rejection Overhead

A central quantum advantage arises because classically, the cost per accepted sample from a Bayesian network is $O(nm P(e)^{-1})$, where $P(e)$ is the acceptance/evidence probability. Quantum amplitude amplification reduces this to $O(n 2^m P(e)^{-1/2})$, exploiting the quadratic speedup characteristic of Grover's algorithm. This result is unrelativized—no oracles or black-boxes beyond the described circuits are assumed [1402.7359].

### 2.2 Modulation of Amplitudes (QSAMPLING Problem)

The QSAMPLING$_{T\to o}$ problem formalizes the task of producing $|\Psi_o\rangle$ from $O$ and reflection access to $|\Psi_T\rangle$. The circuit structure involves:

- Preparation of $|\Psi_T\rangle$ via $O$,
- Ancilla registers for "accept/reject" marking,
- Controlled rotations $R_{\varepsilon}(k)$ parameterized by intermediary vector $\varepsilon$,  
- Amplitude amplification to boost the acceptance probability (amplitude squared) to near certainty,  
- Post-selection or uncomputation to return the required state [1103.2774].

For sampling over spaces constrained by physicality (e.g., the quantum state space), classical rejection with proposal and target measures is used, but sometimes hybrid quantum-classical primitives are developed, e.g., for ground-state energy density certification [2304.09827].

### 2.3 Quantum Subroutines in Continuous Parameter Sampling

In energy estimation and spectral measure sampling, the quantum computer acts as an acceptance arbiter for classically proposed $x$, leveraging block-encoded unitaries $U_x$ to implement operators $h(H-xI)$ and measuring corresponding ancillae. The quantum acceptance matches the desired smeared spectral distribution, conditioned on correct parameter selection [2304.09827].

## 3. Complexity Analysis and Lower Bounds

The efficiency of quantum rejection sampling derives from quadratic improvements in acceptance probability scaling. In conditional Bayesian network sampling, the time to a valid sample is reduced from $O(P(e)^{-1})$ classically to $O(P(e)^{-1/2})$ quantumly. The total quantum cost is $O(n 2^m P(e)^{-1/2})$ gates per sample [1402.7359].

For the more abstract QSAMPLING$_{T\to o}$ scenario, query complexity analysis is conducted via an explicit semidefinite program (SDP) over feasible amplitude vectors $\varepsilon$, subject to physical constraints. The optimal cost is $O(1/\|\varepsilon^*\|_2)$, with $\varepsilon^*$ given by a "water-filling" solution. The matching lower bound follows from an automorphism (twirling) argument, ensuring optimality up to constants [1103.2774].

In continuous distributions or spectral measure sampling (e.g., [2304.09827]), the expected number of quantum trials per accepted sample is $O(|M|^2)$, where $|M|^2$ arises from proposal-to-target majorization and normalization properties.

## 4. Implementational Details and Resource Estimates

The typical workflow of quantum rejection sampling involves:

- State preparation: Compiling state-preparation circuits for $|\psi_P\rangle$ from a Bayesian network, with circuit size $O(n 2^m)$ [1402.7359], or oracle-based construction for indexed state sets [1103.2774].
- Ancilla usage: $O(n)$ ancillae for controlled phase flips, with additional ancilla registers as "coin" for amplitude marking and acceptance.
- Gate complexity: Each Grover or amplitude amplification iterate requires $O(n 2^m)$ (Bayesian networks) or $O(1)$ (accept/reject coin) for appropriate oracular scenarios.
- Circuit depth: For each Grover step, $O(n 2^m)$ (Bayesian) or $O(d)$ (degree of block-encoding) for spectral tasks [1402.7359][2304.09827].
- Qubit count: Dependent on problem; $n$ for primary variables and $O(n)$ for ancillae in Bayesian inference, $m+1$ ancillas in block-encoding-based spectral sampling [1402.7359][2304.09827].
- No black-box oracles or uncounted state-preparation modules in primary unrelativized speedup results [1402.7359].

Resource bottlenecks arise if the proposal and target distributions are misaligned, leading to low acceptance rates, or in sampling over high-dimensional quantum state spaces where the volume fraction of permissible (physical) samples vanishes—necessitating careful proposal design or MCMC methods [1407.7805].

## 5. Applications and Algorithmic Use-Cases

Quantum rejection sampling is a recognized primitive in several quantum algorithms:

- **HHL Algorithm (Quantum Linear Systems):** The procedure to construct $|b\rangle \to \sum_j b_j/\lambda_j |λ_j\rangle$ via controlled rotations is an instance of QSAMPLING$_{T\to o}$ with $T_j = b_j$, $o_j \propto b_j/\lambda_j$, with cost $O(1/\|\varepsilon^*\|_2)$, matching HHL's $O(\kappa)$ scaling [1103.2774].
- **Quantum Metropolis Moves:** Acceptance amplitudes for energy-proportional moves can be quadratically amplified, reducing "rollback" costs [1103.2774].
- **Bayesian Networks:** Direct quadratic speedup in rare-evidence Bayesian inference—core for probabilistic reasoning with low-likelihood events [1402.7359].
- **Ground-State Certification:** Quantum acceptance of classically proposed samples for certified estimation of spectral densities and energy intervals, circumventing discretization issues and enabling efficient certification on operation-limited hardware [2304.09827].
- **Quantum State Space Exploration:** Monte Carlo-like sampling of quantum state spaces, subject to positivity and trace constraints, via rejection or MCMC methods [1407.7805].
- **Boolean Hidden Shift:** State amplitude "flattening" via QSAMPLING, with cost determined by "water-filling" of the Fourier spectrum [1103.2774].

A summary table of primary contexts for quantum rejection sampling:

| Application           | Quantum Role                    | Reference      |
|-----------------------|---------------------------------|---------------|
| HHL linear solver     | Amplitude remodulation          | [1103.2774]   |
| Bayesian net inference| Evidence amplitude boosting     | [1402.7359]   |
| Metropolis sampling   | Move acceptance / rollback      | [1103.2774]   |
| Ground-state certify  | Spectral measure filtering      | [2304.09827]  |
| State space MC        | Candidate acceptance            | [1407.7805]   |
| Hidden shift problem  | Fourier amplitude flattening    | [1103.2774]   |

## 6. Extensions, Limitations, and Practical Considerations

Quantum rejection sampling requires physical feasibility in state encoding: for quantum state spaces, this entails efficient checks for positivity and trace constraints, managed by algorithms such as the Ginibre ensemble and gradient-based physicality tests [1407.7805]. Acceptance rates may decrease exponentially with system size unless proposal and target measures are carefully balanced.

The quantum variant attains unrelativized (oracle-free) quadratic speedups for rejection overhead. However, the burden of large logical circuits and ancilla management persists in practice. The acceptance amplification may be infeasible for very low target acceptance rates, suggesting a need for hybrid quantum–classical protocols or further algorithmic refinement. In contexts where classically rejecting candidates is computationally prohibitive (e.g., in high-dimensional quantum state inference), alternative strategies such as MCMC or Hamiltonian Monte Carlo are preferred, with quantum rejection sampling retaining relevance for low-to-moderate dimension regimes [1407.7805].

Quantum rejection sampling subroutines with block-encoding constructions have notable application prospects in continuous parameter problems, spectral estimation, and quantum Monte Carlo, leveraging improved Hamiltonian simulation schemes [2304.09827]. As more efficient state preparation, amplitude amplification, and quantum verification tools mature, quantum rejection sampling is poised to become a foundational component of practical quantum algorithms.

Source: https://www.emergentmind.com/topics/quantum-rejection-sampling