Definitions for Polar codes for private classical communication
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P74The objects the formalized statements of Polar codes for private classical communication (arXiv:1203.5794) are stated in. Each was checked against the paper by a blind read-back and a moderator.
WiretapData: PDF p.2: fixed isometric extension (output B,E,S2) and input purifications on A'S1.WiretapData.Valid: PDF p.2: isometry and normalized purifications; tracing S2 defines the same wiretap map.purifiedWiretapSignal: PDF p.2, Eq.(2): purified output in order B,E,S1,S2.bobMap: PDF p.2: Bob's marginal of the channel fixed by V, on all operators.eveMap: PDF pp.2,5: Eve's marginal traces B and S2, excluding both shields.amplitudeBob: PDF p.2, Eq.(1): amplitude cq channel to Bob.amplitudeEve: PDF p.2, Eq.(8): amplitude cq channel to Eve.bitSign: The phase (-1)^b.phaseVector: PDF p.2, Eq.(6): normalized phase pure output, C first and Eve last.phaseBob: PDF p.2, Eq.(5): virtual phase output C,B,S1,S2; only E is traced out.uniformHolevo: PDF p.1: Holevo information in bits for equiprobable finite labels. Uses below have nonempty labels and normalized states by the physical construction.symmetricPrivateInformation: PDF p.4: fixed-ensemble symmetric private information; signed, with no optimization.polarEntry: PDF p.3: Arikan G_N=B_N F^(tensor n), F=[[1,0],[1,1]]. Index digits are least significant first; B_N reverses the row's n digits.polarEncode: PDF pp.3–4: row multiplication by G_N (false) or G_N^T (true), over F_2.dotParity: PDF p.3: the binary inner product used in the phase exponent.polarSideIndices: PDF pp.3–4: previous amplitude bits or future phase bits as side information.splitOutput: PDF pp.3–4, Eqs.(10)–(11): the other N-1 bits are uniform, the polarSideIndices bits are revealed classically, and the opposite side is averaged. Phase uses G_N^T.goodIndices: PDF p.3, Eq.(12): strictly less than threshold, applied to ROOT fidelity.decodedIndices: PDF p.4: A union X, exactly the amplitude-good indices.phaseGoodIndices: PDF p.4: phase-good indices of the virtual channel with both shields.privateIndices: PDF p.4: A, good in both amplitude and phase.keyIndices: PDF p.4: Bbad, bad in both variables.randomIndices: PDF p.4: X, independent uniform local random bits.frozenIndices: PDF p.4: Z, uniform frozen bits shared with Bob.netRate: PDF p.4: signed net rate; cast both cardinalities before subtracting.keyRate: PDF pp.5–7: consumed secret-key bits per channel use.encodedPhaseVector: PDF p.3: the displayed coherent output, with exponent x dot z and purifiedWiretapSignal z G_N. Output order is (C,B,S1,S2)^N followed by E^N.encodedPhaseOutput: PDF p.3: trace only Eve from the displayed coherent output.referenceEncoder: PDF p.3: the extra polar encoder U_E on C^N, identity on B^N S1^N S2^N.actualPhaseSplit: PDF p.4: split the actual phase output, revealing future bits, averaging past bits.PolarDecoderEffects: PDF p.4: POVMs depend on the known frozen/key bits; outcomes contain all A union X. No measurement depends on the unknown private or randomized bits.IsSuccessiveCancellation: PDF pp.3–4: a successive cancellation decoder performs a binary projective test for each index in A union X, in increasing order; a test uses the previous decisions and the known frozen/key bits, and frozen indices require no measurement. Outcomes are the sequential effects K^dagger K, not an unconstrained family of message-dependent POVMs.decoderError: PDF pp.3–4: average error over the independent uniform bits in A,X,Z,Bbad.reliabilityBound: PDF p.4: sqrt(2 times the sum of ROOT fidelities), exactly the printed radical.decayHalf: PDF p.4: 2^(-N^beta/2), where N=2^n.privateMessageEveState: PDF p.4: actual conditional Eve state for a uniform private message. Average X,Z,Bbad independently; the real normalization 2^|A|/2^N avoids truncated natural subtraction.privateMessageLeakageBits: PDF p.4, Theorem 2: unconditional uniform-message Holevo leakage I(U_A;E^N), in bits.EveDegradable: PDF p.5: Bob simulates Eve E, not the larger complementary register E S2.classicalEmbedding: PDF p.6, Appendix A, Eq.(14): measure the input basis then prepare the classical joint output; every off-diagonal input entry is discarded.classicalKraus: PDF p.6, Appendix A: Kraus operator sqrt(p(y,z|x)) |y,z><x|.classicalDilation: PDF p.6, Appendix A: the explicit dilation stores (x,y,z) in S2. The physical output is only (y,z); S2 is not appended to Eve.bscProbability: PDF p.7, Appendix C.A: BSC transition probability; inequality of bits is XOR.bscOutput: PDF p.7: computational-basis output states of a BSC.independentBsc: PDF p.7, Eq.(17): independent BSC outputs conditioned on the same input bit.erasureData: PDF pp.9–10: erasure dilation |a> -> sqrt(1-eps)|a,e>+sqrt(eps)|e,a>. Both shields are trivial, and symbol 2 is the orthogonal erasure flag.dampingMap: PDF p.10: the accepted qubit amplitude-damping channel with loss probability 1-eta. Its Kraus labels are reversed relative to the source; the summed channel is the same.dampingAmplitude: PDF p.10: the actual amplitude-channel output for a computational-basis input.binaryPhaseBellVector: PDF p.10: phase-modulated Bell vector with reference C first and Bob's input second.dampingPhaseOutput: PDF pp.10–11: apply the same amplitude-damping channel to half of the Bell state.cbIndex: Computational order |00>, |01>, |10>, |11>, C first.dampingPhaseMatrix: PDF p.11: the exact displayed matrix, including loss at |10><10|.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Independent2_P01
/-! Wilde–Renes, arXiv:1203.5794v1. All registers are finite dimensional. The virtual
phase receiver retains both shields. Index i denotes the source's i+1. No theorem is
registered for the three source-ambiguous nodes in HARD.md.
The accepted product channel is used at length 2^n. Accepted damping uses loss
probability 1-eta; its Kraus labels are the reverse of the source labels. -/
namespace QAlgorithms.Papers.Independent.Intakethird100.P74
open QAlgorithms
open scoped ComplexConjugate Matrix
noncomputable section
local instance (p : Prop) : Decidable p := Classical.propDecidable p
/-- PDF p.2: fixed isometric extension (output B,E,S2) and input purifications on A'S1. -/
structure WiretapData (B E S1 S2 : Type) where
V : Matrix (B × E × S2) Bool ℂ
psi : Bool → EuclideanSpace ℂ (Bool × S1)
variable {B E S1 S2 : Type}
variable [Fintype B] [Fintype E] [Fintype S1] [Fintype S2]
variable [DecidableEq B] [DecidableEq E] [DecidableEq S1] [DecidableEq S2]
/-- PDF p.2: isometry and normalized purifications; tracing S2 defines the same wiretap map. -/
def WiretapData.Valid (d : WiretapData B E S1 S2) : Prop :=
d.Vᴴ * d.V = 1 ∧ ∀ z, ‖d.psi z‖ = 1
/-- PDF p.2, Eq.(2): purified output in order B,E,S1,S2. -/
def purifiedWiretapSignal (d : WiretapData B E S1 S2) (z : Bool) :
EuclideanSpace ℂ (B × E × S1 × S2) :=
WithLp.toLp 2 fun o => ∑ a : Bool, d.V (o.1, o.2.1, o.2.2.2) a * d.psi z (a, o.2.2.1)
/-- PDF p.2: Bob's marginal of the channel fixed by V, on all operators. -/
def bobMap (d : WiretapData B E S1 S2) : Superop Bool B :=
fun rho => traceRight (d.V * rho * d.Vᴴ)
/-- PDF pp.2,5: Eve's marginal traces B and S2, excluding both shields. -/
def eveMap (d : WiretapData B E S1 S2) : Superop Bool E :=
fun rho => Matrix.of fun e f => ∑ b : B, ∑ s : S2,
(d.V * rho * d.Vᴴ) (b, e, s) (b, f, s)
/-- PDF p.2, Eq.(1): amplitude cq channel to Bob. -/
def amplitudeBob (d : WiretapData B E S1 S2) (z : Bool) :=
bobMap d (traceRight (pureDensity (d.psi z)))
/-- PDF p.2, Eq.(8): amplitude cq channel to Eve. -/
def amplitudeEve (d : WiretapData B E S1 S2) (z : Bool) :=
eveMap d (traceRight (pureDensity (d.psi z)))
/-- The phase (-1)^b. -/
def bitSign (b : Bool) : ℂ := if b then -1 else 1
/-- PDF p.2, Eq.(6): normalized phase pure output, C first and Eve last. -/
def phaseVector (d : WiretapData B E S1 S2) (x : Bool) :
EuclideanSpace ℂ ((Bool × B × S1 × S2) × E) :=
WithLp.toLp 2 fun o => (Real.sqrt 2 : ℂ)⁻¹ * bitSign (x && o.1.1) *
purifiedWiretapSignal d o.1.1 (o.1.2.1, o.2, o.1.2.2.1, o.1.2.2.2)
/-- PDF p.2, Eq.(5): virtual phase output C,B,S1,S2; only E is traced out. -/
def phaseBob (d : WiretapData B E S1 S2) (x : Bool) :=
traceRight (pureDensity (phaseVector d x))
/-- PDF p.1: Holevo information in bits for equiprobable finite labels.
Uses below have nonempty labels and normalized states by the physical construction. -/
def uniformHolevo {L O : Type} [Fintype L] [Fintype O] [DecidableEq O]
(W : L → Matrix O O ℂ) : ℝ :=
vnEntropy ((Fintype.card L : ℂ)⁻¹ • ∑ l, W l) -
(Fintype.card L : ℝ)⁻¹ * ∑ l, vnEntropy (W l)
/-- PDF p.4: fixed-ensemble symmetric private information; signed, with no optimization. -/
def symmetricPrivateInformation (d : WiretapData B E S1 S2) : ℝ :=
uniformHolevo (amplitudeBob d) - uniformHolevo (amplitudeEve d)
/-- PDF p.3: Arikan G_N=B_N F^(tensor n), F=[[1,0],[1,1]].
Index digits are least significant first; B_N reverses the row's n digits. -/
def polarEntry (n : ℕ) (i j : Fin (2 ^ n)) : Bool :=
decide (∀ k : Fin n, Nat.testBit j.val k.val = true →
Nat.testBit i.val (n - 1 - k.val) = true)
/-- PDF pp.3–4: row multiplication by G_N (false) or G_N^T (true), over F_2. -/
def polarEncode (n : ℕ) (reverse : Bool) (u : Qubits (2 ^ n)) : Qubits (2 ^ n) :=
fun j => decide ((∑ i : Fin (2 ^ n), (u i).toNat *
(if reverse then polarEntry n j i else polarEntry n i j).toNat) % 2 = 1)
/-- PDF p.3: the binary inner product used in the phase exponent. -/
def dotParity {n : ℕ} (x z : Qubits (2 ^ n)) : Bool :=
decide ((∑ i, (x i).toNat * (z i).toNat) % 2 = 1)
/-- PDF pp.3–4: previous amplitude bits or future phase bits as side information. -/
abbrev polarSideIndices (n : ℕ) (reverse : Bool) (i : Fin (2 ^ n)) :=
{j : Fin (2 ^ n) // if reverse then i.val < j.val else j.val < i.val}
/-- PDF pp.3–4, Eqs.(10)–(11): the other N-1 bits are uniform, the polarSideIndices bits are
revealed classically, and the opposite side is averaged. Phase uses G_N^T. -/
def splitOutput {O : Type} [Fintype O] [DecidableEq O] (n : ℕ) (reverse : Bool)
(W : Bool → Matrix O O ℂ) (i : Fin (2 ^ n)) (b : Bool) :
Matrix ((polarSideIndices n reverse i → Bool) × (Fin (2 ^ n) → O))
((polarSideIndices n reverse i → Bool) × (Fin (2 ^ n) → O)) ℂ :=
Matrix.of fun p q => if p.1 = q.1 then
(((2 : ℝ) ^ (2 ^ n - 1))⁻¹ : ℂ) *
∑ u ∈ Finset.univ.filter (fun u : Qubits (2 ^ n) => u i = b ∧
∀ j : polarSideIndices n reverse i, u j.val = p.1 j),
QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) W (polarEncode n reverse u) p.2 q.2
else 0
/-- PDF p.3, Eq.(12): strictly less than threshold, applied to ROOT fidelity. -/
def goodIndices {O : Type} [Fintype O] [DecidableEq O] (n : ℕ) (reverse : Bool)
(W : Bool → Matrix O O ℂ) (beta : ℝ) : Finset (Fin (2 ^ n)) :=
Finset.univ.filter fun i =>
rootFidelity (splitOutput n reverse W i false) (splitOutput n reverse W i true) <
Real.rpow 2 (-Real.rpow ((2 : ℝ) ^ n) beta)
/-- PDF p.4: A union X, exactly the amplitude-good indices. -/
def decodedIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
goodIndices n false (amplitudeBob d) beta
/-- PDF p.4: phase-good indices of the virtual channel with both shields. -/
def phaseGoodIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
goodIndices n true (phaseBob d) beta
/-- PDF p.4: A, good in both amplitude and phase. -/
def privateIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
decodedIndices d beta n ∩ phaseGoodIndices d beta n
/-- PDF p.4: Bbad, bad in both variables. -/
def keyIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
Finset.univ \ (decodedIndices d beta n ∪ phaseGoodIndices d beta n)
/-- PDF p.4: X, independent uniform local random bits. -/
def randomIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
decodedIndices d beta n \ phaseGoodIndices d beta n
/-- PDF p.4: Z, uniform frozen bits shared with Bob. -/
def frozenIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
phaseGoodIndices d beta n \ decodedIndices d beta n
/-- PDF p.4: signed net rate; cast both cardinalities before subtracting. -/
def netRate (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
(((privateIndices d beta n).card : ℝ) - ((keyIndices d beta n).card : ℝ)) / (2 : ℝ) ^ n
/-- PDF pp.5–7: consumed secret-key bits per channel use. -/
def keyRate (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
(keyIndices d beta n).card / (2 : ℝ) ^ n
/-- PDF p.3: the displayed coherent output, with exponent x dot z and purifiedWiretapSignal z G_N.
Output order is (C,B,S1,S2)^N followed by E^N. -/
def encodedPhaseVector (d : WiretapData B E S1 S2) (n : ℕ) (x : Qubits (2 ^ n)) :
EuclideanSpace ℂ ((Fin (2 ^ n) → Bool × B × S1 × S2) × (Fin (2 ^ n) → E)) :=
WithLp.toLp 2 fun p =>
let z : Qubits (2 ^ n) := fun i => (p.1 i).1
(Real.sqrt ((2 : ℝ) ^ (2 ^ n)) : ℂ)⁻¹ * bitSign (dotParity x z) *
∏ i, purifiedWiretapSignal d (polarEncode n false z i)
((p.1 i).2.1, p.2 i, (p.1 i).2.2.1, (p.1 i).2.2.2)
/-- PDF p.3: trace only Eve from the displayed coherent output. -/
def encodedPhaseOutput (d : WiretapData B E S1 S2) (n : ℕ) (x : Qubits (2 ^ n)) :=
traceRight (pureDensity (encodedPhaseVector d n x))
/-- PDF p.3: the extra polar encoder U_E on C^N, identity on B^N S1^N S2^N. -/
def referenceEncoder (d : WiretapData B E S1 S2) (n : ℕ) :
Matrix (Fin (2 ^ n) → Bool × B × S1 × S2)
(Fin (2 ^ n) → Bool × B × S1 × S2) ℂ :=
Matrix.of fun y z => if (∀ i, (y i).2 = (z i).2) ∧
(fun i => (y i).1) = polarEncode n false (fun i => (z i).1) then 1 else 0
/-- PDF p.4: split the actual phase output, revealing future bits, averaging past bits. -/
def actualPhaseSplit (d : WiretapData B E S1 S2) (n : ℕ) (i : Fin (2 ^ n)) (b : Bool) :=
Matrix.of fun p q : (polarSideIndices n true i → Bool) ×
(Fin (2 ^ n) → Bool × B × S1 × S2) =>
if p.1 = q.1 then (((2 : ℝ) ^ (2 ^ n - 1))⁻¹ : ℂ) *
∑ x ∈ Finset.univ.filter (fun x : Qubits (2 ^ n) => x i = b ∧
∀ j : polarSideIndices n true i, x j.val = p.1 j), encodedPhaseOutput d n x p.2 q.2
else 0
/-- PDF p.4: POVMs depend on the known frozen/key bits; outcomes contain all A union X.
No measurement depends on the unknown private or randomized bits. -/
abbrev PolarDecoderEffects (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
({i : Fin (2 ^ n) // i ∉ decodedIndices d beta n} → Bool) →
({i : Fin (2 ^ n) // i ∈ decodedIndices d beta n} → Bool) →
Matrix (Fin (2 ^ n) → B) (Fin (2 ^ n) → B) ℂ
/-- PDF pp.3–4: a successive cancellation decoder performs a binary projective test
for each index in A union X, in increasing order; a test uses the previous decisions and
the known frozen/key bits, and frozen indices require no measurement. Outcomes are the
sequential effects K^dagger K, not an unconstrained family of message-dependent POVMs. -/
def IsSuccessiveCancellation (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
(M : PolarDecoderEffects d beta n) : Prop :=
∃ T : ({i : Fin (2 ^ n) // i ∉ decodedIndices d beta n} → Bool) →
(i : Fin (2 ^ n)) → (polarSideIndices n false i → Bool) →
Matrix (Fin (2 ^ n) → B) (Fin (2 ^ n) → B) ℂ,
(∀ k i v, IsEffect (T k i v) ∧ T k i v * T k i v = T k i v) ∧
∀ k m,
let u : Qubits (2 ^ n) := fun i => if h : i ∈ decodedIndices d beta n then m ⟨i, h⟩
else k ⟨i, h⟩
let steps := List.ofFn (fun i : Fin (2 ^ n) =>
if i ∈ decodedIndices d beta n then
let P := T k i (fun j => u j.val)
if u i then 1 - P else P
else 1)
let K := steps.foldl (fun K P => P * K) 1
M k m = Kᴴ * K
/-- PDF pp.3–4: average error over the independent uniform bits in A,X,Z,Bbad. -/
def decoderError (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
(M : PolarDecoderEffects d beta n) : ℝ :=
((2 : ℝ) ^ (2 ^ n))⁻¹ * ∑ u : Qubits (2 ^ n),
(1 - effectProb (M (fun i => u i.val) (fun i => u i.val))
(QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) (amplitudeBob d) (polarEncode n false u)))
/-- PDF p.4: sqrt(2 times the sum of ROOT fidelities), exactly the printed radical. -/
def reliabilityBound (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
Real.sqrt (2 * ∑ i ∈ decodedIndices d beta n,
rootFidelity (splitOutput n false (amplitudeBob d) i false)
(splitOutput n false (amplitudeBob d) i true))
/-- PDF p.4: 2^(-N^beta/2), where N=2^n. -/
def decayHalf (beta : ℝ) (n : ℕ) : ℝ :=
Real.rpow 2 (-Real.rpow ((2 : ℝ) ^ n) beta / 2)
/-- PDF p.4: actual conditional Eve state for a uniform private message. Average X,Z,Bbad
independently; the real normalization 2^|A|/2^N avoids truncated natural subtraction. -/
def privateMessageEveState (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
(m : {i : Fin (2 ^ n) // i ∈ privateIndices d beta n} → Bool) :
Matrix (Fin (2 ^ n) → E) (Fin (2 ^ n) → E) ℂ :=
(((2 : ℝ) ^ (privateIndices d beta n).card / (2 : ℝ) ^ (2 ^ n) : ℝ) : ℂ) •
∑ u ∈ Finset.univ.filter (fun u : Qubits (2 ^ n) =>
∀ i : {i : Fin (2 ^ n) // i ∈ privateIndices d beta n}, u i.val = m i),
QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) (amplitudeEve d) (polarEncode n false u)
/-- PDF p.4, Theorem 2: unconditional uniform-message Holevo leakage I(U_A;E^N), in bits. -/
def privateMessageLeakageBits (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
uniformHolevo (privateMessageEveState d beta n)
/-- PDF p.5: Bob simulates Eve E, not the larger complementary register E S2. -/
def EveDegradable (d : WiretapData B E S1 S2) : Prop :=
∃ D : Superop B E, IsChannel D ∧ ∀ rho, D (bobMap d rho) = eveMap d rho
/-- Sanity: phase signs. -/
example : bitSign false = 1 ∧ bitSign true = -1 := by
simp [bitSign]
/-- Sanity: G_1 is the identity entry. -/
example : polarEntry 0 0 0 = true := by
simp [polarEntry]
/-- PDF p.6, Appendix A, Eq.(14): measure the input basis then prepare the classical
joint output; every off-diagonal input entry is discarded. -/
def classicalEmbedding {X Y Z : Type} [Fintype X] [Fintype Y] [Fintype Z]
(p : X → Y → Z → ℝ) : Superop X (Y × Z) :=
fun rho => Matrix.of fun a b => if a = b then
∑ x, rho x x * (p x a.1 a.2 : ℂ) else 0
/-- PDF p.6, Appendix A: Kraus operator sqrt(p(y,z|x)) |y,z><x|. -/
def classicalKraus {X Y Z : Type} (p : X → Y → Z → ℝ)
(s : X × Y × Z) : Matrix (Y × Z) X ℂ :=
Matrix.of fun o a => if o = (s.2.1, s.2.2) ∧ a = s.1 then
(Real.sqrt (p s.1 s.2.1 s.2.2) : ℂ) else 0
/-- PDF p.6, Appendix A: the explicit dilation stores (x,y,z) in S2.
The physical output is only (y,z); S2 is not appended to Eve. -/
def classicalDilation {X Y Z : Type} (p : X → Y → Z → ℝ) :
Matrix ((Y × Z) × (X × Y × Z)) X ℂ :=
Matrix.of fun o a => if o.1 = (o.2.2.1, o.2.2.2) ∧ a = o.2.1 then
(Real.sqrt (p o.2.1 o.2.2.1 o.2.2.2) : ℂ) else 0
/-- PDF p.7, Appendix C.A: BSC transition probability; inequality of bits is XOR. -/
def bscProbability (p : ℝ) (x y : Bool) : ℝ := if x = y then 1 - p else p
/-- PDF p.7: computational-basis output states of a BSC. -/
def bscOutput (p : ℝ) (x : Bool) : Matrix Bool Bool ℂ :=
Matrix.of fun y z => if y = z then (bscProbability p x y : ℂ) else 0
/-- PDF p.7, Eq.(17): independent BSC outputs conditioned on the same input bit. -/
def independentBsc (pB pE : ℝ) (x y z : Bool) : ℝ :=
bscProbability pB x y * bscProbability pE x z
/-- PDF pp.9–10: erasure dilation |a> -> sqrt(1-eps)|a,e>+sqrt(eps)|e,a>.
Both shields are trivial, and symbol 2 is the orthogonal erasure flag. -/
def erasureData (eps : ℝ) : WiretapData (Fin 3) (Fin 3) Unit Unit where
V := Matrix.of fun o a =>
if o.1.val = a.toNat ∧ o.2.1 = 2 then (Real.sqrt (1 - eps) : ℂ)
else if o.1 = 2 ∧ o.2.1.val = a.toNat then (Real.sqrt eps : ℂ) else 0
psi := fun z => ket (z, ())
/-- PDF p.10: the accepted qubit amplitude-damping channel with loss probability 1-eta.
Its Kraus labels are reversed relative to the source; the summed channel is the same. -/
def dampingMap (eta : ℝ) : Superop Bool Bool := QAlgorithms.Papers.Independent.Independent2.P01.damping (1 - eta)
/-- PDF p.10: the actual amplitude-channel output for a computational-basis input. -/
def dampingAmplitude (eta : ℝ) (z : Bool) :=
dampingMap eta (pureDensity (ket z))
/-- PDF p.10: phase-modulated Bell vector with reference C first and Bob's input second. -/
def binaryPhaseBellVector (x : Bool) : EuclideanSpace ℂ (Bool × Bool) :=
WithLp.toLp 2 fun p => if p.1 = p.2 then
bitSign (x && p.1) / (Real.sqrt 2 : ℂ) else 0
/-- PDF pp.10–11: apply the same amplitude-damping channel to half of the Bell state. -/
def dampingPhaseOutput (eta : ℝ) (x : Bool) :=
idTensorSuperop (dampingMap eta) (pureDensity (binaryPhaseBellVector x))
/-- Computational order |00>, |01>, |10>, |11>, C first. -/
def cbIndex (p : Bool × Bool) : Fin 4 :=
if p.1 then (if p.2 then 3 else 2) else (if p.2 then 1 else 0)
/-- PDF p.11: the exact displayed matrix, including loss at |10><10|. -/
def dampingPhaseMatrix (eta : ℝ) (x : Bool) : Matrix (Fin 4) (Fin 4) ℂ :=
!![1 / 2, 0, 0, bitSign x * (Real.sqrt eta : ℂ) / 2;
0, 0, 0, 0;
0, 0, (1 - (eta : ℂ)) / 2, 0;
bitSign x * (Real.sqrt eta : ℂ) / 2, 0, 0, (eta : ℂ) / 2]
/-- Sanity: a classical channel discards every off-diagonal output entry. -/
example {X Y Z : Type} [Fintype X] [Fintype Y] [Fintype Z]
(p : X → Y → Z → ℝ) (rho : Matrix X X ℂ) (a b : Y × Z) (h : a ≠ b) :
classicalEmbedding p rho a b = 0 := by
simp [classicalEmbedding, h]
/-- Sanity: a noiseless BSC has no bit-flip transition. -/
example (x : Bool) : bscProbability 0 x x = 1 := by
simp [bscProbability]
/-- Sanity: at eta=1 the loss Kraus operator is zero on every entry. -/
example : QAlgorithms.Papers.Independent.Independent2.P01.dampingKraus (1 - (1 : ℝ)) true = 0 := by
ext b a
simp [QAlgorithms.Papers.Independent.Independent2.P01.dampingKraus]
/-- Sanity: C first puts the loss basis vector |10> at matrix index 2. -/
example : cbIndex (true, false) = 2 := by
rfl
/-- Sanity: tracing the purification gives the usual matrix contraction over S1. -/
example (d : WiretapData B E S1 S2) (z a b : Bool) :
(traceRight (pureDensity (d.psi z))) a b = ∑ s : S1, d.psi z (a, s) * conj (d.psi z (b, s)) := by
rfl
/-- Sanity: zero input bits remain zero under either linear encoder. -/
example (n : ℕ) (reverse : Bool) :
polarEncode n reverse (fun _ => false) = fun _ => false := by
funext j
simp [polarEncode]
/-- Sanity: a singleton input label carries zero Holevo information. -/
example {O : Type} [Fintype O] [DecidableEq O] (rho : Matrix O O ℂ) :
uniformHolevo (fun _ : Unit => rho) = 0 := by
simp [uniformHolevo]
/-- Sanity: erasure endpoints transmit to Bob or to Eve with unit amplitude. -/
example : (erasureData 0).V (0, 2, ()) false = 1 ∧
(erasureData 1).V (2, 0, ()) false = 1 := by
simp [erasureData]
end
end QAlgorithms.Papers.Independent.Intakethird100.P74
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P74.EveDegradable
For the finite index types , with the equality decisions required by the constructions, let be data consisting of a matrix and two vectors . The proposition says that there exists a function from complex matrices to complex matrices having a finite Kraus representation: for some natural number and matrices , ,
It must satisfy, for every complex matrix ,
The universal quantifier over includes matrices that are not density matrices. No validity condition on is imposed, and its vectors do not enter this proposition.
QAlgorithms.Papers.Independent.Intakethird100.P74.IsSuccessiveCancellation
For finite types , with decidable equality as required, arbitrary data , , , and a matrix family on , where , define
Here are bits. Let exactly when every in binary position of implies a in position of , and otherwise let it be , and set . For assigning bits to indices preceding , define
where the sum runs over all length- bit strings satisfying the displayed conditions and square roots use continuous functional calculus. The arguments of range over bit assignments on , respectively. The predicate says that there exists a family of matrices on , defined for every such , every , and every assignment on , such that and are positive semidefinite and . For every , combine them into by on and on , and set
It requires precisely
The conditions on also apply at indices outside , although those matrices are replaced by in the product. No validity assumption on is included; gives a one-factor product, and empty assignment domains carry their unique assignment.
QAlgorithms.Papers.Independent.Intakethird100.P74.PolarDecoderEffects
For finite types , with decidable equality as required, arbitrary data , any , and any , put . Define
Let exactly when every binary digit of equal to forces digit of to equal , and otherwise let ; write . For assignments on and strings , set
Using matrix square roots from continuous functional calculus, let
The abbreviation denotes the type of all functions assigning a complex matrix on to each pair consisting of a bit assignment on and a bit assignment on . It imposes no positivity, normalization, or measurement condition on these matrices. Empty assignment domains have their unique empty assignment, and , hence , is included.
QAlgorithms.Papers.Independent.Intakethird100.P74.WiretapData.Valid
For a datum on finite index types , validity means exactly that and for every Boolean ; explicitly, for all Booleans ,
These conditions cannot hold if any of is empty.
QAlgorithms.Papers.Independent.Intakethird100.P74.WiretapData
For arbitrary types , a wiretap datum consists of a complex matrix , whose rows are indexed by and columns by , and two complex vectors , one for each Boolean , with coordinates indexed by . The structure itself imposes no isometry, normalization, positivity, finiteness, or nonemptiness requirements.
QAlgorithms.Papers.Independent.Intakethird100.P74.actualPhaseSplit
For arbitrary data on types , with finite for the partial trace, any , an index , and a bit , let . The definition gives a matrix indexed by pairs , where and . Define exactly when every in binary position of implies a in position of , and otherwise let it be ; put and
For each bit string , define
The defined matrix has entries
The prefactor is , regardless of the number of later indices. No validity or normalization condition on is assumed. For , there is one bit and no later index, the prefactor is , and the sum contains the single string .
QAlgorithms.Papers.Independent.Intakethird100.P74.amplitudeBob
For index types , with finite, a datum , and a Boolean , this definition gives the complex -indexed matrix with entries
Thus the Boolean input matrix has entries , is conjugated by , and is then summed over matching and coordinates. No validity assumption is imposed; empty summed index types give zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.amplitudeEve
For index types , with finite, a datum , and a Boolean , this definition gives the complex -indexed matrix with entries
Thus the Boolean input matrix has entries , is conjugated by , and is then summed over matching and coordinates. No validity assumption is imposed; empty summed index types give zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.binaryPhaseBellVector
For every Boolean value , this defines a vector indexed by pairs of Boolean values by
where for false and for true, and each ket is the corresponding coordinate vector. Equivalently, its amplitude is zero at unequal Boolean pairs, at , and either or at according as is false or true.
QAlgorithms.Papers.Independent.Intakethird100.P74.bitSign
For a Boolean , this definition gives the complex number when , and when .
QAlgorithms.Papers.Independent.Intakethird100.P74.bobMap
For index types , with finite, and a datum , this definition gives a function from complex Boolean-indexed square matrices to complex -indexed square matrices, defined for all by
Here range over the two Booleans. The vector family is unused; neither validity of nor a density-matrix condition on is assumed. An empty summed index type makes the output zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.bscOutput
For every real number and Boolean value , this defines a complex matrix with Boolean row and column indices by
Thus, in the order , and . The definition imposes no restriction on .
QAlgorithms.Papers.Independent.Intakethird100.P74.bscProbability
For every real number and Boolean values , the real-valued function is defined by
There is no assumption that , so the definition also includes values outside the probability range.
QAlgorithms.Papers.Independent.Intakethird100.P74.cbIndex
For a pair of Boolean values , this defines an index by
QAlgorithms.Papers.Independent.Intakethird100.P74.classicalDilation
For arbitrary types and any function , this defines a complex matrix with rows indexed by and columns indexed by , by
The square root is the real square root, embedded into , so negative values of give zero in the indicated entry. There are no finiteness or probability assumptions, and the definition itself imposes no isometry condition.
QAlgorithms.Papers.Independent.Intakethird100.P74.classicalEmbedding
For any finite types and any real-valued function , this defines a function from complex matrices to complex matrices by
The real coefficients are regarded as complex scalars. There is no assumption that is nonnegative or normalized, or that is a density matrix, and no assertion here that is a channel. Empty finite types are allowed; in particular, an empty input index type gives an empty sum and hence zero output entries.
QAlgorithms.Papers.Independent.Intakethird100.P74.classicalKraus
For arbitrary types , any function , and any triple , this defines a complex matrix with rows indexed by and columns indexed by , with entries
The square root is the real square root, embedded into , and equals zero when its real argument is negative. No finiteness, nonnegativity, normalization, or Kraus-completeness hypothesis is part of this definition.
QAlgorithms.Papers.Independent.Intakethird100.P74.dampingAmplitude
For every real number and Boolean value , let be the Boolean coordinate vector, and define
This is the matrix defined by dampingAmplitude. There is no hypothesis restricting ; real square roots of negative arguments are zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.dampingMap
For every real number , this defines a function from complex Boolean-indexed matrices to matrices of the same size by
with Boolean indices ordered as . The argument is arbitrary and need not be a density matrix. No restriction on is imposed; the real square roots are zero when their inputs are negative.
QAlgorithms.Papers.Independent.Intakethird100.P74.dampingPhaseMatrix
For every real number and Boolean value , let if and if . This defines the complex matrix, with rows and columns indexed in the order , by
There is no restriction on in this definition; the real square root used here is zero when .
QAlgorithms.Papers.Independent.Intakethird100.P74.dampingPhaseOutput
For every real number and Boolean value , define , where is or according as is false or true. This declaration defines the complex matrix
so the matrix transformation acts on the second Boolean factor and leaves the first factor unchanged. No restriction on is imposed; real square roots of negative arguments are zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.decayHalf
For every real and every natural number , this defines the real number
where both powers with real exponents are real powers. There is no restriction on , and is included, giving for every .
QAlgorithms.Papers.Independent.Intakethird100.P74.decodedIndices
Let be finite types, with decidable equality on , and let consist of an arbitrary complex matrix with rows indexed by and columns by Booleans, together with arbitrary vectors for Boolean . For every real and natural number , put , define
and, for each , let and define
with . Here is the parity of , where exactly when each set bit of implies a set bit of . This declaration defines the set of satisfying
using continuous functional calculus for the matrix roots. It imposes no isometry condition on , no normalization condition on , and no restriction on ; and empty index types are included.
QAlgorithms.Papers.Independent.Intakethird100.P74.decoderError
For finite types , with decidable equality as required, arbitrary data , any , , and a matrix family , put , define
and let exactly when every in binary position of forces a in position of , taking otherwise. Write and
For preceding-bit assignments , define when , and otherwise define it as . Let
with matrix square roots interpreted by continuous functional calculus, and take to be an arbitrary complex matrix on for each bit assignment on and on . The definition returns
Neither validity of nor any effect or successive-cancellation condition on is assumed, so this definition alone does not constrain the result to . The case averages over the two one-bit strings, and restrictions to empty index sets are the unique empty assignments.
QAlgorithms.Papers.Independent.Intakethird100.P74.dotParity
For every natural number and Boolean vectors of length , this defines a Boolean that is true exactly when
is odd. Thus it records the parity of the number of coordinates at which both vectors are true. The case has one coordinate, rather than an empty vector, and the result is true exactly when both values at that coordinate are true.
QAlgorithms.Papers.Independent.Intakethird100.P74.encodedPhaseOutput
For wiretap data on types , with finite for the partial trace, any , and any Boolean string of length , this defines a matrix indexed by strings . Let exactly when every in binary position of is accompanied by a in position of , and let it be otherwise; set and
Then the matrix entries are
Equivalently, it forms the outer product of the vector with coordinates , then sums over the same index on its two sides. No validity or normalization assumption on is included, so trace is not asserted. The definition includes , when the strings have length , and an empty makes the displayed sum empty.
QAlgorithms.Papers.Independent.Intakethird100.P74.encodedPhaseVector
For types , arbitrary data , any , and any Boolean string of length , this defines a complex Euclidean vector indexed by pairs , where and . Define exactly when every binary position at which has digit has digit at position of ; otherwise . Writing
the coordinate of the defined vector is
The sign is for even parity and for odd parity of the indicated sum. Neither nor unit norm of either is assumed, so the definition itself imposes no unit-norm condition on . It includes , for which , the condition defining is vacuous, , and the prefactor is .
QAlgorithms.Papers.Independent.Intakethird100.P74.erasureData
For every real number , this defines data consisting of a complex matrix from a Boolean input index to output indices , and two vectors indexed by . Identifying false and true with and , respectively, and writing for the coordinate vector at , these are
All other matrix entries are zero. No restriction on or assertion of validity accompanies the definition; real square roots of negative inputs are defined to be zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.eveMap
For index types , with finite, and a datum , this definition gives a function from complex Boolean-indexed square matrices to complex -indexed square matrices, defined for all by
Here range over the two Booleans. The vector family is unused; neither validity of nor a density-matrix condition on is assumed. An empty summed index type makes the output zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.frozenIndices
For finite types , with decidable equality on , arbitrary matrix , arbitrary vectors , real , and natural , let , define with Boolean , and put
where equals if both arguments are true and otherwise. For , set , , and
The sequences take values in for , and in for . Define exactly when each set bit of implies a set bit of ; the Boolean is the parity of , and is the parity of . Finally, with continuous-functional-calculus roots, put
The defined set contains exactly those satisfying and . No isometry or normalization hypothesis is imposed on , is unrestricted, and both and empty finite index types are included.
QAlgorithms.Papers.Independent.Intakethird100.P74.goodIndices
For any finite type with decidable equality, natural number , Boolean , arbitrary matrices for Boolean , and arbitrary real , this defines the finite set of indices for which
where each matrix square root is formed using continuous functional calculus. Here consists of indices strictly greater than when is true and strictly less than otherwise, and
The row and column indices have and . To define , put exactly when every set bit of implies a set bit of ; then is the parity of when is true and of otherwise. No density-matrix hypothesis on , nonemptiness hypothesis on , or restriction on is imposed. The case , hence , is included, and the displayed comparison is strict.
QAlgorithms.Papers.Independent.Intakethird100.P74.independentBsc
For all real numbers and Boolean values , this defines
Neither real parameter is required to lie in .
QAlgorithms.Papers.Independent.Intakethird100.P74.keyIndices
For finite types , with decidable equality on , arbitrary , arbitrary vectors , real , and natural , put , , and
where ranges over Booleans and is when both arguments are true and otherwise. For , set , , and
The output indices lie in for , and in for . Define exactly when every set bit of implies a set bit of ; then is the parity of , and is the parity of . With
where roots use continuous functional calculus, the defined set consists exactly of indices satisfying both and ; equality with the threshold is included. No isometry or normalization condition on the data is imposed, is arbitrary, is included, and the finite types may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P74.keyRate
For finite types , with decidable equality as required, arbitrary data , any , and any , let , represent Boolean values by , and define
The latter matrices are indexed by . Let exactly when, for every , a in binary position of implies a in position of , and otherwise let . Set and . For and , define
where assign bits to , and are output strings of . With
using continuous functional calculus for matrix square roots, the definition returns
No validity assumption on , or restriction on , is part of this definition. The case is included: there is one index, no side bits, and denominator . An empty set in the numerator gives rate .
QAlgorithms.Papers.Independent.Intakethird100.P74.netRate
For finite types , with decidable equality as required, arbitrary wiretap data , any , and any , put and identify Boolean values with . Here has entries , and has entries ; no isometry or normalization assumption is imposed on these data. Define
On the alphabet , define
Let , for , equal exactly when every binary digit of that equals has the binary digit of equal to . For a bit string , set and . For either , let , , and define the matrices
Here are assignments on , and are -tuples of output symbols of . Write
where matrix square roots use continuous functional calculus. Define
The definition returns
Thus the numerator subtracts the number of indices failing both strict tests from the number passing both. The definition includes , when , all side-index sets are empty, and the denominator is ; the returned real number is not required to be nonnegative.
QAlgorithms.Papers.Independent.Intakethird100.P74.phaseBob
For index types , with finite, a datum , and a Boolean , this definition gives a complex square matrix indexed by . For and , its entries are
where exactly when both Booleans are true, and is otherwise. No validity assumption is required; if is empty, the matrix is zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.phaseGoodIndices
Let be finite types, with decidable equality on , and let consist of an arbitrary matrix and arbitrary vectors . For real and natural , put , , and
where the sum over is over Booleans and if both are true, and otherwise. For , set and
where , and is the parity of , with exactly when every set bit of implies a set bit of . The defined set consists of precisely those for which
with matrix roots interpreted by continuous functional calculus. No isometry or normalization condition on is assumed; is unrestricted, is allowed, and the finite types need not be nonempty.
QAlgorithms.Papers.Independent.Intakethird100.P74.phaseVector
For arbitrary index types , a datum , and a Boolean , this definition gives a complex vector indexed by , with coordinate
No validity or normalization assumption on is required.
QAlgorithms.Papers.Independent.Intakethird100.P74.polarEncode
For every natural number , Boolean , and Boolean vector of length , this defines a Boolean vector of length . For , let equal exactly when every set bit in position of corresponds to a set bit in position of . Interpreting false and true as and , respectively, the output is specified by
Both choices of are allowed. When , , the bit condition defining is vacuous, and the output equals the one-coordinate input.
QAlgorithms.Papers.Independent.Intakethird100.P74.polarEntry
For every natural number and integers , this defines a Boolean that is true exactly when, for every , a set bit in position of implies a set bit in position of , where bit position is the least significant position. The subtraction is natural-number subtraction; these bounds on ensure that is the indicated reflected position. When , the only possible indices are , the condition has no instances, and the result is true.
QAlgorithms.Papers.Independent.Intakethird100.P74.polarSideIndices
For every natural number , Boolean , and index , this defines the type of indices satisfying when , and satisfying when . The inequalities are strict, so itself is excluded. This type is empty when and , or when and ; in particular it is empty for both choices when .
QAlgorithms.Papers.Independent.Intakethird100.P74.privateIndices
For finite types , with decidable equality on , arbitrary data consisting of and vectors , real , and natural , put and define , summing over Boolean . Define two matrix families by
where when both arguments are true and is otherwise. For , take , , and define matrices
Here ranges over for and over for ; writing exactly when each set bit of implies a set bit of , is the parity of , and is the parity of . Put
using continuous functional calculus for roots. This declaration defines precisely the indices satisfying both and . No validity condition on , restriction on , or positivity of is required; gives , and empty index types are permitted.
QAlgorithms.Papers.Independent.Intakethird100.P74.privateMessageEveState
For finite types , with decidable equality as required, arbitrary data , any , and , put and define
Let exactly when every binary position at which has digit has digit at position of , and otherwise let it be . Set , , , and . Define
where are assignments on the indicated side-index set and are output strings of . With , using continuous functional calculus, let
For every message , the definition gives a complex matrix on with entries
No validity assumption on is imposed, so the declaration does not assert that this matrix has trace . If is empty, there is one empty message and the formula averages over all strings; if contains every index, the sum has one term and prefactor . The case , when , is included.
QAlgorithms.Papers.Independent.Intakethird100.P74.privateMessageLeakageBits
For finite index types , with decidable equality as required by the constructions, let consist of a complex matrix with rows indexed by and columns indexed by , and vectors for . For any real and natural number , put and . Identify Boolean values with , and define the binary matrix by precisely when, for every , a in bit of implies a in bit of . Define
Set
and let , , and . For a binary matrix-valued family , define its split matrices , whose indices are pairs , by
Here the minus sign uses , and the plus sign uses . Write , with matrix square roots given by real square-root continuous functional calculus, and put
For every assignment , define
The declared real number is
There is no validity assumption on , no restriction on , and is included. The set may be empty; then there is one assignment , and this expression is zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.purifiedWiretapSignal
For arbitrary index types , a datum , and a Boolean , this definition gives the complex vector on whose coordinate at is
No validity or normalization assumption on is required.
QAlgorithms.Papers.Independent.Intakethird100.P74.randomIndices
For finite types , with decidable equality on , arbitrary data and , real , and natural , put , , summing over Boolean , and define
where if both arguments are true and otherwise. Set , , and, for , define
Here for , while for . For exactly when each set bit of implies a set bit of , define as the parity of and as the parity of . Write
with matrix roots formed by continuous functional calculus. This defines exactly the indices for which and . There is no validity assumption on the data and no restriction on ; , giving , and empty finite index types are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P74.referenceEncoder
For types , any data , and any , put . This defines a complex matrix whose row and column indices are strings in . Let exactly when, for every , a in binary position of implies a in position of , and otherwise let . For row and column , the entry is
The entries of and in , and the type , do not enter this formula. No validity hypothesis on is required. For , and , so this is the identity matrix on the indicated one-coordinate strings.
QAlgorithms.Papers.Independent.Intakethird100.P74.reliabilityBound
For finite types , with decidable equality as required, arbitrary data , any , and , let , and define
Let exactly when every in binary position of implies a in position of , taking otherwise, and put . For assignments on and , define
Writing , with matrix square roots defined by continuous functional calculus, and , the definition returns
This is a defined real number; the declaration itself states no inequality involving a decoder. No validity hypothesis on or restriction on is imposed. An empty gives , and is included, with one index and no preceding bits. The outer square root is the total real square-root function, which returns on negative arguments.
QAlgorithms.Papers.Independent.Intakethird100.P74.splitOutput
For any finite type with decidable equality, natural number , Boolean , arbitrary family of complex matrices indexed by Booleans , index , and Boolean , this defines a matrix indexed by pairs , where and is a Boolean assignment on if , or otherwise. Define to be exactly when every set bit of corresponds to a set bit of , and define as the parity of for , or otherwise, interpreting Boolean values as . Its entries are
There is no positivity, trace, or normalization hypothesis on . When , this reduces, under the unique empty side assignment and one-coordinate output indexing, to . The type may be empty, in which case the matrix has an empty index type.
QAlgorithms.Papers.Independent.Intakethird100.P74.symmetricPrivateInformation
For finite index types , with decidable equality on , and a datum , define, for each Boolean ,
and define matrices by
With , the definition gives
No validity assumption on is imposed; empty index types are permitted, with empty sums equal to zero.
QAlgorithms.Papers.Independent.Intakethird100.P74.uniformHolevo
For finite types , with decidable equality on , and any family of complex -indexed square matrices, let
where denotes continuous functional calculus. This definition gives the real number
No positivity, trace-one, or nonemptiness assumption is imposed. Inverses are total, so ; the value is zero if or is empty.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.