OAI/Computability/QuantumFactoring/Basic.lean
27 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.ExactQuantumFactoring.Primitiveline 12Source documentation
The five primitive gates exactly as in Section 2.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:12 (same declaration text).
inductive Primitive where …
- def
OAI.ExactQuantumFactoring.Primitive.arityline 16Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:16 (same declaration text).
- def
OAI.ExactQuantumFactoring.Primitive.codeline 21Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:21 (same declaration text).
- structure
OAI.ExactQuantumFactoring.Gateline 26Source documentation
An inverse and/or one added control. This is a fixed set of 20 gate names, not an unbounded-control or arbitrary-angle gate model.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:26 (same declaration text).
structure Gate where …
- def
OAI.ExactQuantumFactoring.Gate.arityline 32Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:32 (same declaration text).
- def
OAI.ExactQuantumFactoring.Primitive.matrixline 36Source documentation
Matrix entries are indexed by lists in wire order (row first, column second). Entries on ill-sized lists are irrelevant and set to zero.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:36 (same declaration text).
noncomputable def Primitive.matrix : Primitive → List Bool → List Bool → ℂ | .not, [a], [b] => if a = !b then 1 else 0 | .cnot, [a,b], [c,d] => if a = c ∧ b = Bool.xor c d then 1 else 0 | .toffoli, [a,b,c], [d,e,f] => if a = d ∧ b = e ∧ c = Bool.xor f (d && e) then 1 else 0 | .hadamard, [a], [b] => (if a && b then -1 else 1) / (Real.sqrt 2 : ℂ) | .phase, [a], [b] => if a = b then (if b then Complex.I else 1) else 0 | _, _, _ => 0Mentions: OAI.ExactQuantumFactoring.Primitive
- def
OAI.ExactQuantumFactoring.Gate.baseMatrixline 46Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:46 (same declaration text).
- def
OAI.ExactQuantumFactoring.Gate.matrixline 49Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:49 (same declaration text).
- structure
OAI.ExactQuantumFactoring.Instructionline 59Source documentation
A primitive is placed on distinct actual wires, with no operation of unbounded arity hidden in a circuit instruction.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:59 (same declaration text).
structure Instruction (q : ℕ) where …
- abbrev
OAI.ExactQuantumFactoring.Basisline 64Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:64 (same declaration text).
- abbrev
OAI.ExactQuantumFactoring.Stateline 65Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:65 (same declaration text).
- def
OAI.ExactQuantumFactoring.Instruction.matrixline 67Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:67 (same declaration text).
- structure
OAI.ExactQuantumFactoring.Circuitline 75Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:75 (same declaration text).
- def
OAI.ExactQuantumFactoring.Circuit.applyline 79Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:79 (same declaration text).
- def
OAI.ExactQuantumFactoring.inputBasisline 83Source documentation
Input wires are first, least significant bit first; all other wires start zero.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:83 (same declaration text).
def inputBasis (q ℓ N : ℕ) : Basis q := …
Mentions: OAI.ExactQuantumFactoring.Basis
- def
OAI.ExactQuantumFactoring.Circuit.outputStateline 86Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:86 (same declaration text).
- def
OAI.ExactQuantumFactoring.paddedLengthline 91Source documentation
The cutoff and padding are the standing parameters in Section 2.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:91 (same declaration text).
def paddedLength (ℓ : ℕ) : ℕ := max 128 ℓ
- def
OAI.ExactQuantumFactoring.readBitline 93Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:93 (same declaration text).
- def
OAI.ExactQuantumFactoring.outputListline 97Source documentation
n entries of n bits each, in the n² wires immediately after the input.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:97 (same declaration text).
def outputList {q : ℕ} (ℓ : ℕ) (x : Basis q) : List ℕ := …Mentions: OAI.ExactQuantumFactoring.Basis
- def
OAI.ExactQuantumFactoring.CorrectEncodingline 104Source documentation
Complete nondecreasing prime factorization, multiplicities included, padded by zeros, as in Section 6. There is no primality oracle in the circuit.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:104 (same declaration text).
def CorrectEncoding (N n : ℕ) (xs : List ℕ) : Prop := …
- def
OAI.ExactQuantumFactoring.Circuit.correctProbabilityline 110Source documentation
Unnormalized Born sum on correct outputs; success is exactly one, not positivity, postselection, or a limiting high probability.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:110 (same declaration text).
noncomputable def Circuit.correctProbability (c : Circuit) (ℓ N : ℕ) : ℝ := by …
Mentions: OAI.ExactQuantumFactoring.Circuit
- def
OAI.ExactQuantumFactoring.natWordline 118Source documentation
Unary natural words with delimiters make the circuit description explicit. Unary wire addresses cause at most polynomial overhead when width is polynomial.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:118 (same declaration text).
def natWord (k : ℕ) : List Bool := List.replicate k true ++ [false]
- def
OAI.ExactQuantumFactoring.Instruction.encodeline 120Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:120 (same declaration text).
- def
OAI.ExactQuantumFactoring.Circuit.encodeline 124Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:124 (same declaration text).
- def
OAI.ExactQuantumFactoring.Uniformline 131Source documentation
A single finite-alphabet classical generator receives only the INPUT LENGTH. All stack alphabets, states and labels are finite: no large-integer unit-cost oracle is hidden in TM2 push/branch functions.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:131 (same declaration text).
def Uniform (family : ℕ → Circuit) : Prop := …
Mentions: OAI.ExactQuantumFactoring.Circuit
- def
OAI.ExactQuantumFactoring.PolynomialResourcesline 136Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:136 (same declaration text).
- def
OAI.ExactQuantumFactoring.MainTheoremline 143Source documentation
Literal main endpoint: one length-uniform family, exact output for EVERY binary integer N≥2, and worst-case polynomial gates AND qubits.
Also declared: ComparatorChallenges/ExactQuantumFactoring.lean:143 (same declaration text).
def MainTheorem : Prop := …