We introduce the cookie-cutter lifting procedure: a systematic method for determining whether a quantum algorithm requires magic (non-stabiliser resources) or whether its speedup is purely Clifford-level. The procedure writes any classical algorithm as an Origami ISA programme at the classical (β=0) level and identifies whether the quantum lifting requires the TWIST opcode—the ISA marker for non-Clifford C₃-level gates. Applied to Shor's algorithm (N=15, a=7): the ISA trace LABEL→FLIP→FLOP(U_f)→FLIP(QFT) has mana=0 along the pre-measurement branch; for this instance the period r=4 divides the register size 2ⁿ=16 exactly, so the QFT output is a stabiliser state on the zero-measurement branch. The speedup comes from exponential-weight stabiliser generators compressed by coherent cancellation, with no magic required on that branch. Applied to non-abelian hidden shift over D_N: mana=0 before the non-abelian QFT and mana>0 after, for all N≥3; the abelian cases D₁≅ℤ₂ and D₂=ℤ₂×ℤ₂ are the Clifford exceptions. The TWIST opcode fires because non-abelian D_N (N≥3) have 2-dimensional irreducible representations whose Fourier blocks lie outside C₂. We identify the eigenphase spectrum of the NAQFT as a basis-independent replacement for T-count. The results reveal two roads to quantum advantage: Clifford complexity (Shor) and magic (non-abelian hidden shift). Part of the Origami ISA series. Companion papers: 10.5281/zenodo.20955514 (ISA as PROP), 10.5281/zenodo.20956674 (nine normal forms), 10.5281/zenodo.20956685 (three-tier resource theory). Keywords: shor, clifford, lifting, qft, hidden-subgroup, naqft, twist, magic, mana, eigenphase, origami-isa, cookie-cutter, dihedral-group, stabiliser, wigner-function
We introduce the cookie-cutter lifting procedure: a systematic method for determining whether a quantum algorithm requires magic (non-stabiliser resources) or whether its speedup is purely Clifford-level. The procedure writes any classical algorithm as an Origami ISA programme at the classical (β=0) level and identifies whether the quantum lifting requires the TWIST opcode—the ISA marker for non-Clifford C₃-level gates. Applied to Shor's algorithm (N=15, a=7): the ISA trace LABEL→FLIP→FLOP(U_f)→FLIP(QFT) has mana=0 along the pre-measurement branch; for this instance the period r=4 divides the register size 2ⁿ=16 exactly, so the QFT output is a stabiliser state on the zero-measurement branch. The speedup comes from exponential-weight stabiliser generators compressed by coherent cancellation, with no magic required on that branch. Applied to non-abelian hidden shift over D_N: mana=0 before the non-abelian QFT and mana>0 after, for all N≥3; the abelian cases D₁≅ℤ₂ and D₂=ℤ₂×ℤ₂ are the Clifford exceptions. The TWIST opcode fires because non-abelian D_N (N≥3) have 2-dimensional irreducible representations whose Fourier blocks lie outside C₂. We identify the eigenphase spectrum of the NAQFT as a basis-independent replacement for T-count. The results reveal two roads to quantum advantage: Clifford complexity (Shor) and magic (non-abelian hidden shift). Part of the Origami ISA series. Companion papers: 10.5281/zenodo.20955514 (ISA as PROP), 10.5281/zenodo.20956674 (nine normal forms), 10.5281/zenodo.20956685 (three-tier resource theory). Keywords: shor, clifford, lifting, qft, hidden-subgroup, naqft, twist, magic, mana, eigenphase, origami-isa, cookie-cutter, dihedral-group, stabiliser, wigner-function
A phase-space census of the states arising in Shor's algorithm for thestandard textbook instance N=15, a=7, together with a contrasting analysisof the non-abelian hidden shift problem over dihedral groups. For N=15, a=7 the period r=4 divides the register size 2^n=16 exactly. Weshow by direct computation of the discrete Wigner function that the fullpre-measurement QFT output is therefore a stabiliser state, with zeronegative Wigner cells. This is an arithmetic property of the choseninstance rather than of Shor's algorithm in general, and it illustrates aknown hazard: N=15 is degenerate in ways that make small-scale factoringdemonstrations prove less than they appear (Smolin, Smith and Vargo, Nature499, 163 (2013)). Resolving the four post-measurement coset branches showswhere the negativity is: three of the four carry exactly 8 negative Wignercells each, while the zero-measurement branch remains stabiliser. Thespeedup on that branch comes from high-weight stabiliser generatorscompressed by coherent cancellation, not from non-stabiliser resources. For the non-abelian hidden shift over the dihedral group D_N, the Wignerfunction is non-negative before the non-abelian Fourier transform andacquires negativity after it, for all N >= 3. The abelian cases D_1 = Z_2and D_2 = Z_2 x Z_2 are the exceptions. The mechanism is representation-theoretic: D_N for N >= 3 has 2-dimensional irreducible representationswhose Fourier blocks do not normalise the Pauli group, and so lie outsidethe Clifford group. We propose the eigenphase spectrum of the non-abelianQFT as a basis-independent, group-theoretic diagnostic that avoids thequbit-padding artefacts affecting Wigner-based measures for non-dyadicgroups. Scope. All computations are exact numerics on the specific instancesstated. No general claim is made about the magic requirements of Shor'salgorithm at cryptographically relevant sizes, and the classificationframing of earlier versions has been withdrawn. Version note (2026-08): retitled and rescoped. The earlier version framedthis as a general "lifting procedure" for classifying arbitrary algorithms;that framing overstated what two worked instances support. Two companionpapers previously cited here have been withdrawn by the author, and theirreferences are removed. Quantities are reported as negative Wigner cellcounts, computed directly, rather than in the derived units used in thewithdrawn work. Part of the Origami ISA series. Companion papers: 10.5281/zenodo.20955514 (ISA as PROP), 10.5281/zenodo.20956674 (nine normal forms), 10.5281/zenodo.20956685 (three-tier resource theory). Keywords: shor, clifford, lifting, qft, hidden-subgroup, naqft, twist, magic, mana, eigenphase, origami-isa, cookie-cutter, dihedral-group, stabiliser, wigner-function
PENDING QUALITY AUDIT (2026-08). The file is restricted while this record is reviewed as part of a systematic audit of the author's corpus. It has not yet been assessed. Metadata and DOI remain public, and access can be requested. We complete the TRS trilogy — Origami (β→∞, tropical, classical), Forge (0<β<∞, real, statistical), Meld (β=it, complex, quantum) — by showing that the Meld ISA is the quantum circuit model expressed in the TRS semiring language. Three results follow. Result 1 (ISA completeness). The Clifford group equals the Meld ISA without the BIND opcode. Universal quantum computation equals Meld plus BIND. The T-gate T=diag(1,,eiπ/4) is the BIND opcode at j=21 — the Fano associator obstruction of Paper 407, applied to qubit representations. The magic-typing classification of Papers 365/366 maps exactly onto the 731-ISA opcode hierarchy: Clifford gates occupy Fano-line orbits (SPLIT/FLIP/TWIST at Clifford angles); the T-gate occupies the non-collinear Fano triple (BIND). Result 2 (Quantum algorithm factory). Every classical algorithm of the form argmaxg∈Gf(g) over an abelian group G has a C-MGE quantum counterpart C-MGE(f)=SPLITG⋅FLIP(f)⋅SPLAT, giving exponential speedup via quantum Fourier sampling whenever G is abelian and f has a hidden subgroup concentrating Fourier mass. Shor's algorithm decomposes into three ISA layers: Layer 1 (Origami — classical modular exponentiation), Layer 2 (Meld — QFT as SPLIT-TWIST-FLIP cascade), Layer 3 (Origami — measurement as tropical projection). "Frozen-Shor" (Origami ISA, β→∞) recovers classical exhaustive search at cost O(N). "Warm-Shor" (Forge ISA, real β) gives Grover-like O(N) thermal concentration. Full Shor (Meld, β=it) achieves O(logN) via destructive interference — a resource unavailable in either real ISA. New algorithm candidates follow by identifying the symmetry group of the target problem: equivariant ML, quantum persistent homology (Lloyd-Garnerone-Zanardi 2016), and Boson Sampling (Aaronson-Arkhipov 2011) all fit the five-step factory template. Result 3 (ML-KEM structural no-go). ML-KEM (Module-LWE) is immune because LWE noise exponentially suppresses every Fourier component: Ee∼Dσ[ei⟨ξ,e⟩]=e−∣ξ∣2σ2/2. No Fourier peak exists; SPLAT cannot extract a period. The deeper reason is that worst-case LWE reduces to the dihedral hidden subgroup problem (Regev 2002) — a non-abelian problem for which no efficient Meld program is known. Breaking ML-KEM would require a BIND opcode capable of distinguishing dihedral cosets, a capability not established for the current 731-Meld. The Hk complexity ladder (Paper 420) is realised by the trilogy: H0 (tree) = Origami, H1 (loop) = Forge/BPP, H2 (surface) = Meld/BQP. The T-gate is the H2 generator that lifts computation off the stabiliser submanifold into the curved interior of the Fisher information metric. Series: Paper 258 (Origami ISA) → Paper 419 (Forge ISA) → Paper 443 (⊕β semiring, six pairs) → Paper 453 (multi-sector Forge) → Paper 454 (this paper — Meld ISA, trilogy complete). Related identifiers (Cites) Paper 258 Origami ISA: doi:10.5281/zenodo.19916429 Paper 419 Forge ISA: doi:10.5281/zenodo.20694527 Paper 443 ⊕_β semiring: doi:10.5281/zenodo.20752384 Paper 407 Associamancy: doi:10.5281/zenodo.20702223 Paper 365 Fano Magic Factory: doi:10.5281/zenodo.20541583 Paper 366 CS Magic Composition: doi:10.5281/zenodo.20541665 Paper 445 Kitaev anyons: doi:10.5281/zenodo.20752352 Paper 453 Multi-sector Forge: doi:10.5281/zenodo.20773423 Paper 420 H^k complexity ladder: doi:10.5281/zenodo.20773526
PENDING QUALITY AUDIT (2026-08). The file is restricted while this record is reviewed as part of a systematic audit of the author's corpus. It has not yet been assessed. Metadata and DOI remain public, and access can be requested. A practitioner's primer for quantum computing researchers. No knowledge of octonions, sheaf theory, or category theory is assumed. Knowledge of stabiliser states, the Clifford group, and T-gates is assumed. The central message: the structure of the 3-qubit Pauli group is secretly governed by the Fano plane PG(2,2), and the Fano plane is the geometry of the 731 instruction set architecture (731 ISA) — a unified framework for quantum computation that organises every opcode as a Pachner move on a simplicial complex. The framework reveals three levels of quantum computational resource:• Level 0 (Clifford): stabiliser states; Gottesman-Knill simulable; the Fano lines are the free sector.• Level 1 (Standard magic): T-gates; Wigner function negativity; non-Clifford but accessible to the Origami ISA (regime 2).• Level 2 (Associamancy): the SPIN opcode; the Schur boundary; genuinely complex irreps of PSL(2,7); not accessible to any associative hardware. The Origami ISA (five opcodes: SPLIT, SPLAT, TWIST, FLIP, FLOP) subsumes Bell sampling, qudit stabiliser learning, and the abelian hidden subgroup problem as special cases. The 731 ISA adds SPIN and BIND, unlocking Level 2. This primer is a companion to "The Topology of Risk" (doi:10.5281/zenodo.20642983), which covers the same H⁰/H¹/H² framework applied to financial risk. Keywords: quantum computing, Fano plane, Origami ISA, 731 ISA, stabiliser states, magic states, associamancy, Schur boundary, primer, tutorial, hidden subgroup problem, MBQC, photonics
WITHDRAWN BY THE AUTHOR (2026-08-02). This record should not be cited. Fileshave been restricted. --- Why --- The paper proposes reading quantum resource theory syntactically, as a colouredproduct-and-permutation category (coloured PROP), with the Clifford-hierarchylevels C1/C2/C3 as colours and resource cost as the minimum C3-gate count in anormal form. Two of its load-bearing inputs have since been withdrawn, and oneof them carries an error that this paper inherits verbatim. 1. THE TOTAL-VARIATION GRADING IS BASED ON A SIGN ERROR. The paper defines"dark magic" as states that are non-stabiliser yet have zero Wigner negativityand total variation TV < 1, and states (Sec. 6) that TV(p) = 1 if and only if pis a free state. This is incorrect. For any quasi-probability distributionsumming to 1, the l1 norm satisfies Sum |W| >= 1 always, with equality exactlywhen W is non-negative. Direct computation: the stabiliser state |+> givesTV = 1.0000, and the magic state T|+> gives TV = 1.2071. The inequality runsthe other way, so the condition "TV < 1" describes the empty set and the"dark magic" tier as defined has no members. The source of this definition(a companion paper on magic resource theory) has been withdrawn for the samereason. Separately, TV as defined is exp(mana), a monotone reparameterisationof the established Wigner-negativity monotone of Veitch, Mari, Ferrie, Emersonand others, and was not compared against it. 2. THE WORKED EXAMPLES NO LONGER EXIST. Every worked example in the paper isone of the "9 magic orbit classes" of a companion paper that has since beenwithdrawn because its own experiment scripts did not reproduce its claims(printing FAILED for the orbit-inheritance theorem, and fidelity 0.000000against a claimed value of 1/4, with 8 classes printed where 9 were claimed).Two further companion papers cited for the rewrite-rule and normal-formresults have also been withdrawn. 3. NO COMPUTATIONS WERE PERFORMED. There is no experiment directory associatedwith this paper. --- What was not wrong --- The organising idea -- that a resource theory can be presented syntactically,with resource tier readable from a diagram -- is reasonable and is not thereason for withdrawal. But the specific cost measure proposed (minimum C3-gatecount) is T-count, a standard and well-studied quantity (Amy, Maslov and Mosca;Gosset, Kliuchnikov, Mosca and Russo, and subsequent work), and gradedcategorical presentations of Clifford+T are the subject of the ZX-calculuscompleteness literature (Jeandel, Perdrix and Vilmart 2018 and successors).Neither literature is engaged here. A future treatment would need to start fromthose. Readers wanting the correct treatment of the underlying physics should consultVeitch et al. on Wigner negativity and mana, Howard and Campbell on robustnessof magic, and the ZX-calculus completeness results cited above.
PENDING QUALITY AUDIT (2026-08). The file is restricted while this record is reviewed as part of a systematic audit of the author's corpus. It has not yet been assessed. Metadata and DOI remain public, and access can be requested. NOTICE (2026-08-04). This record uses a magic measure that has been shown to be incorrectly signed, and it should not be cited for quantitative magic claims. The "total variation" quantity TV = sum |W(u)| over the discrete Wigner function was used with the condition TV < 1 characterising non-stabiliser states. The inequality runs the other way. For any quasi-probability distribution summing to 1, the l1 norm satisfies sum |W| >= 1 always, with equality exactly when W is non-negative. Direct computation: the stabiliser state |+> gives TV = 1.0000 and the magic state T|+> gives TV = 1.2071. The condition "TV < 1" therefore describes the empty set, and any tier defined by it has no members. Separately, TV as defined is exp(mana) -- a monotone reparameterisation of the established Wigner-negativity monotone of Veitch, Mari, Ferrie and Emerson -- and was never compared against it. Readers should consult Veitch et al. on mana and Wigner negativity, Howard and Campbell on robustness of magic, Bravyi et al. on stabiliser extent, and Leone, Oliviero and Hamma on stabiliser Renyi entropy. NOTICE (2026-08-04). A verification this record's framework relies upon has been shown to be vacuous, and the identity it claimed to establish does not hold in the naive form. The naive pentagon identity FAILS for octonionic labels. Over all 7^4 = 2401 imaginary labelings, the two independent rebracketing paths from ((ab)c)d to a(b(cd)) disagree in 1176 cases (49%). Explicit counterexample: (a,b,c,d) = (1,1,2,4) gives +e6 on one path and -e6 on the other. The verification previously relied upon (the Pachner prover of 10.5281/zenodo.19713350) is vacuous: it defines w5 := w1*w2*w3*w4 and then checks w1*w2*w3*w4*w5 = +1, i.e. x*x = 1 for x in {+1,-1}. The identical test passes 4096/4096 on RANDOM SIGNS with no octonions involved. That script's own comment concedes the equation is "tautologically true". What this does NOT mean. Octonions are non-associative by definition, so rebracketing must be path-dependent and the naive pentagon cannot hold. That is the content, not a defect. A coherent non-associative calculus must supply the associator as explicit data satisfying its own coherence condition (Mac Lane), which is what Kuperberg's spiders (Comm. Math. Phys. 1996) provide for rank-2 groups. The structural framing is defensible; the verification was measuring the wrong thing. We recast the three foundational quantum information protocols — quantum teleportation, superdense coding, and the CHSH Bell test — in the language of the Origami Instruction Set Architecture (ISA), and then lift each to its TriQ (3-qubit GHZ) and 6-731 (broken-Fano-line) extensions. In the ISA reading, teleportation is SPLIT;SPLAT with a classical wire, superdense coding is FLIP;FLOP on a Bell pair encoding log2∣G∣ bits via the group G=Z22, and the CHSH violation is a hybrid H¹/H² computation: the Bell pair is a stabiliser (H¹) resource but the Tsirelson-optimal measurement applies a T-gate rotation (H², TWIST=1). We prove that the Tsirelson bound cos2(π/8) equals the total variation of any dark-magic (Tier 1) state in the ISA magic-type classification — the Tsirelson bound is the Wigner mass of the dark-magic sector. Lifting to the TriQ register introduces the ORBIT opcode, raises superdense coding capacity to 3 bits per qubit (log2∣Z23∣), and replaces the CHSH game with the Fano Line Verification Game whose win conditions are the ±1 values of the 6j symbol of Z23. The 6-731 extension (one Fano line weakened to coupling η) makes teleportation directed, reduces superdense capacity to 3−H(η) bits per qubit, and interpolates the Fano game win probability continuously between classical and quantum bounds. Remarkably, the same asymmetry parameter η is independently measurable by three methods — thermodynamic Carnot efficiency (Paper 325), information-theoretic channel capacity, and game-theoretic win probability — whose agreement constitutes a Pentagon-identity self-verification test for the hardware. We close with the Hk Bell tower: for each cohomological depth k there is a Bell-type inequality whose maximum quantum violation requires an Hk resource, providing a game-theoretic ladder that extends beyond CHSH through the Fano game (H²) to a conjectured G2-correlation game (H³) accessible only to the 731-ISA SPIN opcode.Appendix B provides side-by-side quantum circuit and ISA spider diagrams for all three baseline protocols. Keywords quantum teleportation, superdense coding, CHSH inequality, Bell test, Tsirelson bound, Origami ISA, H^k cohomology, stabiliser states, magic states, Fano plane, GHZ state, TriQ register, 6-731 architecture, ORBIT opcode, TWIST opcode, topological heat engine, dark magic, Wigner mass, Bell hierarchy, Mermin inequality, Pentagon equation, quantum nonlocality, quantum channel capacity, G2 correlations
Nonstabilizerness (magic) is the quantum resource that, together with stabilizer operations, makes universal quantum computation possible. However, quantifying nonstabilizerness is difficult. The standard measure sums over exponentially many Pauli operators, and for quantum codes no quantitative theory has been available. A structural observation removes this obstacle: the Clifford sector carries no magic and can be removed by a Clifford transformation, leaving an order-three object whose magic is an exactly evaluable fourth moment. Removing this inert background yields closed forms for several code families: a formula for all Dicke states, reducing a 100-qubit case from 4100 terms to a short binomial sum; a bound for cubic-phase codes (twisted quantum doubles and non-Abelian topological order), saturated only by the D4 code; and a cyclic/zero criterion for group multiplication states. For codeword-stabilized (CWS) codes, the companion paper \cite{Liu26arXiv} carries this reduction to its conclusion: the most magical codes are exactly the Sidon sets, and the nonstabilizerness bounds the code's transversal non-Clifford power. Together these results reduce the computation of nonstabilizerness for a broad class of codes to finite classical counting problems, and identify the maximally magical codes among them.