QPBT definitions: Test / SoundnessDefs
DefinitionQPBT_QPBT_Test_SoundnessDefsqpbt
This bundle defines the error scale, ideal state, ideal Pauli projectors, and finite witness used by the Pauli soundness statement. It also packages the completed-family operator distance after folding malformed answers into a default outcome.
Principal definitions:
MIPStarRE.QPBT.deltaQld: defines the Pauli-test error scale.MIPStarRE.QPBT.idealState: defines the ideal auxiliary state tensored with the EPR registers in the shuffled order.MIPStarRE.QPBT.pauliProjOnA'': defines the ideal Alice-side Pauli projector with identities on the auxiliary and Bob-side registers.MIPStarRE.QPBT.pauliProjOnB'': defines the symmetric ideal Bob-side Pauli projector.MIPStarRE.QPBT.liftedAEffect: lifts a conjugated Alice-side effect to the full ideal register.MIPStarRE.QPBT.liftedBEffect: lifts a conjugated Bob-side effect to the full ideal register.MIPStarRE.QPBT.PauliSoundnessWitness: defines a finite witness packaging the auxiliary dimensions, isometries, and state used by the soundness statement.MIPStarRE.QPBT.pauliOperatorDistanceA: defines the Alice-side operator distance for the completed Pauli family after folding malformed answers into the default outcome.
Formalization Credit. This Lean declaration is part of the Quantum Pauli basis test formalization by Ruixuan Deng. The source code was generated by AI agents; Ruixuan Deng is the responsible maintainer.
Mathematical Source. The mathematical source is Ji, Natarajan, Vidick, Wright, and Yuen, MIP*=RE, arXiv:2001.04383v3.
Definition code
-- Generated from QPBT/Test/SoundnessDefs.lean by skeleton subtraction.
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_AxisParallelLine
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_DiagonalLine
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_LinePolynomials
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_LowDegreePolynomial
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_OpFamily
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersBase
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersFiniteAnswers
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_QuantumState
import Definitions.Def_LIDT_MIPStarRE_LDT_CommutativityPoints_Defs
import Definitions.Def_LIDT_MIPStarRE_LDT_ExpansionHypercubeGraph_Defs_Core
import Definitions.Def_LIDT_MIPStarRE_LDT_GlobalVariance_Defs_Core
import Definitions.Def_LIDT_MIPStarRE_LDT_MakingMeasurementsProjective_Defs
import Definitions.Def_LIDT_MIPStarRE_LDT_Pasting_Defs_Families
import Definitions.Def_LIDT_MIPStarRE_LDT_Pasting_Defs_Interpolation
import Definitions.Def_LIDT_MIPStarRE_LDT_Tactic_AvgCongr
import Definitions.Def_LIDT_MIPStarRE_LDT_Test_StrategyCore
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_Basic
import Definitions.Def_LIDT_MIPStarRE_Quantum_Measurement
import Definitions.Def_QPBT_QPBT_Algebra_FieldBasis
import Definitions.Def_QPBT_QPBT_Algebra_LowDegreeCode
import Definitions.Def_QPBT_QPBT_Algebra_Pauli
import Definitions.Def_QPBT_QPBT_Games_Defs
import Definitions.Def_QPBT_QPBT_State
import Definitions.Def_QPBT_QPBT_Test_PauliBasisTest
import Mathlib
namespace LIDT.MIPStarRE.LDT
end LIDT.MIPStarRE.LDT
namespace LIDT.MIPStarRE.Quantum
end LIDT.MIPStarRE.Quantum
namespace MIPStarRE.QPBT
end MIPStarRE.QPBT
/-!
# Pauli basis test soundness interface
This module contains the quantitative error function and the closed definitions
used to state Pauli basis test soundness. The carriers are concrete
finite-dimensional vectors and matrices so that the soundness proof can use the
existing Hilbert-space API without introducing a dependency cycle.
## References
The interface supports blueprint
`thm:pauli`, with paper origin
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`.
The distance functionals use blueprint `def:state-distance` and
`def:povm-distance`.
-/
@[expose] public section
open scoped BigOperators Matrix ComplexOrder
namespace MIPStarRE.QPBT
open LIDT.MIPStarRE.LDT
open LIDT.MIPStarRE.Quantum
noncomputable section
/-- The Pauli-test error scale. The argument order is `(a, b, ε, m, d, q)`;
the powers are real `rpow`s and the asymptotic constants are absorbed into `a`,
as specified by blueprint `thm:pauli`,
paper `references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`).
-/
noncomputable def deltaQld (a b ε : ℝ) (m d q : ℕ) : ℝ :=
a * Real.rpow ((m * d : ℕ) : ℝ) a *
(Real.rpow ε b + Real.rpow (q : ℝ) (-b) +
Real.rpow 2 (-(b * ((m * d : ℕ) : ℝ))))
/-- The ideal auxiliary state `aux ⊗ EPR_q^{⊗M}` in the shuffled register
ordering. The EPR factor is the concrete `eprState` from blueprint
`def:EPR`; paper
`references/qpbt-paper/04_preliminaries.tex:946-955`).
-/
noncomputable def idealState (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
{ιA' ιB' : Type*} [Fintype ιA'] [DecidableEq ιA']
[Fintype ιB'] [DecidableEq ιB']
(aux : EuclideanSpace ℂ (ιA' × ιB')) :
EuclideanSpace ℂ ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) × (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
(EuclideanSpace.equiv ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) ×
(ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) ℂ).symm
(fun p =>
((EuclideanSpace.equiv (ιA' × ιB') ℂ) aux (p.1.1, p.2.1)) *
((EuclideanSpace.equiv (_root_.MIPStarRE.QPBT.PauliRegister P × _root_.MIPStarRE.QPBT.PauliRegister P) ℂ)
(_root_.MIPStarRE.QPBT.eprState (_root_.MIPStarRE.QPBT.PauliRegister P)) (p.1.2, p.2.2)))
/-- The A-side ideal Pauli projector, with identities on the auxiliary and
B-side registers. This is a concrete matrix form of the operator comparison
in blueprint `thm:pauli`; paper
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`).
-/
noncomputable def pauliProjOnA'' (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
{ιA' ιB' : Type*} [Fintype ιA'] [DecidableEq ιA']
[Fintype ιB'] [DecidableEq ιB'] (W : _root_.MIPStarRE.QPBT.PauliKind)
(u : _root_.MIPStarRE.QPBT.PauliRegister P) :
_root_.LIDT.MIPStarRE.Quantum.Op ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) × (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
fun p q =>
if p.1.1 = q.1.1 ∧ p.2 = q.2 then
_root_.MIPStarRE.QPBT.pauliProj W u p.1.2 q.1.2
else 0
/-- The symmetric B-side ideal Pauli projector from blueprint
`thm:pauli`, paper origin
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`.
-/
noncomputable def pauliProjOnB'' (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
{ιA' ιB' : Type*} [Fintype ιA'] [DecidableEq ιA']
[Fintype ιB'] [DecidableEq ιB'] (W : _root_.MIPStarRE.QPBT.PauliKind)
(u : _root_.MIPStarRE.QPBT.PauliRegister P) :
_root_.LIDT.MIPStarRE.Quantum.Op ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) × (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
fun p q =>
if p.1 = q.1 ∧ p.2.1 = q.2.1 then
_root_.MIPStarRE.QPBT.pauliProj W u p.2.2 q.2.2
else 0
/-- Lift a conjugated A-side effect to the full ideal register in blueprint
`thm:pauli`, paper origin
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`.
-/
noncomputable def liftedAEffect {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {G : _root_.MIPStarRE.QPBT.Game}
(S : _root_.MIPStarRE.QPBT.Strategy G) {ιA' ιB' : Type*} [Fintype ιA'] [DecidableEq ιA']
[Fintype ιB'] [DecidableEq ιB']
(φA : EuclideanSpace ℂ S.ιA →ₗᵢ[ℂ]
EuclideanSpace ℂ (ιA' × _root_.MIPStarRE.QPBT.PauliRegister P))
(M : _root_.LIDT.MIPStarRE.Quantum.Op S.ιA) :
_root_.LIDT.MIPStarRE.Quantum.Op ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) × (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
fun p q =>
if p.2 = q.2 then
(_root_.MIPStarRE.QPBT.conjIsometry φA M) p.1 q.1
else 0
/-- Lift a conjugated B-side effect to the full ideal register in blueprint
`thm:pauli`, paper origin
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`.
-/
noncomputable def liftedBEffect {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {G : _root_.MIPStarRE.QPBT.Game}
(S : _root_.MIPStarRE.QPBT.Strategy G) {ιA' ιB' : Type*} [Fintype ιA'] [DecidableEq ιA']
[Fintype ιB'] [DecidableEq ιB']
(φB : EuclideanSpace ℂ S.ιB →ₗᵢ[ℂ]
EuclideanSpace ℂ (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P))
(M : _root_.LIDT.MIPStarRE.Quantum.Op S.ιB) :
_root_.LIDT.MIPStarRE.Quantum.Op ((ιA' × _root_.MIPStarRE.QPBT.PauliRegister P) × (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
fun p q =>
if p.1 = q.1 then
(_root_.MIPStarRE.QPBT.conjIsometry φB M) p.2 q.2
else 0
/-- A finite witness packaging the auxiliary dimensions, isometries, and state
from `thm:pauli`. This structure is a Lean-only encoding of the existential
data in the paper theorem; it introduces no extra hypothesis. Blueprint
`thm:pauli`, paper origin
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1426-1447`.
-/
structure PauliSoundnessWitness (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
(S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.pauliBasisTest P)) where
ιA' : Type
ιB' : Type
[ιAFintype : Fintype ιA']
[ιBFintype : Fintype ιB']
[ιADecidableEq : DecidableEq ιA']
[ιBDecidableEq : DecidableEq ιB']
φA : EuclideanSpace ℂ S.ιA →ₗᵢ[ℂ]
EuclideanSpace ℂ (ιA' × _root_.MIPStarRE.QPBT.PauliRegister P)
φB : EuclideanSpace ℂ S.ιB →ₗᵢ[ℂ]
EuclideanSpace ℂ (ιB' × _root_.MIPStarRE.QPBT.PauliRegister P)
aux : EuclideanSpace ℂ (ιA' × ιB')
aux_norm : ‖aux‖ = 1
attribute [instance] _root_.MIPStarRE.QPBT.PauliSoundnessWitness.ιAFintype _root_.MIPStarRE.QPBT.PauliSoundnessWitness.ιBFintype
_root_.MIPStarRE.QPBT.PauliSoundnessWitness.ιADecidableEq _root_.MIPStarRE.QPBT.PauliSoundnessWitness.ιBDecidableEq
/-- The A-side operator distance for the completed Pauli family obtained by
folding every wrong-form answer into outcome zero. This Lean-only quantity is
used internally by the extraction and Naimark transfer; the source-facing
distance is `rawPauliOperatorDistanceA`. -/
noncomputable def pauliOperatorDistanceA
(P : _root_.MIPStarRE.QPBT.AdmissibleParams) (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.pauliBasisTest P))
(w : _root_.MIPStarRE.QPBT.PauliSoundnessWitness P S) (W : _root_.MIPStarRE.QPBT.PauliKind) : ℝ :=
∑ u : _root_.MIPStarRE.QPBT.PauliRegister P,
‖_root_.MIPStarRE.QPBT.applyOperatorToState (_root_.MIPStarRE.QPBT.liftedAEffect S w.φA
(((S.A (_root_.MIPStarRE.QPBT.pauliQuestion P W)).postprocess _root_.MIPStarRE.QPBT.pauliAnswerOrZero).effect u) -
_root_.MIPStarRE.QPBT.pauliProjOnA'' P W u) (_root_.MIPStarRE.QPBT.idealState P w.aux)‖ ^ 2
/-- The symmetric B-side operator distance for the completed Pauli family.
This is internal support for the extraction proof; the source-facing distance
is `rawPauliOperatorDistanceB`. -/
noncomputable def pauliOperatorDistanceB
(P : _root_.MIPStarRE.QPBT.AdmissibleParams) (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.pauliBasisTest P))
(w : _root_.MIPStarRE.QPBT.PauliSoundnessWitness P S) (W : _root_.MIPStarRE.QPBT.PauliKind) : ℝ :=
∑ u : _root_.MIPStarRE.QPBT.PauliRegister P,
‖_root_.MIPStarRE.QPBT.applyOperatorToState (_root_.MIPStarRE.QPBT.liftedBEffect S w.φB
(((S.B (_root_.MIPStarRE.QPBT.pauliQuestion P W)).postprocess _root_.MIPStarRE.QPBT.pauliAnswerOrZero).effect u) -
_root_.MIPStarRE.QPBT.pauliProjOnB'' P W u) (_root_.MIPStarRE.QPBT.idealState P w.aux)‖ ^ 2
/-- Alice's source-facing Pauli operator distance. The strategy effect is the
raw effect of the prescribed answer `.pauliOutcome u`, exactly as in
`thm:pauli`, paper
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1438-1443`.
The sum is the finite realization of blueprint `def:povm-distance`. -/
noncomputable def rawPauliOperatorDistanceA
(P : _root_.MIPStarRE.QPBT.AdmissibleParams) (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.pauliBasisTest P))
(w : _root_.MIPStarRE.QPBT.PauliSoundnessWitness P S) (W : _root_.MIPStarRE.QPBT.PauliKind) : ℝ :=
∑ u : _root_.MIPStarRE.QPBT.PauliRegister P,
‖_root_.MIPStarRE.QPBT.applyOperatorToState (_root_.MIPStarRE.QPBT.liftedAEffect S w.φA
((S.A (_root_.MIPStarRE.QPBT.pauliQuestion P W)).effect (.pauliOutcome u)) -
_root_.MIPStarRE.QPBT.pauliProjOnA'' P W u) (_root_.MIPStarRE.QPBT.idealState P w.aux)‖ ^ 2
/-- Bob's source-facing Pauli operator distance, using the raw prescribed
answer effect from `thm:pauli`, paper
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:1438-1443`.
-/
noncomputable def rawPauliOperatorDistanceB
(P : _root_.MIPStarRE.QPBT.AdmissibleParams) (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.pauliBasisTest P))
(w : _root_.MIPStarRE.QPBT.PauliSoundnessWitness P S) (W : _root_.MIPStarRE.QPBT.PauliKind) : ℝ :=
∑ u : _root_.MIPStarRE.QPBT.PauliRegister P,
‖_root_.MIPStarRE.QPBT.applyOperatorToState (_root_.MIPStarRE.QPBT.liftedBEffect S w.φB
((S.B (_root_.MIPStarRE.QPBT.pauliQuestion P W)).effect (.pauliOutcome u)) -
_root_.MIPStarRE.QPBT.pauliProjOnB'' P W u) (_root_.MIPStarRE.QPBT.idealState P w.aux)‖ ^ 2
end
end MIPStarRE.QPBT
Source