OAI/Computability/QuantumFactoring/BooleanProgram.lean
18 declarations, 0 contain sorry, 0 declared as axioms
- lemma
OAI.ExactQuantumFactoring.programMatrix_nilline 13 - lemma
OAI.ExactQuantumFactoring.programMatrix_consline 15 - lemma
OAI.ExactQuantumFactoring.programMatrix_singletonline 20 - inductive
OAI.ExactQuantumFactoring.BooleanOpline 27Source documentation
A Boolean node is implemented by at most two of the named fixed gates. The target is excluded from the sources, but repeated sources are permitted. Its action toggles the target, so the semantics are reversible on all states.
inductive BooleanOp (q : ℕ) (t : Fin q) where …
- def
OAI.ExactQuantumFactoring.BooleanOp.valueline 35 - def
OAI.ExactQuantumFactoring.BooleanOp.evalline 41 - def
OAI.ExactQuantumFactoring.BooleanOp.compileline 44 - lemma
OAI.ExactQuantumFactoring.BooleanOp.compile_lengthline 52 - lemma
OAI.ExactQuantumFactoring.BooleanOp.eval_atline 60 - lemma
OAI.ExactQuantumFactoring.BooleanOp.eval_awayline 63 - lemma
OAI.ExactQuantumFactoring.BooleanOp.eval_freshline 66 - lemma
OAI.ExactQuantumFactoring.BooleanOp.compile_basisline 70 - abbrev
OAI.ExactQuantumFactoring.BooleanProgramline 101Source documentation
The classical network explicitly retains all values already computed. In a fresh-output DAG each node's target is a previously zero ancilla.
abbrev BooleanProgram (q : ℕ) := List ((t : Fin q) × BooleanOp q t)
Mentions: OAI.ExactQuantumFactoring.BooleanOp
- def
OAI.ExactQuantumFactoring.BooleanProgram.evalline 103 - def
OAI.ExactQuantumFactoring.BooleanProgram.compileline 106 - lemma
OAI.ExactQuantumFactoring.BooleanProgram.compile_basisline 109 - lemma
OAI.ExactQuantumFactoring.BooleanProgram.compile_lengthline 118 - lemma
OAI.ExactQuantumFactoring.BooleanProgram.uncomputeline 130Source documentation
Reversing the actual compiled gate list erases the complete retained trace, not only its output. No irreversible erasure is used.
lemma BooleanProgram.uncompute {q : ℕ} (p : BooleanProgram q) (x : Basis q) : (programMatrix (p.compile.reverse.map Instruction.reverse)).mulVec (basisVector (p.eval x)) = basisVector x := by …Mentions: OAI.ExactQuantumFactoring.BooleanProgram, OAI.ExactQuantumFactoring.Basis, OAI.ExactQuantumFactoring.programMatrix, OAI.ExactQuantumFactoring.Instruction.reverse, OAI.ExactQuantumFactoring.basisVector