---
title: Repeat-Until-Success Injection Protocol
url: https://www.emergentmind.com/topics/repeat-until-success-injection-protocol
type: topic
---

# Repeat-Until-Success Injection Protocol

The Repeat-Until-Success (RUS) injection protocol is a measurement-based, non-deterministic technique for implementing quantum gates—especially non-Clifford operations—in a resource-optimal fashion. RUS circuits realize a target unitary with reduced average gate overhead by accepting probabilistic success per trial, recovering from failure via simple corrections, and looping until success is flagged by a measurable ancilla. This approach achieves asymptotically lower $T$-count (the non-Clifford resource cost in Clifford+$T$ quantum computing) than ancilla-free deterministic decompositions, underpins efficiency improvements for both qubit and continuous-variable gates, and is extensible to hardware with adaptive mid-circuit classical control.

## 1. Fundamental Principles and Circuit Structure

In an RUS injection protocol, a quantum circuit is constructed such that:

- Upon measurement of ancillary qubits, one outcome—labeled “success”—applies the desired unitary $U$ to the data register. Other outcomes—labeled “failure”—apply reversible, efficiently correctable unitaries $R_i$ (typically Clifford).
- The failed attempt is “rewound” by applying $R_i^\dagger$, the ancillas are reset, and the protocol is repeated.
- The process turns the overall operation into a classical-flagged, geometric random process: the number of repetitions $N$ is distributed as $\Pr(N=n)=p(1-p)^{n-1}$ with mean $\mathbb E[N]=1/p$ for single-shot success probability $p$.

For single-qubit Clifford+$T$ circuits, the canonical implementation proceeds as follows [1311.1074, 1404.5320]:

1. Prepare ancillas in $|0^m\rangle$.
2. Apply a joint unitary $W$ (composed of Clifford and $T$ gates) to ancilla(s) plus data.
3. Measure the ancillas. If the result is in the “success” set, $U$ is implemented exactly. Otherwise, correct $R_i^\dagger$, reset ancillas, and retry.
4. Repeat until “success” is registered.

The circuit design ensures that the data register remains in a pure state throughout. The expected $T$-count is $C(W)/p$ per attempt.

## 2. Algorithmic Synthesis and Resource Optimization

The synthesis of efficient RUS circuits involves a number-theoretic approach for single-qubit gates, with polynomial-time algorithms available for arbitrary axial rotations $R_z(\theta)$:

- **Cyclotomic Rational Approximation:** Find $z\in\mathbb{Z}[\omega]$ ($\omega=e^{i\pi/4}$) such that $\left|\frac{z^*}{z}-e^{i\theta}\right|<\epsilon$, reducing operator-norm error to a prescribed $\epsilon$ [1404.5320].
- **Randomized Normalization:** Generate $z'$ and $y$ to satisfy a norm equation $|y|^2+|z'|^2=2^{L'}$, optimizing for maximal success probability $p=|z'|^2/2^{L'}$.
- **Unitary Assembly & Lifting:** Embed the solution into a two-qubit RUS subcircuit; on measurement, either $U$ or $Z$ is applied (the “Jack-of-Daggers” construction).
- **Empirical Performance:** The expected $T$-count scales as $E[T]\approx1.15\log_2(1/\epsilon)+O(1)$, in contrast to the $3\log_2(1/\epsilon)$ lower bound for ancilla-free decompositions—a factor $>2.5\times$ improvement [1404.5320].

For arbitrary single-qubit unitaries, similar protocols can be composed, yielding $E[T]\approx2.4\log_2(1/\epsilon)-3.28$ [1311.1074].

For continuous-variable logic, protocols have been developed to implement cubic phase gates with RUS strategies (photon subtraction plus Gaussian operations), with sequential attempts and correctable branches [1412.0336].

## 3. Quantitative Performance, Success Probability, and Error Analysis

The RUS method offers resource reductions at the expense of non-deterministic execution, but the variance in cost per gate is small for high-success gadgets:

- **Success Probability:** Typically $p>0.5$ for the best-developed single-qubit RUS circuits; for certain gates (e.g., $V_3$), $p\approx0.4$ [2310.12106].
- **Expected Overhead:** For $p\approx0.95$ (as in high-precision $R_z$-rotations), the expected number of repetitions is close to unity ($1/p\approx1.05$); for $p=0.4$, it is $E[N]=2.5$ [2310.12106].
- **Resource Scaling:** The $T$-gate cost per successful gate is proportional to $1/p$, while classical control flow only adds constant-time overhead per round.

In advanced protocols, fixed-point oblivious amplitude amplification (FP-OAA) can be layered atop the basic RUS primitive to deterministically amplify the success probability to $1-\delta$ for any target error $\delta$, balancing T-gate cost versus amplitude-distortion when the protocol must be controlled or conditioned [1808.02900].

In architecture-level studies (e.g., GKP photonic qubits with outer surface-code protection), the observed RUS success probability for logical magic state injection is $P_s\gtrsim0.94$ ($s=8\ldots16$ dB squeezing, $p_\text{loss}=0.01\ldots0.03$), with an average number of rounds $\langle N\rangle\approx1.15$–$1.20$ [2601.16244].

## 4. Practical Integration in Hardware Architectures

RUS protocols are widely deployed in cutting-edge quantum architectures, including:

- **Fault-tolerant Clifford+$T$:** RUS circuits are used as modules for magic-state injection, $T$-gate synthesis, and arbitrary single-qubit rotations. The extra requirement is fast mid-circuit measurement, ancilla resets, and classical feed-forward.
- **Partial Fault Tolerance (STAR architecture):** Direct analog rotation by teleportation is performed via RUS injection to minimize costly distillation. Parallel and adaptive RUS injection regions can achieve $86$–$97\%$ runtime speedups for many-qubit Trotterized simulation [2408.14929].
- **Photonic GKP Qubits:** Logical magic state injection via RUS and outer-code correction achieves high fidelity with minimal overhead, exploiting the fact that losses become heralded aborts in the protocol and thus do not degrade the fidelity of successfully injected states [2601.16244].
- **Algorithmic Compilation & Hardware IR:** Fault-tolerant compilers (QIR) support the hybrid quantum-classical control flow of RUS, with explicit loop/unroll mechanisms for high performance in near-term devices [2310.12106].

Characteristic RUS resource costs, success probabilities, and implementation details are summarized in the table below (values explicitly from data):

| Gate Type         | One-Shot $p$ | Expected $T$-overhead | Ancillas | Notes                             |
|-------------------|:------------:|:---------------------:|:--------:|-----------------------------------|
| $R_z(\theta)$     | $0.5$–$0.95$ | $1.15\log_2(1/\epsilon)+9.2$ | 1        | Clifford+$T$ circuits [1404.5320] |
| $V_3$ (arctan(2)Z)| $0.4$        | $\approx7.5$          | 2        | Two-stage RUS [2310.12106]        |
| $T$-gate injection| $0.5$        | 2                     | 1        | Teleportation RUS [2011.01055]    |
| Cubic phase (CV)  | $\sim 1/p$   | $3N/p$ subtractions   | resource| Photon subtraction [1412.0336]    |
| GKP magic state   | $0.94$–$0.98$| $1.15$–$1.20$ rounds  | logical | GKP+surface code [2601.16244]     |

## 5. Protocol Extensions, Generalizations, and Control-Flow Considerations

The RUS methodology generalizes to higher-order transformations, as formalized in the “success-or-draw” framework [2011.01055]. Here, probabilistic supermaps are constructed so that the failure branch enforces perfect neutralization (the identity map), enabling reliable repetition without unwanted cumulative byproducts.

- **Semidefinite Programming (SDP):** Optimal RUS supermaps for general gates can be engineered via SDP-based search over probabilistic combs (Choi operator formalism), maximizing $p$ subject to neutralization constraints.
- **Oblivious Amplitude Amplification:** If composed with OAA, the success probability can be deterministically or near-deterministically amplified at polylogarithmic additional T-cost, critical for high-fidelity, control-conditional applications [1808.02900].
- **Conditioned Operation and Amplitude Distortion:** When RUS injection is controlled by another register (in a quantum superposition), amplitude distortion can arise unless the success probability is boosted toward unity. Fixed-point OAA addresses this, achieving arbitrarily small distortion $O(\delta)$ for any specified $\delta$.
- **Compiler and Hardware Control Flow:** Best practice is loop-based injection, with explicit mid-circuit measurement and ancilla reset; recursive algorithms are discouraged in practice due to back-end control-flow complexity [2310.12106].

## 6. Applications, Performance Benefits, and Comparative Analysis

Major proven RUS injection protocol advantages include:

- **Reduced $T$-count:** Empirical and theoretical results show $2$–$3\times$ lower expected $T$-count for $R_z$ rotations and arbitrary single-qubit gates compared to deterministic ancilla-free synthesis [1404.5320, 1311.1074].
- **Scalability:** For moderate precisions ($\epsilon=10^{-8}$–$10^{-12}$), RUS circuits yield significant gate reductions, with resource savings propagating to large-scale algorithms (QFT, phase estimation).
- **Low Variance:** For precision regimes of interest, success probability is close to unity, so depth and wall-clock-time variance concentrate tightly around the mean.
- **Generality:** RUS circuits extend to GKP photonic, continuous-variable, and error-corrected logical architectures with high performance and tolerance to diverse error models.
- **Runtime Speedups:** In layout- and architecture-aware quantum simulations (e.g., Trotterized 2D Hubbard model), parallel and adaptive RUS scheduling reduces runtime by up to an order of magnitude [2408.14929].

In the context of competing schemes (e.g., deterministic unitary decompositions, GKP resource state preparation for CV gates), the RUS protocol enables significant experimental and architectural simplifications: resource states need less squeezing or lower-fidelity preparation, sequential photon-subtraction replaces simultaneous multi-photon subtraction, and no number-resolving detectors are required for key protocols [1412.0336].

## 7. Limitations and Design Considerations

The main constraints and considerations for RUS injection include:

- **Non-deterministic, classical feedback:** Requires fast ancilla reset, measurement, and real-time control.
- **Ancilla qubits/modes:** Minor hardware overhead in most regimes (1–2 qubits per gadget for qubit circuits).
- **Conditional protocols:** For controlled injection in superposition, success-probability boosting (amplitude amplification) is essential to suppress amplitude distortion [1808.02900].
- **Architecture matching:** Efficient integration with surface-code, photonic, or hybrid error-correction systems requires additional circuit-level co-design for optimal fidelity and resource budgeting [2601.16244].

Together, these insights confirm that the Repeat-Until-Success injection protocol is a central resource-optimization technique for high-fidelity, large-scale, and hardware-adapted universal quantum computation [1311.1074, 1404.5320, 2011.01055, 1808.02900, 1412.0336, 2408.14929, 2601.16244, 2310.12106].

Source: https://www.emergentmind.com/topics/repeat-until-success-injection-protocol