Resetting a register of a product state factors out its squared norm
ProvedOPI.lawP_resetsPrograms here are oracle-free adaptive quantum programs over on qubits, with bits of classical memory and output bits. For a program , an event on outcomes, an (unnormalized) pure state and a memory content , is the probability weight with which , started from , halts with an outcome in . It is linear in the density, so it scales with . The program re-initializes each qubit of the list to and then runs .
Statement. Let be a list of distinct qubits, an amplitude function on bit strings of length , and any vector on qubits. Consider the product state , i.e. on the register times on the rest. Then
where is restricted to the configurations in which every qubit of is .
So resetting a register in a product state leaves the rest untouched and multiplies the law by the squared norm of the discarded factor. It is used when a rejected trial resets the system before retrying, and when a repeat-until-success attempt is reset.
import Definitions.Def_TwoFoldOPI_CL_Part01
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Circuit
import Definitions.Def_QAlgorithms_Defs_GradientMethods
import Definitions.Def_QAlgorithms_Defs_OPIOraclePrograms
import Definitions.Def_QAlgorithms_Defs_OPIUniformity
import Definitions.Def_QAlgorithms_Defs_Fourier
import Definitions.Def_TwoFoldOPI_elemBits
import Definitions.Def_TwoFoldOPI_schurSquare
import Definitions.Def_TwoFoldOPI_schurFailureSum
import Definitions.Def_CodingTheory
import Definitions.Def_OAIThreeMachineSched01
import Definitions.Def_CookLevin_Cost
import Definitions.Def_TwoFoldOPI_codeOf
import Definitions.Def_TwoFoldOPI_solves
import Definitions.Def_TwoFoldOPI_Input
import Definitions.Def_TwoFoldOPI_CLSerializableF
open OPI
open QAlgorithms QAlgorithms.OPI Matrix
open scoped ComplexConjugate
variable {N c out : ℕ}
theorem OPI.lawP_resets (xs : List (Fin N)) (hnd : xs.Nodup) (P : Prog N c out)
(event : Option (Fin out → Bool) → Prop) (A : List Bool → ℂ) (φ : Qubits N → ℂ)
(mem : Fin c → Bool) :
lawP (resets xs P) event (fun y => A (xs.map y) * φ (clr xs y)) mem =
patSum xs.length A *
lawP P event (fun y => if ∀ a ∈ xs, y a = false then φ y else 0) mem := by sorry