Inspiration

Our project was inspired by how difficult it is to make arbitrary rotation approximations for a single qubit. Simple rotations such as $R_z(\pi/2)$ and $R_z(\pi/4)$ can be represented exactly with Clifford gates, but angles like $R_z(\pi/8)$ require much longer gate sequences. We wanted to understand how these rotations are synthesized and why $T$ gates become so expensive.

What We Learned

We learned that quantum gates are not equally expensive. Gates such as $H$, $S$, and $CNOT$ are relatively cheap, while $T$ gates require much more overhead. As synthesis becomes more accurate, the number of required gates increases quickly.

We also learned that fault-tolerant $T$ gates are especially expensive because they require distillation and additional encoding. Even though $T$ is a single-qubit gate, it can be more costly than a two-qubit gate like $CNOT$.

Our search algorithm used the cost function:

$$ f = s + w \cdot d $$

where $s$ is the distance from the start state, $d$ is the distance to the target angle, and $w$ is a weight for the next gate choice.

How We Built the Project

We treated gate synthesis as a search problem. Brute force approaches like breadth-first search quickly became inefficient because they often repeated equivalent gate sequences.

To improve this, we built an A*-style search algorithm that found combinations of $H$, $S$, and $T$ gates with low cost.

We also explored fault-tolerant synthesis using ancilla qubits and $T$-gate teleportation. Since the main qubit could not directly use a $T$ gate, we prepared an ancilla state:

$$ \ket{\psi} = \alpha \ket{0} + \beta \ket{1} $$

$$ \ket{T} = T\ket{+} $$

We then used $CNOT$, measurement, and correction gates to apply the effect of $T$. We also explored logical qubits using the Steane code.

Challenges We Faced

One challenge was that small changes in gate order could lead to very different qubit states, making brute force search inefficient.

Another underlying challenge was that longer sequences generated in pursuit of higher fidelity approximations of rotational-Z gates came at the expense of several T-gates, which are expensive to implement both physically but also in a fault-tolerant manner.

Built With

  • a*-style-search-algorithm
  • bloch-sphere-visualization
  • clifford+t
  • numpy
  • python
  • quantum-circuit-simulation
Share this project:

Updates