OAI/Computability/QuantumFactoring/PhaseOracle.lean
10 declarations, 0 contain sorry, 0 declared as axioms
- lemma
OAI.ExactQuantumFactoring.phase_twice_basisline 21 - def
OAI.ExactQuantumFactoring.BooleanNetwork.phaseTargetline 36 - def
OAI.ExactQuantumFactoring.BooleanNetwork.phaseOracleline 40Source documentation
Predicate phase kickback is a clean oracle, two S gates, and the same clean XOR oracle again, all over the fixed gate alphabet.
def phaseOracle {n r : ℕ} (c : BooleanNetwork n 1) (hr : c.net.count ≤ r) : List (Instruction (n+1+r)) := …Mentions: OAI.ExactQuantumFactoring.BooleanNetwork, OAI.ExactQuantumFactoring.Instruction
- lemma
OAI.ExactQuantumFactoring.BooleanNetwork.phaseOracle_lengthline 44 - lemma
OAI.ExactQuantumFactoring.BooleanNetwork.phaseOracle_basisline 50 - lemma
OAI.ExactQuantumFactoring.BooleanNetwork.phaseOracle_stateline 67Source documentation
The same actual program applies its diagonal predicate phase coherently, not just on classical basis inputs.
lemma phaseOracle_state {n r : ℕ} (c : BooleanNetwork n 1) (hr : c.net.count ≤ r) (ψ : Basis n → ℂ) : (programMatrix (phaseOracle c hr)).mulVec (encodeState (fun x => packed r x (fun _ : Fin 1 => false)) ψ) = encodeState (fun x => packed r x (fun _ : Fin 1 => false)) (fun x => (if c.eval x 0 then (-1:ℂ) else 1)*ψ x) := by …Mentions: OAI.ExactQuantumFactoring.BooleanNetwork, OAI.ExactQuantumFactoring.Basis, OAI.ExactQuantumFactoring.programMatrix, OAI.ExactQuantumFactoring.BooleanNetwork.phaseOracle, OAI.ExactQuantumFactoring.encodeState, OAI.ExactQuantumFactoring.BooleanNetwork.packed
- def
OAI.ExactQuantumFactoring.BooleanNetwork.allZeroline 83Source documentation
Bounded fan-in conjunction, built incrementally, not an unbounded gate.
def allZero (n : ℕ) : (k : ℕ) → k ≤ n → BooleanNetwork n 1 | 0, _ => constant true | k+1, h => (allZero n k (by omega)).band (bit ⟨k,by omega⟩).bnot
Mentions: OAI.ExactQuantumFactoring.BooleanNetwork, OAI.ExactQuantumFactoring.BooleanNetwork.constant, OAI.ExactQuantumFactoring.BooleanNetwork.band, OAI.ExactQuantumFactoring.BooleanNetwork.bit, OAI.ExactQuantumFactoring.BooleanNetwork.bnot
- lemma
OAI.ExactQuantumFactoring.BooleanNetwork.allZero_countline 87 - lemma
OAI.ExactQuantumFactoring.BooleanNetwork.allZero_evalline 93 - lemma
OAI.ExactQuantumFactoring.BooleanNetwork.allZero_fullline 109