Engine 1 of 2

Exact quantum circuit verifier

Everything below runs in your browser. Circuit matrices are built by exact multiplication over the ring Z[omega][1/sqrt(2)] with omega = e^(i*pi/4), using BigInt coefficients throughout. There is no tolerance parameter in this page because there is nowhere to put one: two matrix entries are either the same canonical quadruple of integers or they are not.

If the vocabulary here is unfamiliar, Start Here explains what a circuit and a proof are in plain language first. For the ring theory, see the documentation.


Presets

Five of these are correct and three fail on purpose. Load a failing one to see what rejection looks like.

Why this one matters

This is the headline result. Fifteen gates reduce to the same 8x8 permutation matrix as a single CCX, entry for entry, with no tolerance anywhere. Seven T gates is also known to be optimal for Toffoli over Clifford+T.

Circuit source

Declare the width with qubits N (N up to 8), then one gate per line. Qubit 0 is the most significant bit of a basis index. # starts a comment.

Gate palette

Clicking appends the gate on qubits 0, 1, 2 as needed. Edit the indices afterwards.

Claims to decide

OnPropositionMeaning
the circuit is norm preserving
the circuit is semantically a no-op
running it twice is the identity
the gate-by-gate adjoint undoes it
no superposition, no phase
equal to the comparison circuit below
commutes with the comparison circuit
equal superposition over the listed states

Comparison circuit V

Used by the equality and commutation claims. Ignored otherwise.

Target basis states

Whitespace separated binary strings for the uniform superposition claim, e.g. 00 11.

Result

method exact-cyclotomic-Z[omega][1/sqrt2] qubits 3 gates 15 depth 11 T-count 7 claims 3/3 discharged VERDICT VERIFIED

Claim by claim

ResultPropositionDetail
[PASS]U†U = IThe 8x8 matrix is exactly unitary: every inner product of columns evaluates to a ring element equal to 0 or 1 with no rounding.
[PASS]U is a permutation matrixThe circuit permutes computational basis states, so it denotes a classical reversible Boolean function.
[PASS]U = V (V = V)The two circuits denote the identical unitary, entry for entry, on the nose.

State vector of C|0...0>

Amplitudes are exact ring elements. The floating point columns are rendered for reading only; nothing in the verdict above depends on them.

basisindexamplitude (exact)reimprobability
|000>011.0000000.0000001.000000
|001>100.0000000.0000000.000000
|010>200.0000000.0000000.000000
|011>300.0000000.0000000.000000
|100>400.0000000.0000000.000000
|101>500.0000000.0000000.000000
|110>600.0000000.0000000.000000
|111>700.0000000.0000000.000000

Unitary matrix

01234567
010000000
101000000
200100000
300010000
400001000
500000100
600000001
700000010

Artifact digest

SHA-256 of the canonical JSON of the circuit, the claim outcomes, the verdict and every exact matrix entry. Reword the prose and the digest is unchanged; change one gate and it is completely different. These 32 bytes are what the Solana program would store.

computing...

Take this digest to the registry


What this verifier cannot do

Full limitations