TRANSMISSION // 2611.12049v1

Checking quantum circuit generators beyond a handful of sizes

Source published

A preprint describes a way to compare restricted classes of quantum circuit generators across all valid sizes and bit strings. Tests found deliberately inserted errors beyond fixed-size checks, but limited code coverage and computational costs constrain its reach.

A program that builds correct quantum circuits for small numbers of qubits can still fail when the register grows. Pavel Chuklanov proposes checking entire circuit families rather than just selected examples—provided their generating programs follow a restricted structure.

Why small tests are not enough

Quantum algorithms often come as families of circuits. A generator takes the number of qubits, and sometimes a classical bit string, and builds the corresponding circuit. Comparing its output with a trusted reference at a few sizes does not establish that the two programs agree everywhere.

Pavel Chuklanov of the Moscow Institute of Physics and Technology addresses this problem in a preprint submitted to arXiv on November 9, 2026. The work presents mathematical results and a Python implementation for a restricted class called ladder programs. The supplied publication record does not establish peer review.

The paper illustrates the testing gap with a deliberately constructed error: an extra loop that starts acting only when the number of working qubits exceeds 20. Every smaller circuit agrees with the reference. At larger sizes, particular bit strings trigger a difference. No test confined to those smaller sizes can expose it.

One finite description for an entire family

Ladder programs contain fixed circuit segments and loops whose gates act on a window of constant width moving through the register. Loop bodies may also interact with fixed qubits near its ends. Gate angles must be fixed rational multiples of pi, not expressions that change with circuit size or the loop counter.

For these programs, Chuklanov proves that above a computable size threshold, the circuit family has a finite representation whose dimension does not increase with the number of qubits. This representation is a uniform matrix product operator: a structured description of the circuits’ matrices assembled from repeated local components.

The same representation can be expressed as a weighted automaton, a finite mathematical system that assigns numerical values to sequences of symbols. Here, each symbol records a classical parameter bit and the input and output basis bits for one qubit. Reading a longer sequence describes a larger circuit, while retaining the same finite machinery.

Comparing two generators then becomes a question about their difference: does the corresponding automaton assign zero to every relevant sequence? Linear algebra can answer that question without enumerating every circuit size. Sizes below the threshold are checked separately using circuit matrices.

What counts as equivalent?

The method supports six comparisons. These distinguish agreement of the complete circuit matrices, agreement only of states prepared from an all-zero input, and agreement of the action on working qubits when auxiliary qubits are restored to zero. Each comparison can require exact equality or allow a global phase—a common phase factor that is unobservable.

Those distinctions matter. Two circuits can prepare the same state from zero yet behave differently on other inputs. Auxiliary qubits, also called ancillas, introduce another requirement: they must finish in the prescribed zero state for the relevant comparison.

To keep arithmetic manageable, the implementation calculates modulo primes, working with remainders instead of growing symbolic coefficients. A nonzero difference found this way establishes a genuine discrepancy. However, a particular prime can hide a nonzero value.

The algorithm therefore uses either an exact plan with enough primes to rule out that possibility, or a randomized plan with an error analysis. The randomized guarantee assumes independent, uniformly selected primes. The paper also distinguishes a proved probability bound under stated conditions from a bound computed using estimated dimensions when those conditions are not established. The implementation can return “no answer” rather than claim equality.

What the experiments found

The author-built benchmark contained 2,200 reference–candidate pairs, including 483 equal pairs and 1,717 faulty ones. The implementation gave conclusive answers on 1,876 pairs and produced no incorrect verdicts against the benchmark’s ground truth.

It confirmed equality on 444 equal pairs, with a median runtime of 0.29 seconds. Of these, 220 used the exact plan; 224 used the probabilistic plan and reported computed bounds no greater than 2 to the power of minus 40.

It also detected 139 of 172 inserted errors appearing only beyond 20 working qubits. Importantly, those errors were constructed to evade checks limited to 20 qubits. Most counterexamples across the whole benchmark came from a preliminary small-instance search; the automata supplied the advantage for larger-size failures.

A restricted, not universal, verifier

Applicability remains narrow. Outside the main benchmark, the translator accepted 40 of 216 size-parameterized functions. Some refusals reflected unsupported Python syntax; others reflected circuit families outside the mathematical class, including the exact quantum Fourier transform.

Automaton dimensions can grow exponentially with structural features of a program. Checking sizes below the threshold can also become prohibitively expensive. The implementation was tested, not formally proved correct, and the benchmark largely used single code mutations designed by the author.

The result is therefore a specific advance: whole-family checking for a defined class of generators, not a general guarantee for quantum software.