Home · ASPLOS 2026 · Quantum Computing

Reducing T Gates with Unitary Synthesis

Tianyi Hao, Amanda Xu and Swamit Tannu

Conference
ASPLOS 2026
Published
2026
Pages
1589-1604
Citations
1

Fault-tolerant quantum computers can only run a small discrete set of gates, and the one non-Clifford gate they need — the T gate — is hugely expensive because each one requires distilling a fragile magic state; arbitrary rotations in a quantum algorithm must be approximated as long sequences of T and Clifford gates, and the standard tool synthesizes each rotation separately, so a fused single-qubit unitary costs three times the T gates it should; this paper (University of Wisconsin-Madison — Tianyi Hao, Amanda Xu, Swamit Tannu) presents trasyn, which directly synthesizes an arbitrary single-qubit unitary using a tensor-network search that samples gate sequences toward the target, together with a unitary intermediate representation that merges adjacent rotations first, cutting the T count by up to 3.5 times and Clifford gates by 7 times against gridsynth.

The argument in one glance

  1. Problem

    Fault-tolerant machines pay dearly for every T gate, and rotations need many

    A fault-tolerant quantum computer cannot run arbitrary gates directly. Error correction forces it to use a small, discrete gate set: the Clifford gates, which are relatively cheap, plus one non-Clifford gate, the T gate, which is enormously expensive because each T requires a distilled magic state, produced by a costly process that consumes many extra qubits and time. Because magic state generation is the main bottleneck, the cost of running a fault-tolerant algorithm is usually estimated simply by its T count. The trouble is that quantum algorithms are full of arbitrary single-qubit rotations, such as Rx and Rz gates with continuous angles, and the discrete gate set cannot produce those exactly — each rotation must be approximated by a sequence of T and Clifford gates. So the number of T gates you spend approximating rotations largely determines whether an algorithm is affordable.

  2. What people did

    Synthesize each rotation with a tool like gridsynth

    The standard approach is single-rotation synthesis: a tool such as gridsynth takes one Rz rotation and a target accuracy and produces a near-optimal sequence of T and Clifford gates approximating it, close to the theoretical minimum T count for that rotation. Compilers apply this per rotation across the whole circuit, and it is the accepted way to turn continuous rotations into fault-tolerant gate sequences.

  3. Why it fell short

    Per-Rz synthesis triples the cost of an arbitrary unitary

    The catch is that gridsynth synthesizes only one Rz at a time, while a general single-qubit operation is a full arbitrary unitary. In many circuits, adjacent Rx and Rz gates can be fused into a single such unitary, written U3, which should be cheaper to realize as one thing. But to use gridsynth you must decompose that U3 back into rotations, and the standard decomposition expresses an arbitrary single-qubit unitary as three Rz rotations (interleaved with Hadamards). So synthesizing one fused unitary means running Rz synthesis three times, roughly tripling the T count compared to what a direct synthesis of the unitary could achieve. Existing methods thus leave a large, systematic overhead on the table precisely where circuits offer the chance to merge rotations, because they can only approximate rotations one axis at a time, not an arbitrary unitary as a whole.

  4. This paper's idea

    Synthesize the whole unitary directly with a tensor-network search

    trasyn (Tensor-based Arbitrary unitary Synthesis) directly synthesizes an arbitrary single-qubit unitary into a fault-tolerant gate sequence, avoiding the threefold overhead of separate Rz decompositions. Two ideas make this work. First, a unitary (U3) intermediate representation: rather than keeping rotations as separate Rz gates, the compiler fuses adjacent rotations into single U3 unitaries first, so there are fewer, richer operations to synthesize. Second, a tensor-network-based search for the discrete gate sequence: brute-force search over all gate sequences finds optimal short sequences but cannot scale, so trasyn represents the search with a matrix product state built from precomputed sequence building blocks, and does error-aware sampling — folding the target unitary in and treating the distance to the target as a probability so it samples sequences that head toward the answer. This scales far past brute force and is amenable to GPU acceleration. Against gridsynth-based synthesis, trasyn reduces the T count by up to 3.5 times, Clifford gates by 7 times, and overall circuit infidelity by up to 4 times across 187 benchmarks, and cuts T count by 3.7 times on random single-qubit unitaries at similar accuracy.

Why this problem is worth solving

The economics of fault-tolerant quantum computing are dominated by one number, and rotations drive it.

A fault-tolerant quantum computer protects information with error-correcting codes, but that protection restricts which operations it can perform cheaply. The natural fault-tolerant gate set is the Clifford gates plus the T gate. Clifford gates can be implemented directly within most codes at modest cost. The T gate cannot; it requires a magic state, a specially prepared quantum state that is consumed to enact the T. Producing magic states of high enough quality takes magic state distillation, a process that uses many ancilla qubits and repeated measurement to purify low-quality states into usable ones, and this consumes the lion’s share of the qubits and time in a fault-tolerant computation. Because magic state generation is the primary bottleneck, the community estimates the resource cost of an algorithm largely by its T count — how many T gates it needs. Now, quantum algorithms are saturated with arbitrary single-qubit rotations (rotations by continuous angles, like Rx and Rz), which appear in chemistry simulations, optimization, and much else, and the discrete fault-tolerant gate set cannot represent an arbitrary angle exactly. Each rotation must therefore be approximated by a sequence of T and Clifford gates, spending T gates to get close enough. So the count of T gates burned approximating rotations is, to first order, what makes a fault-tolerant algorithm cheap or unaffordable, which is why shaving that count is one of the highest-leverage problems in quantum compilation.

The reason the standard method leaves so much on the table is a mismatch between what circuits offer and what the tool can consume.

Single-rotation synthesizers like gridsynth are excellent at their job: given one Rz rotation and a target error, they emit a T-and-Clifford sequence whose T count is near the information-theoretic minimum for that rotation. The limitation is the unit of work — they handle exactly one Rz. But a general single-qubit operation is not one Rz; it is an arbitrary unitary with three degrees of freedom, conventionally written U3. Crucially, in real circuits, adjacent single-qubit rotations along different axes often sit next to each other and can be algebraically fused into a single U3 unitary, which represents the combined operation exactly. If you could synthesize that U3 directly, you would pay once. But with a per-Rz tool, you must first decompose the U3 back into rotations, and the standard identity writes any single-qubit unitary as three Rz rotations separated by Hadamards. So the fused unitary that could have cost one synthesis instead costs three, roughly tripling its T count. The waste is structural: the circuit hands you an opportunity to merge, and the tool forces you to split again. Closing that gap requires a synthesizer whose unit of work is the whole arbitrary unitary, not a single axis of rotation, which is exactly what a direct unitary synthesis provides.

What people did before, and where it broke

  • Solovay-Kitaev synthesis. The first general method to approximate arbitrary single-qubit unitaries with a fault-tolerant gate set. Where it broke. It produces gate sequences far longer than the theoretical minimum (its length grows polynomially in the log of the accuracy with a large exponent), so its T counts are much higher than necessary.
  • Optimal per-Rz synthesis (gridsynth). Synthesize each Rz rotation near the information-theoretic minimum T count. Where it broke. It works one Rz at a time, so a fused arbitrary unitary (U3) must be split into three Rz rotations, roughly tripling the T count and missing the chance to merge rotations.
  • Exhaustive (brute-force) search. Search all gate sequences to find the shortest, lowest-T sequence for a target. Where it broke. It gives optimal results only for very short sequences (around fifteen T gates at loose accuracy) and cannot scale to the sequence lengths practical accuracy requires.
  • Search-based direct synthesizers (Synthetiq). Use heuristic search (for example simulated annealing) to synthesize unitaries over discrete gate sets. Where it broke. These struggle to scale to practical error thresholds, so they cannot reach the low errors fault-tolerant circuits need at useful sequence lengths.
  • The gap. No synthesizer combined a unitary-level representation that merges rotations with a search that both scales to practical accuracy and directly targets an arbitrary unitary, which is what is needed to actually cut the T count of rotation-heavy fault-tolerant circuits.

How trasyn works

Directly synthesizing an arbitrary unitary into a T-and-Clifford sequence

  1. new

  2. new

  3. new

  4. new

  5. new

The idea

Synthesize the whole unitary, not one axis at a time. The central reframing in trasyn is to make the unit of synthesis the entire arbitrary single-qubit unitary rather than a single Rz rotation. Per-Rz tools are optimal for one rotation but force an arbitrary unitary to be split into three, tripling its cost; trasyn instead approximates the unitary directly, so a fused operation is paid for once. This pairs with a U3 intermediate representation that merges adjacent rotations before synthesis, turning the circuit’s many small rotations into fewer rich unitaries. Reducing the count of the most expensive operations by optimizing at the level of whole operations, rather than piecewise, is the same compiler-optimization instinct the work on a block-wise compiler optimization framework for quantum programs covered elsewhere on this site is built on, restructuring the compilation unit to expose savings. trasyn applies it to single-qubit synthesis, where the expensive resource is the T gate and the savings come from not decomposing a unitary needlessly.

Exploit a richer representation to spend fewer resources. The U3 IR is not just bookkeeping; it changes what optimizations are possible. By representing the operation as a full unitary with three degrees of freedom, the compiler can fold several rotations into one and hand the synthesizer a single richer target, which demonstrably needs fewer T gates than the sum of its parts. Using a more expressive representation of the computation to compile it more efficiently, rather than being trapped by a narrow primitive, is the same lever the work on efficient compilation for ququarts exploiting a richer information unit covered elsewhere on this site pulls, getting more done per costly resource by widening the representation. trasyn widens the representation from single-axis rotations to arbitrary unitaries, which is what lets the merge-and-synthesize-once strategy pay off.

Trade a little approximation error for a large drop in cost, and control that trade. Because the fault-tolerant gate set is discrete, every rotation is only approximated, so synthesis is inherently a trade between how close you get and how many T gates you spend. trasyn’s error-aware tensor-network sampling navigates this trade directly, and the paper identifies the optimal synthesis-error threshold given a target logical error rate, so it approximates just accurately enough for the surrounding error correction and no more, spending no T gates on excess precision. Deliberately accepting a small, controlled amount of approximation to win a large resource saving is the same principle the work on systematically approximating quantum circuits for higher output fidelity covered elsewhere on this site is built on, treating approximation as a tunable knob rather than a defect. trasyn tunes it at the synthesis level, matching the synthesis error to what the fault-tolerant layer actually needs.

Following a unitary through trasyn

Turning a fused single-qubit unitary into a low-T gate sequence

A trace, drawn from the paper, of how trasyn synthesizes one arbitrary single-qubit unitary for a fault-tolerant machine.

Step 1 of 5

Fuse adjacent rotations into one U3 unitary

In the circuit, several adjacent single-qubit rotations along different axes are algebraically combined into a single arbitrary unitary, U3, using the U3 intermediate representation. What was several rotations is now one operation to synthesize.

Merging first is what avoids paying for three separate Rz syntheses.

Why it works

  • One unitary costs less than three rotations. Splitting an arbitrary unitary into three Rz rotations triples the synthesis work → but synthesizing the fused unitary directly pays once → so the T count drops toward what a single rich operation actually requires.
  • Merging rotations first creates the opportunity. Kept as separate Rz gates, adjacent rotations cannot be optimized together → but a U3 representation fuses them into one unitary before synthesis → so there are fewer, richer targets and fewer total gates to approximate.
  • Tensor networks scale the search past brute force. Exhaustive search finds optimal sequences only up to about fifteen T gates → but a matrix product state built from precomputed blocks reaches thirty and more → so trasyn attains the low errors practical fault tolerance needs.
  • Error-aware sampling finds good sequences efficiently. Searching the sequence space blindly is hopeless at scale → but treating distance-to-target as a sampling probability steers toward close sequences → so trasyn gets accuracy and efficiency together, and on a GPU.
  • Matching accuracy to the code avoids wasted T gates. Over-synthesizing spends T gates on precision the error correction ignores → but choosing the optimal synthesis-error threshold approximates just enough → so no T gates are burned on excess accuracy.

What it costs (trade-offs and scope)

  • It targets single-qubit unitary synthesis. trasyn synthesizes arbitrary single-qubit unitaries into the fault-tolerant gate set; multi-qubit synthesis and the broader compilation pipeline are outside its core, and its gains apply to the (very common) rotation-synthesis part of the cost, not every source of T gates.
  • The gains depend on rotations being mergeable. The U3 representation pays off when adjacent rotations can be fused; circuits already dominated by isolated, unmergeable rotations offer less to combine, so the improvement over per-Rz synthesis shrinks toward the direct-synthesis benefit alone.
  • It is an approximate synthesis, tuned to a target error. Like all discrete synthesis, trasyn only approximates each unitary, and its efficiency comes partly from synthesizing to a chosen error threshold; that threshold must be set correctly for the logical error rate, and a mis-set threshold trades either accuracy or T count.
  • The reported numbers are versus specific baselines and benchmarks. The up to 3.5 times T-count reduction, 7 times Clifford reduction, 4 times infidelity improvement, and 3.7 times T reduction on random unitaries are measured against gridsynth (and Synthetiq) on 187 circuit benchmarks and 1000 random unitaries; other circuits, gate sets, and accuracy targets would shift them.
  • It adds a heavier synthesis computation. Tensor-network search with sampling is more involved than a closed-form per-Rz routine; the paper makes it practical and GPU-accelerable, but it is a more computationally intensive compile-time step than gridsynth, traded for far cheaper resulting circuits.

The evaluation

Synthesizing arbitrary single-qubit unitaries for fault-tolerant machines

Propertygridsynth (per-Rz)Brute force / Synthetiqtrasyn
Unit of synthesis
Merges adjacent rotations
Scales to practical accuracy
GPU-accelerable
Reported outcome
A qualitative comparison of single-qubit synthesis methods. Across 187 benchmarks, trasyn reduces the T count by up to 3.5 times and Clifford gates by 7 times versus gridsynth-based synthesis, improving overall circuit infidelity by up to 4 times, and cuts T count by 3.7 times on 1000 random single-qubit unitaries at similar accuracy.Underlined values explain themselves when clicked.

Check yourself

Check your understanding

  1. 1. Why does the T count dominate the cost of a fault-tolerant quantum algorithm?

  2. 2. Why does the standard tool gridsynth waste T gates on an arbitrary single-qubit unitary?

  3. 3. How does trasyn synthesize an arbitrary unitary directly and at scale?

  4. 4. What did trasyn achieve, and what are its main caveats?

Sources

The paper is “Reducing T Gates with Unitary Synthesis” by Tianyi Hao, Amanda Xu, and Swamit Tannu (University of Wisconsin-Madison), published at ASPLOS 2026 (Volume 2), DOI 10.1145/3779212.3790210. The system is named trasyn (Tensor-based Arbitrary unitary Synthesis). It is licensed CC BY.

This explainer is written from the paper’s full text (arXiv:2503.15843). The paper addresses the cost of fault-tolerant quantum computing, where the discrete gate set of Clifford gates plus the T gate makes T gates expensive due to magic state distillation, so the resource cost is estimated by T count; arbitrary single-qubit rotations (Rx, Rz) must be decomposed into T-and-Clifford sequences, and existing synthesis methods like gridsynth handle one Rz at a time, so a fused arbitrary unitary (U3) decomposed into three Rz rotations incurs a threefold increase in T count. trasyn directly synthesizes arbitrary single-qubit unitaries: it uses a U3 intermediate representation to merge adjacent rotations before synthesis, and a tensor-network-based search that builds a matrix product state from precomputed sequence building blocks and performs error-aware sampling — incorporating the target unitary and interpreting the distance to the target as a sampling probability — enabling native U3 synthesis that scales far beyond brute force and is amenable to GPU acceleration. The reported results are the paper’s own: compared with gridsynth-based synthesis over 187 representative benchmarks, up to a 3.5 times reduction in T count, a 7 times reduction in Clifford gates, and up to a 4 times improvement in overall circuit infidelity; and a 3.7 times reduction in T count on 1000 random single-qubit unitaries at similar approximation error, outscaling brute-force and Synthetiq. The paper also identifies the optimal synthesis-error threshold for a given logical error rate. No numbers beyond the paper’s own have been introduced; exact algorithms, the tensor-network construction, and the full evaluation should be confirmed in the paper.

Related papers on Quantum Computing

See all 51 →