Quantum and CircuitsReading edition

All functions on at most three inputs

Reading tools
Reading libraryFind statementsInspect Lean
Switch work

Saved reading

Read side by side

Start reading

Resources & source

Original TeX with line links · Download TeX

The wording and mathematics follow the retained manuscript. This reading format does not add a proof review or extend Lean coverage.

Skip contents and start reading

16.3 All functions on at most three inputs

Theorem 16.5: Exact small restored-oracle calibration

For every Boolean function on one, two, or three logical inputs, the bound in Theorem 15.3 is attained by an explicit restored implementation. The optimum Toffoli counts are zero for affine functions, one for nonaffine quadratics, and three for three-input cubics.

Proof

An affine function is added to the target using only NOT and CNOT gates, so its optimum is zero.

A nonaffine quadratic on at most three variables has an alternating polar matrix of rank two. In suitable invertible linear coordinates, its quadratic part is a product of two linear forms; the remaining part is affine. A single Toffoli, together with affine preparation and restoration, computes the oracle. The degree bound requires at least one.

A cubic on three variables has the form

\[ x_1x_2x_3+q(x)+\ell(x), \]

with \(q\) quadratic and \(\ell\) affine. Translating \(x_i\mapsto x_i+c_i\) adjusts independently the coefficients of \(x_jx_k\), so all quadratic terms can be cancelled. The resulting function is a three-variable monomial plus an affine function. Affine input changes and affine output additions cost no Toffolis. Corollary 15.7 gives both the lower bound three and a matching restored construction.

There are \(4+16+256=276\) functions over the three input sizes. The distribution is

\[ \begin{array}{c|rrr} \text{Optimum Toffolis}&0&1&3\\\hline \text{Number of functions}&28&120&128. \end{array} \]

The source constructs and checks the actual circuits. Optimality is obtained from the written lower bounds and matching constructions, not from exhaustive enumeration of all reversible circuits.

Source and conversion record

Source SHA-256: d4ac05f793c2c04fc6b50c38e0f7e9a44269c2dc948f255a60b5edeecb2f7e4e

Unsupported prose commands stop the build. The mathematical expression sequence is checked against the source, with manuscript macros expanded for display.

Conversion records

Notation in Quantum and Circuits

Look up a symbol without leaving this chapter. Select text before opening help to search for it.

Search this work’s notation.

    Symbols can have different meanings in different passages. Read each result in its own context.

    Open the full notation index