Documentation

MIPRE.Foundations.ModelCalculus

The state calculus of the Pauli basis test's last stages, in a model #

The soundness analysis of the Pauli basis test (MIPRE/Background/QLD/) proves a handful of estimates about a single state vector on the way, each stated for matrices on โ„‚^N and a vector v : N โ†’ โ„‚. New in Phase 5 of planning/mipco-track.md, where that analysis is stated in a bipartite model: their forms in a state model (MIPRE/Foundations/StateModel.lean), with the operators in the represented algebra ๐’ž and the state the model's, and for a bipartite model (MIPRE/Foundations/BipartiteModel.lean) where a player's family is meant. A matrix statement is the model statement in StateModel.mat v or BipartiteModel.tensor ฯˆ.

These replace matrix lemmas the QLD chain used before it was stated in a bipartite model (Phase 5 of planning/mipco-track.md): snorm_sq_sum_orthogonal, snorm_sq_sum_orthogonal', sum_snorm_sq_chain_le, snorm_sq_obs_sub_le, abs_qform_sub_qform_le, and for Parseval sum_avg_normSq_stateVecB_fibre_eq and sum_avg_xSqNorm_fibre_eq. The trivial bound replaces the matrix bounds sum_snorm_sq_registerState_alice_le_two and _bob_le_two of the matrix thm:qld, with the constant 4 that le_qldErr allows in place of their 2. The model form of the triangle inequality sum_snorm_sq_triangle' was already StateModel.sum_snorm_sq_triangle.

Moving a quadratic form to a nearby vector #

theorem MIPRE.Op.abs_qform_sub_qform_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace โ„‚ H] (v w : H) {T : H โ†’L[โ„‚] H} {K : โ„} (hK : 0 โ‰ค K) (hT : Bnd T K) (hv : โ€–vโ€– โ‰ค 1) (hw : โ€–wโ€– โ‰ค 1) :

Moving a quadratic form to a nearby vector costs twice the bound times the distance. The difference splits into two terms, each with the deviation on one side, and each is bounded by Cauchy--Schwarz against a vector of norm at most one.

The state calculus in a state model #

theorem MIPRE.StateModel.snorm_sq_sum_orthogonal {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) {ฮ› : Type u_2} [Fintype ฮ›] [DecidableEq ฮ›] {S : ฮ› โ†’ ๐’ž} (hS : IsPVMIn S) (R : ๐’ž) (s : Finset ฮ›) :
M.snorm ((โˆ‘ g โˆˆ s, S g) * R) ^ 2 = โˆ‘ g โˆˆ s, M.snorm (S g * R) ^ 2

A sum of orthogonal blocks has no cross terms. If S is a projective measurement then, for any R, the squared state norm of (โˆ‘ g โˆˆ s, S g) R is the sum of those of the S g R. The model form of the matrix snorm_sq_sum_orthogonal of QLD/Pulling.lean.

theorem MIPRE.StateModel.snorm_sq_sum_orthogonal' {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) {ฮ› : Type u_2} [Fintype ฮ›] [DecidableEq ฮ›] {S : ฮ› โ†’ ๐’ž} (hS : IsPVMIn S) (R : ฮ› โ†’ ๐’ž) (s : Finset ฮ›) :
M.snorm (โˆ‘ g โˆˆ s, S g * R g) ^ 2 = โˆ‘ g โˆˆ s, M.snorm (S g * R g) ^ 2

A sum of orthogonal blocks has no cross terms, even with a different tail on each. The model form of the matrix snorm_sq_sum_orthogonal' of QLD/Chain.lean.

theorem MIPRE.StateModel.sum_snorm_sq_chain_le {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) {ฮน : Type u_2} (s : Finset ฮน) (n : โ„•) (T : โ„• โ†’ ฮน โ†’ ๐’ž) :
โˆ‘ i โˆˆ s, M.snorm (T 0 i - T n i) ^ 2 โ‰ค โ†‘n * โˆ‘ k โˆˆ Finset.range n, โˆ‘ i โˆˆ s, M.snorm (T k i - T (k + 1) i) ^ 2

The triangle inequality along a chain of deviations. A chain of n steps costs a factor n, not 2โฟ: the total deviation telescopes into the sum of the steps', and Cauchy--Schwarz against the constant one turns the squared norm of a sum of n terms into n times the sum of their squares. The model form of the matrix sum_snorm_sq_chain_le of QLD/Chain.lean, over any finite set of indices (the matrix one is s = univ).

theorem MIPRE.StateModel.snorm_sq_obs_sub_le {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) {ฮ› : Type u_2} [Fintype ฮ›] (ฮฑ : ฮ› โ†’ โ„‚) (hฮฑ : โˆ€ (a : ฮ›), โ€–ฮฑ aโ€– โ‰ค 1) (A B : ฮ› โ†’ ๐’ž) :
M.snorm (โˆ‘ a : ฮ›, ฮฑ a โ€ข A a - โˆ‘ a : ฮ›, ฮฑ a โ€ข B a) ^ 2 โ‰ค โ†‘(Fintype.card ฮ›) * โˆ‘ a : ฮ›, M.snorm (A a - B a) ^ 2

From measurement elements to weighted sums of them: weighting both families by coefficients of modulus at most one costs a factor the size of the outcome set, by the triangle inequality over the outcomes and then Cauchy--Schwarz against the constant one. It replaces the matrix snorm_sq_obs_sub_le of the QLD chain (lem:qld-povm-to-obs).

theorem MIPRE.StateModel.abs_qform_sub_qform_le {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) (v w : M.H) {X : ๐’ž} {K : โ„} (hK : 0 โ‰ค K) (hX : M.Bnd X K) (hv : โ€–vโ€– โ‰ค 1) (hw : โ€–wโ€– โ‰ค 1) :

Moving a quadratic form to a nearby state costs twice the bound times the distance, for two vectors v, w of norm at most one of the model's space, each read as the state (StateModel.withState). The model form of the matrix abs_qform_sub_qform_le of QLD/SwapMeasure.lean.

theorem MIPRE.StateModel.abs_qform_withState_sub_qform_le {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) (v : M.H) {X : ๐’ž} {K : โ„} (hK : 0 โ‰ค K) (hX : M.Bnd X K) (hv : โ€–vโ€– โ‰ค 1) (hฯˆ : โ€–M.ฯˆโ€– โ‰ค 1) :

abs_qform_sub_qform_le against the model's own state.

The trivial bound on a summed distance #

theorem MIPRE.BipartiteModel.sum_stateSqNorm_sub_le {๐’ž : Type u_1} {๐’œ : Type u_2} {โ„ฌ : Type u_3} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] [Ring ๐’œ] [StarRing ๐’œ] [Algebra โ„‚ ๐’œ] [Ring โ„ฌ] [StarRing โ„ฌ] [Algebra โ„‚ โ„ฌ] (M : BipartiteModel ๐’ž ๐’œ โ„ฌ) {ฮ› : Type u_4} (s : Finset ฮ›) (A B : ฮ› โ†’ ๐’œ) :
โˆ‘ h โˆˆ s, M.stateSqNorm (A h - B h) โ‰ค 2 * โˆ‘ h โˆˆ s, M.stateSqNorm (A h) + 2 * โˆ‘ h โˆˆ s, M.stateSqNorm (B h)

The summed squared distance of two families is at most twice the sum of their summed squared norms: the triangle inequality through 0.

theorem MIPRE.BipartiteModel.sum_stateSqNorm_sub_le_four_of_le {๐’ž : Type u_1} {๐’œ : Type u_2} {โ„ฌ : Type u_3} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] [Ring ๐’œ] [StarRing ๐’œ] [Algebra โ„‚ ๐’œ] [Ring โ„ฌ] [StarRing โ„ฌ] [Algebra โ„‚ โ„ฌ] (M : BipartiteModel ๐’ž ๐’œ โ„ฌ) {ฮ› : Type u_4} [Fintype ฮ›] {A B : ฮ› โ†’ ๐’œ} (hA : โˆ‘ h : ฮ›, M.stateSqNorm (A h) โ‰ค 1) (hB : โˆ‘ h : ฮ›, M.stateSqNorm (B h) โ‰ค 1) :
โˆ‘ h : ฮ›, M.stateSqNorm (A h - B h) โ‰ค 4

Two families each of summed squared norm at most one are at summed squared distance at most four. This covers two POVMs on a unit vector (sum_stateSqNorm_le_one), sub-POVMs, and the images of projective measurements under a non-unital โ‹†-homomorphism.

theorem MIPRE.BipartiteModel.sum_stateSqNorm_sub_le_four {๐’ž : Type u_1} {๐’œ : Type u_2} {โ„ฌ : Type u_3} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] [Ring ๐’œ] [StarRing ๐’œ] [Algebra โ„‚ ๐’œ] [Ring โ„ฌ] [StarRing โ„ฌ] [Algebra โ„‚ โ„ฌ] (M : BipartiteModel ๐’ž ๐’œ โ„ฌ) (hฯˆ : โ€–M.ฯˆโ€– = 1) {ฮ› : Type u_4} [Fintype ฮ›] {A B : ฮ› โ†’ ๐’œ} (hA : IsPVMIn A) (hB : IsPVMIn B) :
โˆ‘ h : ฮ›, M.stateSqNorm (A h - B h) โ‰ค 4

Two projective measurements on a unit vector are at summed squared distance at most four: the trivial bound of the second item of thm:qld (the second player's is this in M.swap), in place of the bounds sum_snorm_sq_registerState_alice_le_two and _bob_le_two of the matrix thm:qld. The matrix bound 2 uses that on the register state the honest projector on one party is the same projector on the other; 4 needs nothing, and is what le_qldErr asks for.

Parseval in a complex inner product space #

MIPRE/Foundations/Parseval.lean proves the character Parsevals for vectors of โ„‚^N; the same statements hold, with the same proof, in any complex inner product space, and that is the form a state model needs: the vectors are ฯ€(T) ฯˆ in the model's Hilbert space.

theorem MIPRE.sum_norm_charSum_sq {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace โ„‚ E] {ฮน : Type u_2} {ฮบ : Type u_3} [Fintype ฮน] [DecidableEq ฮน] [Fintype ฮบ] (ฯ‡ : ฮบ โ†’ ฮน โ†’ โ„‚) {c : โ„} (hฯ‡ : โˆ€ (a b : ฮน), โˆ‘ r : ฮบ, star (ฯ‡ r a) * ฯ‡ r b = if a = b then โ†‘c else 0) (T : ฮน โ†’ E) :
โˆ‘ r : ฮบ, โ€–โˆ‘ a : ฮน, ฯ‡ r a โ€ข T aโ€– ^ 2 = c * โˆ‘ a : ฮน, โ€–T aโ€– ^ 2

Parseval for an orthogonal family of characters, in any complex inner product space: if the characters ฯ‡ r satisfy โˆ‘_r conj(ฯ‡ r a) ฯ‡ r b = c ฮด_{ab}, then the transform r โ†ฆ โˆ‘_a ฯ‡ r a โ€ข T a has total squared norm c times the family's.

theorem MIPRE.sum_sgn_trMul_eq_ite {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (x : F) :
โˆ‘ r : F, sgn ((Algebra.trace (ZMod 2) F) (r * x)) = if x = 0 then โ†‘(Fintype.card F) else 0

The one-field character sum, as an if.

theorem MIPRE.sum_star_sgn_trMul {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (a b : F) :
โˆ‘ r : F, star (sgn ((Algebra.trace (ZMod 2) F) (a * r))) * sgn ((Algebra.trace (ZMod 2) F) (b * r)) = if a = b then โ†‘โ†‘(Fintype.card F) else 0

The characters c โ†ฆ (-1)^{tr(c r)} are orthogonal, with norm q.

theorem MIPRE.sum_star_sgn_trMul2 {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (a b : F ร— F) :
โˆ‘ q : F ร— F, star (sgn ((Algebra.trace (ZMod 2) F) (q.1 * a.1) + (Algebra.trace (ZMod 2) F) (q.2 * a.2))) * sgn ((Algebra.trace (ZMod 2) F) (q.1 * b.1) + (Algebra.trace (ZMod 2) F) (q.2 * b.2)) = if a = b then โ†‘(โ†‘(Fintype.card F) * โ†‘(Fintype.card F)) else 0

The characters p โ†ฆ (-1)^{tr(qโ‚ pโ‚) + tr(qโ‚‚ pโ‚‚)} of F_q ร— F_q are orthogonal, with norm qยฒ.

theorem MIPRE.sum_norm_trSum_sq {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace โ„‚ E] {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (T : F โ†’ E) :
โˆ‘ r : F, โ€–โˆ‘ c : F, sgn ((Algebra.trace (ZMod 2) F) (c * r)) โ€ข T cโ€– ^ 2 = โ†‘(Fintype.card F) * โˆ‘ c : F, โ€–T cโ€– ^ 2

Parseval over one copy of the field, in any complex inner product space: the matrix sum_norm_trVecRaw_sq of MIPRE/Foundations/Parseval.lean with the vectors in E.

theorem MIPRE.sum_norm_trSum2_sq {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace โ„‚ E] {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (T : F ร— F โ†’ E) :
โˆ‘ q : F ร— F, โ€–โˆ‘ p : F ร— F, sgn ((Algebra.trace (ZMod 2) F) (q.1 * p.1) + (Algebra.trace (ZMod 2) F) (q.2 * p.2)) โ€ข T pโ€– ^ 2 = โ†‘(Fintype.card F) * โ†‘(Fintype.card F) * โˆ‘ p : F ร— F, โ€–T pโ€– ^ 2

Parseval over two copies of the field, in any complex inner product space: the matrix sum_norm_char_two_sq of MIPRE/Foundations/Parseval.lean with the vectors in E.

theorem MIPRE.sum_avg_norm_fibreSum_sq {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace โ„‚ E] {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] (U : F ร— F โ†’ E) (hU : โˆ‘ p : F ร— F, U p = 0) :
โˆ‘ ab : F ร— F, (โ†‘(Fintype.card F))โปยน * (โ†‘(Fintype.card F))โปยน * โˆ‘ c : F, โ€–โˆ‘ p : F ร— F with ab.1 * p.1 + ab.2 * p.2 = c, U pโ€– ^ 2 = (1 - (โ†‘(Fintype.card F))โปยน) * โˆ‘ p : F ร— F, โ€–U pโ€– ^ 2

Parseval for a coarse-graining by a linear form, in any complex inner product space. A family of vectors indexed by F_q ร— F_q that sums to zero has, on average over (ฮฑ, ฮฒ) uniform, fibre sums under (a, b) โ†ฆ ฮฑ a + ฮฒ b whose total squared norm is 1 - 1/q times the family's own; a per-fibre triangle inequality would cost the factor q the fibres have. The matrix sum_avg_norm_fibre_sq of MIPRE/Foundations/Parseval.lean with the vectors in E, by the same proof; the zero-sum hypothesis kills the r = 0 character.

Parseval in a model #

theorem MIPRE.StateModel.sum_avg_snorm_sq_fibre_eq {๐’ž : Type u_1} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] (M : StateModel ๐’ž) {F : Type u_2} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {E : F ร— F โ†’ ๐’ž} (hE : โˆ‘ p : F ร— F, E p = 0) :
โˆ‘ ab : F ร— F, (โ†‘(Fintype.card F))โปยน * (โ†‘(Fintype.card F))โปยน * โˆ‘ c : F, M.snorm (โˆ‘ p : F ร— F with ab.1 * p.1 + ab.2 * p.2 = c, E p) ^ 2 = (1 - (โ†‘(Fintype.card F))โปยน) * โˆ‘ p : F ร— F, M.snorm (E p) ^ 2

Parseval over F_q for the fibre sums of a family summing to zero, in a state model: the average over the combining coefficients of the squared state norms of the fibre sums is (1 - 1/q) times the sum of the squared state norms of the members. sum_avg_norm_fibreSum_sq on the vectors ฯ€(E p) ฯˆ.

theorem MIPRE.BipartiteModel.sum_avg_stateSqNorm_fibre_eq {๐’ž : Type u_1} {๐’œ : Type u_2} {โ„ฌ : Type u_3} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] [Ring ๐’œ] [StarRing ๐’œ] [Algebra โ„‚ ๐’œ] [Ring โ„ฌ] [StarRing โ„ฌ] [Algebra โ„‚ โ„ฌ] (M : BipartiteModel ๐’ž ๐’œ โ„ฌ) {F : Type u_4} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {E : F ร— F โ†’ ๐’œ} (hE : โˆ‘ p : F ร— F, E p = 0) :
โˆ‘ ab : F ร— F, (โ†‘(Fintype.card F))โปยน * (โ†‘(Fintype.card F))โปยน * โˆ‘ c : F, M.stateSqNorm (โˆ‘ p : F ร— F with ab.1 * p.1 + ab.2 * p.2 = c, E p) = (1 - (โ†‘(Fintype.card F))โปยน) * โˆ‘ p : F ร— F, M.stateSqNorm (E p)

Parseval over F_q for the fibre sums of a player's family summing to zero. For the second player's family E : F ร— F โ†’ โ„ฌ it is the statement in M.swap, whose state norm is โ€–ฯ€B(ยท) ฯˆโ€–: the model form of the matrix sum_avg_normSq_stateVecB_fibre_eq of QLD/Products.lean, whose fibre sum ptComb E ฮฑ ฮฒ c is the one here.

theorem MIPRE.BipartiteModel.sum_avg_xSqNorm_fibre_eq {๐’ž : Type u_1} {๐’œ : Type u_2} {โ„ฌ : Type u_3} [Ring ๐’ž] [StarRing ๐’ž] [Algebra โ„‚ ๐’ž] [Ring ๐’œ] [StarRing ๐’œ] [Algebra โ„‚ ๐’œ] [Ring โ„ฌ] [StarRing โ„ฌ] [Algebra โ„‚ โ„ฌ] (M : BipartiteModel ๐’ž ๐’œ โ„ฌ) {F : Type u_4} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {Q : F ร— F โ†’ ๐’œ} {B : F ร— F โ†’ โ„ฌ} (hQ : โˆ‘ p : F ร— F, Q p = 1) (hB : โˆ‘ p : F ร— F, B p = 1) :
โˆ‘ ab : F ร— F, (โ†‘(Fintype.card F))โปยน * (โ†‘(Fintype.card F))โปยน * โˆ‘ v : F, M.xSqNorm (โˆ‘ p : F ร— F with ab.1 * p.1 + ab.2 * p.2 = v, Q p) (โˆ‘ p : F ร— F with ab.1 * p.1 + ab.2 * p.2 = v, B p) = (1 - (โ†‘(Fintype.card F))โปยน) * โˆ‘ p : F ร— F, M.xSqNorm (Q p) (B p)

Parseval over F_q for the fibre sums of a cross-party deviation: two families, one for each player, each summing to one, coarse-grained by (a, b) โ†ฆ ฮฑ a + ฮฒ b. The model form of the matrix sum_avg_xSqNorm_fibre_eq of QLD/Combined.lean.