FAILURE MAP
← Case archive

FA-91162 / Quantum circuit simulation / Member archive

QFT adds a controlled phase of a qubit with itself · case 02

Every qubit gets an extra Z after its Hadamard, negating half of the spectrum.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Input [n, j, inverse]. Build the textbook QFT on n qubits (qubit 0 = LSB): for q from n-1 down to 0 apply H(q) then CP(pi / 2**(q-k)) between q and each k < q (k descending), then swap q with n-1-q for q < n//2; the inverse is the reversed sequence with negated phases. Apply it to |j> and return the amplitudes as [re, im] rounded to 6 decimals (QFT|j> = sum_k e^{2 pi i jk/N}|k>/sqrt N).

Why this case matters

QFT circuits are the core of phase estimation and arithmetic; decomposition slips produce bit-reversed or dephased spectra.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: qft n=2 j=0[[0.5, 0.0], [-0.5, 0.0], [-0.5, 0.0], [0.5, 0.0]][[0.5, 0.0], [0.5, 0.0], [0.5, 0.0], [0.5, 0.0]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗