Quantum and CircuitsReading edition

The exact weight-two benchmark

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

4.2 The exact weight-two benchmark

4.2.1 Purpose and status

The benchmark record compares a full state-vector simulator with a simulator restricted to the exact weight-two packet. Both use the same local gate arithmetic. The benchmark is not a hardware claim and not a universal performance model. It shows that the exact dimension reduction can translate into large memory and repeated-application gains in an ordinary implementation.

Recorded computation

At \(n=20\), the full state has \(1{,}048{,}576\) amplitudes and the exact weight-two packet has \(190\). The archived repeated-application gain is \(958.8\), the one-shot gain is \(54.8\), and the amplitude-memory ratio is \(5518.8\). The recorded relative reconstruction error is zero at the displayed precision.

4.2.2 Recorded table

Recorded exact-weight-two benchmark.
\(n\)full dim.packet dim.apply gainone-shot gainmemory gainrel. error
8256281.111.649.140
101,024451.512.0222.80
124,096662.953.9862.10
1416,384918.5511.0180.00
1665,53612033.036.9546.10
18262,144153131.339.11,713.40
201,048,576190958.854.85,518.80

4.2.3 What is machine independent

The dimension identity

\[ \frac{2^n}{\binom n2} \]

is independent of implementation. It predicts an exponential memory advantage for fixed \(k=2\). The measured runtime ratio need not equal the dimension ratio. Packet indexing, compilation, sparse update kernels, allocation, and cache behavior determine the constant factors.

4.2.4 Repeated application versus one shot

Let \(C_{\rm compile}\) be the cost of constructing the packet basis and restricted gate plans, and let \(C_{\rm apply}\) be one packet application. Reusing the compiled plan \(R\) times costs

\[ C_{\rm packet}(R) = C_{\rm compile}+RC_{\rm apply}. \]

If the full path costs \(RC_{\rm full}\), the packet method breaks even when

\[ R> \frac{C_{\rm compile}} {C_{\rm full}-C_{\rm apply}}. \]

This is why time evolution, parameter sweeps, variational loops, and repeated likelihood evaluations are natural applications.

Recorded runtime and memory gains for the exact-weight-two packet.
Figure 4.2. Recorded runtime and memory gains for the exact-weight-two packet.

View full-size figure (new tab)

4.2.5 Independent reconstruction check

The release code generates a random packet state, embeds it in the full Hilbert space, applies the same \(R_Z\) and exchange gates through both arithmetic paths, and compares the final states. The representative checks at \((n,k)=(6,1),(8,2),(10,2)\) produce errors near machine precision.

Scope.

The recorded benchmark supports exactness and implementation value for a symmetry-preserving subclass. It does not show that generic quantum circuits admit comparable reductions.

Source and conversion record

Source SHA-256: ebaee84823d3aaef001d43588d779e3f10d7336de3194c466e8e8121bfb460f1

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