Shuntaro Yamamoto, Nobuyuki Yoshioka (Apr 24 2026).
Abstract: We present pygridsynth, an open-source Python library for ancilla-free approximate Clifford+
T synthesis that runs in
O(log(1/ϵ)) for precision
ϵ. For
n=1,2 qubits, the library builds upon established efficient and high-precision synthesis routines, such as nearly optimal
Z-rotation synthesis and magnitude approximation. For
n≥3 qubits, we introduce a partial-decomposition technique that generalizes the magnitude approximation, reducing constant factors in the
T-count as
(821⋅4n−29⋅2n+9)log2(1/ϵ)+o(log(1/ϵ)). The package also exposes a mixed-synthesis workflow that approximates target unitary channels by probabilistic mixtures of Clifford+
T circuits, for which we empirically find that the synthesis error is reduced from
ϵ to
ϵ2/(2n). Taken together, these features make pygridsynth a Python-native platform for high-precision Clifford
+T synthesis and for benchmarking unitary and mixed synthesis strategies on multi-qubit instances.