Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

From two XORs to an exact worst-case gate count

Suppose a quantum operation changes the phase of each binary input and treats every input just like its bitwise complement. How many controlled bit flips must a circuit use? Haobo Ma and Wenlin Zhang exhibit a specific difficult target and prove that on quantum wires some targets require at least

CNOT gates. X. Huang, T. Kosugi, H. Nishi and Y.-i. Matsushita had already given a construction with this count for every target in the class in 2024. Together the results determine the exact worst-case count, settling their Section 6 conjecture. The crucial cost is not just producing useful intermediate values: the circuit must also restore the original bit labels.

This reading explains version 4 of the paper. We start with two bits, then follow the proof through forcing labels, creating them, and returning the wires. The next chapter contains the precise statements and complete argument.

What is a phase, and why build a circuit?

Start with the four ordinary two-bit inputs . A quantum state assigns a complex amplitude to each input. Picture its phase as the direction of an arrow in the plane. Multiplication by turns the arrow through a quarter circle. A diagonal operation does not exchange and : it multiplies each input’s amplitude by a prescribed phase. Relative turns can affect subsequent interference, so these phases matter.

The paper’s target is simple: multiply the all-zero and all-one inputs by , and every other input by . For two bits its table is

InputPhase

Complementing every bit exchanges with , and with , leaving the table unchanged. This is reflection symmetry here; it does not refer to rotating an object in space.

We have two tools. A CNOT preserves its control bit and changes its target bit to . The symbol means exclusive-or: equal bits give zero and different bits give one. A single-wire rotation multiplies zero by and one by . Angles are arbitrary real numbers; the cost counts CNOTs alone.

Implementation must be exact, allowing a common overall phase for all inputs. There are no extra qubits, measurements, approximations or other gates. Any two distinct wires can interact. Changing these rules changes the optimization problem.

Two bits: compute XOR, use it, and undo it

Use the first bit to control the second, so the second wire holds . Apply there, then repeat the same CNOT to restore . Equal inputs have XOR zero and receive ; unequal inputs receive . These are precisely the table’s entries multiplied by the common factor . Two CNOTs suffice, and the lower bound is exactly two.

The second CNOT matters. Leaving the XOR on the wire would change the input string, violating the diagonal target. On more wires, restoration still has a cost, but explaining that cost requires more careful counting.

Each wire carries a label

Write the bit on each wire as the XOR of a subset of the original inputs. For example, label means , and means . Four wires start with labels .

A CNOT replaces its target label by the XOR of target and control labels. A rotation changes phase without changing a label. A label is even or odd according to its number of ones. Initially every label is odd. Since CNOT is reversible, the labels always describe an invertible binary linear transformation, so none is zero. A diagonal target forces the final labels back to their original unit labels.

Which labels must appear when a rotation is applied?

A phase ratio forces every nonzero even label

Fix a nonzero label . Split the input strings by , meaning the XOR of the selected bits. Multiply the target phases with XOR zero and divide by the product of phases with XOR one. Call this ratio .

The ratio detects a chosen label. An overall phase occurs equally often above and below the fraction, so it cancels. A rotation using a different nonzero label also cancels: pair inputs with the same parity and opposite parity. The next chapter proves the cancellation lemma by constructing this pairing.

For the difficult target and any nonzero even , both the all-zero and all-one strings have parity zero. They contribute to the numerator; every other phase is one. If the circuit never rotates on label , every factor cancels and the ratio must instead be one. Contradiction! Thus every nonzero even label must occur on a rotated wire.

We multiply and divide complex numbers directly, without choosing real angles for their phases. Adding whole turns to an angle cannot evade this argument.

Why is there an extra linear term?

Put . There are even labels: choose the first bits freely, and the last bit is determined by parity. Removing zero leaves labels. None is present initially, so its first appearance must be a CNOT output. A CNOT creates just one target label. This gives at least that many even-output gates.

Call an odd-target, odd-control update a birth: it produces an even target. Every even label ever produced is an XOR combination of birth outputs. An even-plus-even update stays among these combinations; odd-plus-odd introduces a birth; a mixed update produces an odd label. Why independent directions? For each with , flip coordinate together with the last coordinate. XOR combinations of these even labels produce every even label. Looking at the first coordinates uniquely determines which flips were used. Thus there are independent directions, requiring at least births.

Now count the even labels currently on wires. A birth increases the count by one. An even-target, odd-control update decreases it by one; call this a return. The other two types leave it unchanged. The count starts and ends at zero, so returns equal births and number at least . Returns have odd outputs, separate from the even-output gates already counted. Hence

On four wires the six weight-two labels and make seven required nonzero even labels. At least three returns bring the total to ten. Counting just the six pairwise relations misses the four-bit label that this target also forces.

The short film connects the phase ratio, label creation and return count.

Film 001 · Why parity labels must return · 2:56

Why does visiting every even label leave a further restoration cost? English narration with aligned Chinese and English subtitles.

What does the answer tell us?

Huang and colleagues supply the upper bound, and the present paper supplies a target meeting it from below. Thus the largest, over targets, of the minimum circuit counts is exactly the formula. Individual targets can be easy: the identity needs zero gates. Optimal depth is a separate question, since disjoint gates may run in parallel.

Replacing by gives the full complement-symmetric class’s exact worst-case count on wires. Huang and colleagues’ radial interaction-potential family obeys additional restrictions. The difficult target has not been shown to belong to that narrower physical family, so this argument does not establish its matching lower bound.

Evidence and sources distinguish the existential lower bound stated by the public Lean theorem, the explicit target used inside its proof, and the public interfaces or upper-bound formalization still needed. Small finite searches are also separated from the all-parameter proof.

The academic presentation follows the same argument, with full speaker notes.