Definitions for On rounds in quantum communication
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P81The objects the formalized statements of On rounds in quantum communication (arXiv:quant-ph/0004100) are stated in. Each was checked against the paper by a blind read-back and a moderator.
jointMutualInfoBits: Definition 8, p.8: mutual information in bits, with both marginals computed from rho.jointMarginalProduct: P.11: the product of the actual marginals, never an unrelated state parameter.informationalDistance: P.11: informational distance is the FULL trace norm, without a half factor.swapState: P.11, Lemma 2.1: exchange the named tensor factors.classicalWeight: Pp.11–12: probability of a classical A outcome.firstRegisterConditionalBlock: Pp.11–12: the normalized conditional B state; the zero-probability branch is set to zero and is always multiplied by its zero probability in Lemma 3.2.agreement: P.11, Lemma 3.1: jointly measure a Boolean POVM on A and the standard basis on B.PointerMap: Definition 11, PDF p.12: unrestricted two-sided functional graph. Both input tables have n entries, each in Fin n; the two copies are separately owned.Vertex: The disjoint labelled vertex sets, with standard labels 0,...,n-1 and n,...,2n-1.successor: Definition 11, PDF p.12: no injectivity or acyclicity promise.endpoint: Definition 11, PDF p.12: the endpoint follows k+1 pointers from the fixed Alice vertex.vertexLabel: Definition 11, PDF p.12: standard binary code of the disjoint vertex labels.pointerParity: Definition 11, PDF p.12: XOR of ALL binary bits, independent of leading zero padding.nonDisjoint: Section 6, PDF p.19: the source's DISJ accepts intersecting sets.iteratedLog: P.13: saturated real iterated binary logarithm; the zeroth iterate is n.logStar: P.13: least iteration reaching one. For positive finite integer n this set is nonempty; all resource statements exclude n<2.ClassicalTree: Definition 4, pp.5–6: a finite deterministic binary protocol with local output.ClassicalTree.run: Definition 4, pp.5–6: execution follows the local input at each transcript node.ClassicalTree.cost: Definition 4, pp.5–6: worst-case transmitted bits; local announcements cost nothing. Unused branches can be pruned, so this presents every finite worst-case protocol.ClassicalTree.changes: P.6: number of subsequent speaker changes along the worst branch.ClassicalTree.rounds: P.6: at most k messages with the specified starter, allowing empty padding.PublicProtocol: Definition 4: the public randomness is independent of both inputs. Finite input/cost protocols have only finitely many distinct deterministic trees, so grouping seeds loses nothing.PublicProtocol.bounded: Definition 4: worst-case communication and rounds on every public seed of positive weight.PublicProtocol.computes: Definition 4: correctness for EVERY input, with the protocol fixed before the input.QuantumRound: Definition 5, p.6: one round's fixed speaker/wires and local-input-controlled unitaries.QuantumRound.matrix: Definition 5: the unitary can inspect only its speaker's classical input.QuantumRound.update: Definition 5: transferring a fixed set of owned wires changes ownership, not the state.owned: Owned wire set, used to enforce physical locality, p.6.roundsLegal: Definition 5: all operations and transfers act only on the speaker's owned wires.speakerAt: Alternating messages, p.6; t is zero-based.QuantumProtocol: Definition 5 and Definition 6, pp.6–7: arbitrary finite private and shared workspace. Final announcements are a local measurement and are not charged transmissions.QuantumProtocol.ownerAt: Ownership at the cut after t messages (before message t+1), pp.14–15.QuantumProtocol.measurement: Input-local final POVM, Definition 5.QuantumProtocol.valid: Definition 5: all registers normalized, all transfers legal, exactly k alternating messages (possibly empty), and a local output POVM.QuantumProtocol.cost: Definition 5: structural count of transmitted qubits, never a free cost label.QuantumProtocol.stateAt: Definition 5: actual execution, with all round unitaries fixed before either input.QuantumProtocol.probability: Definition 5: the final local measurement's output distribution.QuantumProtocol.computes: Definition 5: bounded error is a worst-case, per-input guarantee.coherentInitial: P.14, coherent execution for Lemma 7: input registers are explicitly retained, and measurements pinch only actual local computational registers. No remote path access occurs. Uniform coherent input, tensor the normalized input-independent work state. For PointerMap n the normalization factor is exactly 1/n^n.controlledRound: Pp.6,14: input controls are block diagonal and leave BOTH input registers unchanged.MeasurementPattern: Pp.14,18: optional standard-basis measurements of specified physical registers. The X and Y registers belong to Alice and Bob respectively; each work wire has its current owner.dephaseSelectedRegisters: Pp.14,18: nonselective local measurements, keeping all classical values in their registers. This is the product of the owners' local dephasings, with no communicated outcome for free.coherentExecutionStateAt: Pp.14,18: constructed state after t messages, with any chosen local register measurements at each cut. The all-empty pattern is the unmeasured run.AliceConfig: Alice's actual owned work configurations at a cut, pp.14,18.BobConfig: Complementary work configurations; with two parties these are exactly Bob's wires.mergeWork: Recombine local work configurations on the same physical wires.aliceInputJoint: Lemma 7, p.18: the actual (F_A M_A):F_B reduction, tracing out only Bob's WORK wires. Input registers remain in the state and are not replaced by arbitrary marginals.LocalChannel: Definition 2 and the model paragraph p.6: a CPTP operation local to S. The finite normalized Kraus family gives complete positivity, complex linearity and trace preservation.ChannelRound: P.6: a round in the local CPTP model, with fixed sender, transfers and boundaries.ChannelRound.operation: P.6: local classical input control for a general local quantum operation.ChannelRound.update: P.6: changing the owner of exactly the specified sent wires.channelRoundsLegal: P.6: legality ensures there are no remote operations or undeclared transmissions.ChannelProtocol: P.6: the same fixed communication model with local CPTP maps in place of unitaries.ChannelProtocol.finalOwner: P.6: final ownership after all fixed transfers.ChannelProtocol.measurement: P.6: the announcing player's own-input-controlled measurement.ChannelProtocol.valid: P.6: complete validity conditions, including normalization and a local output.ChannelProtocol.finalState: P.6: the actual output density matrix after all local channels and ownership transfers.ChannelProtocol.cost: P.6: the structural communication cost.ChannelProtocol.probability: P.6: the full measured output law to be preserved by simulation.BlankExtension: P.6: additional PRIVATE blank ancillas, rather than stronger prior entanglement or advice. The injection preserves the original ownership and embeds exactly the original initial vector.preparationRound: P.7: Alice prepares the input-independent shared vector on local wires, then sends exactly the wires intended for Bob; the preparation phase is uncharged.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_ExtendedQuantumEntropy
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_P54
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P44
noncomputable section
open scoped Matrix ComplexConjugate ENNReal
attribute [local instance] Classical.propDecidable
namespace QAlgorithms.Papers.Independent.Intakethird100.P81
open QAlgorithms.Papers.Independent.Information100.P54 (relativeEntropyBits)
open QAlgorithms.Papers.Independent.Bridge50.P44 (ClassicalFirst)
/-! Paper-local interfaces for Klauck, arXiv:quant-ph/0004100v5.
All page numbers below are PDF page numbers. No frozen definition is modified.
-/
/-- Definition 8, p.8: mutual information in bits, with both marginals computed from rho. -/
def jointMutualInfoBits {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
(rho : Matrix (A × B) (A × B) ℂ) : ℝ :=
vnEntropy (traceRight rho) + vnEntropy (traceLeft rho) - vnEntropy rho
/-- P.11: the product of the actual marginals, never an unrelated state parameter. -/
def jointMarginalProduct {A B : Type*} [Fintype A] [Fintype B]
(rho : Matrix (A × B) (A × B) ℂ) : Matrix (A × B) (A × B) ℂ :=
Matrix.kronecker (traceRight rho) (traceLeft rho)
/-- P.11: informational distance is the FULL trace norm, without a half factor. -/
def informationalDistance {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
(rho : Matrix (A × B) (A × B) ℂ) : ℝ :=
traceNorm (rho - jointMarginalProduct rho)
/-- P.11, Lemma 2.1: exchange the named tensor factors. -/
def swapState {A B : Type*} (rho : Matrix (A × B) (A × B) ℂ) :
Matrix (B × A) (B × A) ℂ :=
fun p q => rho (p.2, p.1) (q.2, q.1)
/-- Pp.11–12: probability of a classical A outcome. -/
def classicalWeight {A B : Type*} [Fintype B]
(rho : Matrix (A × B) (A × B) ℂ) (a : A) : ℝ :=
(∑ b, rho (a, b) (a, b)).re
/-- Pp.11–12: the normalized conditional B state; the zero-probability branch is set to zero
and is always multiplied by its zero probability in Lemma 3.2. -/
def firstRegisterConditionalBlock {A B : Type*} [Fintype B]
(rho : Matrix (A × B) (A × B) ℂ) (a : A) : Matrix B B ℂ :=
fun b b' => (classicalWeight rho a : ℂ)⁻¹ * rho (a, b) (a, b')
/-- P.11, Lemma 3.1: jointly measure a Boolean POVM on A and the standard basis on B. -/
def agreement {A : Type*} [Fintype A]
(M : Bool → Matrix A A ℂ) (rho : Matrix (A × Bool) (A × Bool) ℂ) : ℝ :=
∑ b : Bool, (∑ a, ∑ a', M b a a' * rho (a', b) (a, b)).re
example {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
(rho : Matrix (A × B) (A × B) ℂ) (h : rho = jointMarginalProduct rho) :
informationalDistance rho = 0 := by
unfold informationalDistance
rw [sub_eq_zero.mpr h]
simp [traceNorm, cfc_zero]
example {A B : Type*} (rho : Matrix (A × B) (A × B) ℂ) :
swapState (swapState rho) = rho := rfl
example {A B : Type*} [Fintype B] (rho : Matrix (A × B) (A × B) ℂ)
(a : A) (h : classicalWeight rho a = 0) : firstRegisterConditionalBlock rho a = 0 := by
ext b b'
simp [firstRegisterConditionalBlock, h]
example (h : IsDensityMatrix (1 : Matrix (Fin 1) (Fin 1) ℂ)) :
relativeEntropyBits (I := Fin 1) 1 1 = 0 := by
simp [relativeEntropyBits, h, QuantumLoss.umegakiEntropy, cfc_one]
/-- Definition 11, PDF p.12: unrestricted two-sided functional graph.
Both input tables have n entries, each in Fin n; the two copies are separately owned. -/
abbrev PointerMap (n : ℕ) := Fin n → Fin n
/-- The disjoint labelled vertex sets, with standard labels 0,...,n-1 and n,...,2n-1. -/
abbrev Vertex (n : ℕ) := Sum (Fin n) (Fin n)
/-- Definition 11, PDF p.12: no injectivity or acyclicity promise. -/
def successor {n : ℕ} (a b : PointerMap n) : Vertex n → Vertex n
| .inl v => .inr (a v)
| .inr v => .inl (b v)
/-- Definition 11, PDF p.12: the endpoint follows k+1 pointers from the fixed Alice vertex. -/
def endpoint {n : ℕ} (k : ℕ) (v1 : Fin n) (a b : PointerMap n) : Vertex n :=
(successor a b)^[k + 1] (.inl v1)
/-- Definition 11, PDF p.12: standard binary code of the disjoint vertex labels. -/
def vertexLabel {n : ℕ} : Vertex n → ℕ
| .inl v => v.val
| .inr v => n + v.val
/-- Definition 11, PDF p.12: XOR of ALL binary bits, independent of leading zero padding. -/
def pointerParity {n : ℕ} (k : ℕ) (v1 : Fin n) (a b : PointerMap n) : Bool :=
decide ((Nat.digits 2 (vertexLabel (endpoint k v1 a b))).sum % 2 = 1)
/-- Section 6, PDF p.19: the source's DISJ accepts intersecting sets. -/
def nonDisjoint {n : ℕ} (x y : Fin n → Bool) : Bool :=
decide (∃ i, x i = true ∧ y i = true)
example {n : ℕ} (v : Fin n) (a b : PointerMap n) :
endpoint 0 v a b = .inr (a v) := rfl
example {n : ℕ} (a b : PointerMap n) (v : Fin n) :
successor a b (.inr v) = .inl (b v) := rfl
example : nonDisjoint (n := 0) (fun i => Fin.elim0 i) (fun i => Fin.elim0 i) = false := by
simp [nonDisjoint]
/-- P.13: saturated real iterated binary logarithm; the zeroth iterate is n. -/
def iteratedLog : ℕ → ℝ → ℝ
| 0, n => max 1 n
| j + 1, n => max 1 (Real.logb 2 (iteratedLog j n))
/-- P.13: least iteration reaching one. For positive finite integer n this set is nonempty;
all resource statements exclude n<2. -/
def logStar (n : ℕ) : ℕ := sInf {j : ℕ | iteratedLog j n ≤ 1}
example : iteratedLog 0 1 = 1 := by norm_num [iteratedLog]
/-! Classical protocols: finite public mixtures of finite binary communication trees.
Each bit is selected using only its speaker's input and the public transcript. A change
of speaker starts a new message. An initial empty message is charged as a round.
-/
/-- Definition 4, pp.5–6: a finite deterministic binary protocol with local output. -/
inductive ClassicalTree (X Y O : Type) where
| outputAlice (f : X → O)
| outputBob (f : Y → O)
| alice (bit : X → Bool) (zero one : ClassicalTree X Y O)
| bob (bit : Y → Bool) (zero one : ClassicalTree X Y O)
/-- Definition 4, pp.5–6: execution follows the local input at each transcript node. -/
def ClassicalTree.run {X Y O : Type} : ClassicalTree X Y O → X → Y → O
| .outputAlice f, x, _ => f x
| .outputBob f, _, y => f y
| .alice bit zero one, x, y => if bit x then one.run x y else zero.run x y
| .bob bit zero one, x, y => if bit y then one.run x y else zero.run x y
/-- Definition 4, pp.5–6: worst-case transmitted bits; local announcements cost nothing.
Unused branches can be pruned, so this presents every finite worst-case protocol. -/
def ClassicalTree.cost {X Y O : Type} : ClassicalTree X Y O → ℕ
| .outputAlice _ => 0
| .outputBob _ => 0
| .alice _ zero one => 1 + max zero.cost one.cost
| .bob _ zero one => 1 + max zero.cost one.cost
/-- P.6: number of subsequent speaker changes along the worst branch. -/
def ClassicalTree.changes {X Y O : Type} : ClassicalTree X Y O → Party → ℕ
| .outputAlice _, _ => 0
| .outputBob _, _ => 0
| .alice _ zero one, prev => (if prev = .alice then 0 else 1) +
max (zero.changes .alice) (one.changes .alice)
| .bob _ zero one, prev => (if prev = .bob then 0 else 1) +
max (zero.changes .bob) (one.changes .bob)
/-- P.6: at most k messages with the specified starter, allowing empty padding. -/
def ClassicalTree.rounds {X Y O : Type} (T : ClassicalTree X Y O) (start : Party) : ℕ :=
match T with
| .outputAlice _ => 0
| .outputBob _ => 0
| .alice _ zero one => (if start = .alice then 1 else 2) +
max (zero.changes .alice) (one.changes .alice)
| .bob _ zero one => (if start = .bob then 1 else 2) +
max (zero.changes .bob) (one.changes .bob)
/-- Definition 4: the public randomness is independent of both inputs. Finite input/cost
protocols have only finitely many distinct deterministic trees, so grouping seeds loses nothing. -/
structure PublicProtocol (X Y O : Type) where
seeds : ℕ
weight : Fin seeds → ℝ
nonnegative : ∀ s, 0 ≤ weight s
normalized : ∑ s, weight s = 1
tree : Fin seeds → ClassicalTree X Y O
/-- Definition 4: worst-case communication and rounds on every public seed of positive weight. -/
def PublicProtocol.bounded {X Y O : Type} (P : PublicProtocol X Y O)
(start : Party) (k c : ℕ) : Prop :=
∀ s, 0 < P.weight s → (P.tree s).rounds start ≤ k ∧ (P.tree s).cost ≤ c
/-- Definition 4: correctness for EVERY input, with the protocol fixed before the input. -/
def PublicProtocol.computes {X Y O : Type} [DecidableEq O]
(P : PublicProtocol X Y O) (f : X → Y → O) (eps : ℝ) : Prop :=
∀ x y, 1 - eps ≤ ∑ s, P.weight s * (if (P.tree s).run x y = f x y then 1 else 0)
example {X Y O : Type} (f : X → O) :
(ClassicalTree.outputAlice (Y := Y) f).cost = 0 := rfl
example {X Y O : Type} (f : Y → O) (x : X) (y : Y) :
(ClassicalTree.outputBob (X := X) f).run x y = f y := rfl
example (f : Unit → Bool) :
(ClassicalTree.alice (Y := Unit) (fun _ : Unit => false)
(.outputAlice f) (.outputAlice f)).rounds .bob = 2 := rfl
/-! Quantum protocols: fixed finite wire ownership, input-local unitaries, fixed transfers,
and a final local POVM. Prior assistance is a single normalized input-independent vector.
-/
/-- Definition 5, p.6: one round's fixed speaker/wires and local-input-controlled unitaries. -/
structure QuantumRound (X Y : Type) (N : ℕ) where
speaker : Party
sent : Finset (Fin N)
alice : X → Matrix.unitaryGroup (Qubits N) ℂ
bob : Y → Matrix.unitaryGroup (Qubits N) ℂ
/-- Definition 5: the unitary can inspect only its speaker's classical input. -/
def QuantumRound.matrix {X Y : Type} {N : ℕ} (r : QuantumRound X Y N)
(x : X) (y : Y) : Matrix (Qubits N) (Qubits N) ℂ :=
if r.speaker = .alice then r.alice x else r.bob y
/-- Definition 5: transferring a fixed set of owned wires changes ownership, not the state. -/
def QuantumRound.update {X Y : Type} {N : ℕ} (r : QuantumRound X Y N)
(own : Fin N → Party) : Fin N → Party :=
fun q => if q ∈ r.sent then r.speaker.other else own q
/-- Owned wire set, used to enforce physical locality, p.6. -/
def owned {N : ℕ} (own : Fin N → Party) (p : Party) : Finset (Fin N) :=
Finset.univ.filter fun q => own q = p
/-- Definition 5: all operations and transfers act only on the speaker's owned wires. -/
def roundsLegal {X Y : Type} {N : ℕ} :
(Fin N → Party) → List (QuantumRound X Y N) → Prop
| _, [] => True
| own, r :: rs => (∀ q ∈ r.sent, own q = r.speaker) ∧
(∀ x y, ActsWithin (owned own r.speaker) (r.matrix x y)) ∧
roundsLegal (r.update own) rs
/-- Alternating messages, p.6; t is zero-based. -/
def speakerAt (start : Party) (t : ℕ) : Party :=
if t % 2 = 0 then start else start.other
/-- Definition 5 and Definition 6, pp.6–7: arbitrary finite private and shared workspace.
Final announcements are a local measurement and are not charged transmissions. -/
structure QuantumProtocol (X Y O : Type) where
N : ℕ
initial : EuclideanSpace ℂ (Qubits N)
owner : Fin N → Party
rounds : List (QuantumRound X Y N)
outputParty : Party
measureAlice : X → O → Matrix (Qubits N) (Qubits N) ℂ
measureBob : Y → O → Matrix (Qubits N) (Qubits N) ℂ
/-- Ownership at the cut after t messages (before message t+1), pp.14–15. -/
def QuantumProtocol.ownerAt {X Y O : Type} (P : QuantumProtocol X Y O) (t : ℕ) :
Fin P.N → Party :=
(P.rounds.take t).foldl (fun own r => r.update own) P.owner
/-- Input-local final POVM, Definition 5. -/
def QuantumProtocol.measurement {X Y O : Type} (P : QuantumProtocol X Y O)
(x : X) (y : Y) : O → Matrix (Qubits P.N) (Qubits P.N) ℂ :=
if P.outputParty = .alice then P.measureAlice x else P.measureBob y
/-- Definition 5: all registers normalized, all transfers legal, exactly k alternating
messages (possibly empty), and a local output POVM. -/
def QuantumProtocol.valid {X Y O : Type} [Fintype O]
(P : QuantumProtocol X Y O) (start : Party) (k : ℕ) : Prop :=
‖P.initial‖ = 1 ∧ P.rounds.length = k ∧ roundsLegal P.owner P.rounds ∧
(∀ i : Fin P.rounds.length, (P.rounds.get i).speaker = speakerAt start i.val) ∧
∀ x y, IsPOVM (P.measurement x y) ∧ ∀ o,
ActsWithin (owned (P.ownerAt P.rounds.length) P.outputParty) (P.measurement x y o)
/-- Definition 5: structural count of transmitted qubits, never a free cost label. -/
def QuantumProtocol.cost {X Y O : Type} (P : QuantumProtocol X Y O) : ℕ :=
(P.rounds.map fun r => r.sent.card).sum
/-- Definition 5: actual execution, with all round unitaries fixed before either input. -/
def QuantumProtocol.stateAt {X Y O : Type} (P : QuantumProtocol X Y O)
(x : X) (y : Y) (t : ℕ) : EuclideanSpace ℂ (Qubits P.N) :=
(P.rounds.take t).foldl (fun psi r => act (r.matrix x y) psi) P.initial
/-- Definition 5: the final local measurement's output distribution. -/
def QuantumProtocol.probability {X Y O : Type} (P : QuantumProtocol X Y O)
(x : X) (y : Y) (o : O) : ℝ :=
effectProb (P.measurement x y o) (pureDensity (P.stateAt x y P.rounds.length))
/-- Definition 5: bounded error is a worst-case, per-input guarantee. -/
def QuantumProtocol.computes {X Y O : Type} (P : QuantumProtocol X Y O)
(f : X → Y → O) (eps : ℝ) : Prop :=
∀ x y, 1 - eps ≤ P.probability x y (f x y)
example {X Y O : Type} (P : QuantumProtocol X Y O) (x : X) (y : Y) :
P.stateAt x y 0 = P.initial := rfl
example {X Y O : Type} (P : QuantumProtocol X Y O) (h : P.rounds = []) : P.cost = 0 := by
simp [QuantumProtocol.cost, h]
/-- P.14, coherent execution for Lemma 7: input registers are explicitly retained, and
measurements pinch only actual local computational registers. No remote path access occurs.
Uniform coherent input, tensor the normalized input-independent work state.
For PointerMap n the normalization factor is exactly 1/n^n. -/
def coherentInitial {X Y O : Type} [Fintype X] [Fintype Y]
(P : QuantumProtocol X Y O) : EuclideanSpace ℂ ((X × Y) × Qubits P.N) :=
WithLp.toLp 2 fun z =>
(((Real.sqrt ((Fintype.card X : ℝ) * Fintype.card Y))⁻¹ : ℝ) : ℂ) * P.initial z.2
/-- Pp.6,14: input controls are block diagonal and leave BOTH input registers unchanged. -/
def controlledRound {X Y : Type} [DecidableEq X] [DecidableEq Y] {N : ℕ}
(r : QuantumRound X Y N) : Matrix ((X × Y) × Qubits N) ((X × Y) × Qubits N) ℂ :=
fun p q => if p.1 = q.1 then r.matrix p.1.1 p.1.2 p.2 q.2 else 0
/-- Pp.14,18: optional standard-basis measurements of specified physical registers.
The X and Y registers belong to Alice and Bob respectively; each work wire has its current owner. -/
structure MeasurementPattern (N : ℕ) where
aliceInput : Bool
bobInput : Bool
wires : Finset (Fin N)
/-- Pp.14,18: nonselective local measurements, keeping all classical values in their registers.
This is the product of the owners' local dephasings, with no communicated outcome for free. -/
def dephaseSelectedRegisters {X Y : Type} [DecidableEq X] [DecidableEq Y] {N : ℕ}
(m : MeasurementPattern N)
(rho : Matrix ((X × Y) × Qubits N) ((X × Y) × Qubits N) ℂ) :
Matrix ((X × Y) × Qubits N) ((X × Y) × Qubits N) ℂ :=
fun p q => if (m.aliceInput = false ∨ p.1.1 = q.1.1) ∧
(m.bobInput = false ∨ p.1.2 = q.1.2) ∧ (∀ w ∈ m.wires, p.2 w = q.2 w)
then rho p q else 0
/-- Pp.14,18: constructed state after t messages, with any chosen local register measurements
at each cut. The all-empty pattern is the unmeasured run. -/
def coherentExecutionStateAt {X Y O : Type} [Fintype X] [Fintype Y] [DecidableEq X] [DecidableEq Y]
(P : QuantumProtocol X Y O) (m : ℕ → MeasurementPattern P.N) :
ℕ → Matrix ((X × Y) × Qubits P.N) ((X × Y) × Qubits P.N) ℂ
| 0 => dephaseSelectedRegisters (m 0) (pureDensity (coherentInitial P))
| t + 1 => match P.rounds[t]? with
| none => coherentExecutionStateAt P m t
| some r => dephaseSelectedRegisters (m (t + 1))
(controlledRound r * coherentExecutionStateAt P m t * (controlledRound r)ᴴ)
/-- Alice's actual owned work configurations at a cut, pp.14,18. -/
abbrev AliceConfig {N : ℕ} (own : Fin N → Party) := {q : Fin N // own q = .alice} → Bool
/-- Complementary work configurations; with two parties these are exactly Bob's wires. -/
abbrev BobConfig {N : ℕ} (own : Fin N → Party) := {q : Fin N // own q ≠ .alice} → Bool
/-- Recombine local work configurations on the same physical wires. -/
def mergeWork {N : ℕ} (own : Fin N → Party) (a : AliceConfig own) (b : BobConfig own) :
Qubits N :=
fun q => if h : own q = .alice then a ⟨q, h⟩ else b ⟨q, h⟩
/-- Lemma 7, p.18: the actual (F_A M_A):F_B reduction, tracing out only Bob's WORK wires.
Input registers remain in the state and are not replaced by arbitrary marginals. -/
def aliceInputJoint {X Y : Type} {N : ℕ} (own : Fin N → Party)
(rho : Matrix ((X × Y) × Qubits N) ((X × Y) × Qubits N) ℂ) :
Matrix ((X × AliceConfig own) × Y) ((X × AliceConfig own) × Y) ℂ :=
fun p q => ∑ b : BobConfig own,
rho ((p.1.1, p.2), mergeWork own p.1.2 b)
((q.1.1, q.2), mergeWork own q.1.2 b)
example {X Y : Type} [DecidableEq X] [DecidableEq Y] {N : ℕ}
(rho : Matrix ((X × Y) × Qubits N) ((X × Y) × Qubits N) ℂ) :
dephaseSelectedRegisters ⟨false, false, ∅⟩ rho = rho := by
ext p q
simp [dephaseSelectedRegisters]
example {X Y : Type} [DecidableEq X] [DecidableEq Y] {N : ℕ}
(r : QuantumRound X Y N) (x : X) (y : Y) (z z' : Qubits N) :
controlledRound r ((x,y),z) ((x,y),z') = r.matrix x y z z' := by
simp [controlledRound]
/- Lemma 7 is intentionally not asserted. The coherent execution above makes its
prior-entanglement counterexample precise; see this unit's HARD.md and MODERATION_NOTES.md.
A classical input reference would change the printed unmeasured-input claim. -/
/-! Local CPTP protocols, pp.6–7. Private environments may be preallocated to any finite size;
the simulation theorem puts no erroneous dimension bound on the new ancillas.
-/
/-- Definition 2 and the model paragraph p.6: a CPTP operation local to S.
The finite normalized Kraus family gives complete positivity, complex linearity and trace preservation. -/
def LocalChannel {N : ℕ} (S : Finset (Fin N)) (F : Superop (Qubits N) (Qubits N)) : Prop :=
∃ (d : ℕ) (E : Fin d → Matrix (Qubits N) (Qubits N) ℂ),
IsKrausFamily E ∧ (∀ j, ActsWithin S (E j)) ∧ ∀ rho, F rho = krausApply E rho
/-- P.6: a round in the local CPTP model, with fixed sender, transfers and boundaries. -/
structure ChannelRound (X Y : Type) (N : ℕ) where
speaker : Party
sent : Finset (Fin N)
alice : X → Superop (Qubits N) (Qubits N)
bob : Y → Superop (Qubits N) (Qubits N)
/-- P.6: local classical input control for a general local quantum operation. -/
def ChannelRound.operation {X Y : Type} {N : ℕ} (r : ChannelRound X Y N)
(x : X) (y : Y) : Superop (Qubits N) (Qubits N) :=
if r.speaker = .alice then r.alice x else r.bob y
/-- P.6: changing the owner of exactly the specified sent wires. -/
def ChannelRound.update {X Y : Type} {N : ℕ} (r : ChannelRound X Y N)
(own : Fin N → Party) : Fin N → Party :=
fun q => if q ∈ r.sent then r.speaker.other else own q
/-- P.6: legality ensures there are no remote operations or undeclared transmissions. -/
def channelRoundsLegal {X Y : Type} {N : ℕ} :
(Fin N → Party) → List (ChannelRound X Y N) → Prop
| _, [] => True
| own, r :: rs => (∀ q ∈ r.sent, own q = r.speaker) ∧
(∀ x y, LocalChannel (owned own r.speaker) (r.operation x y)) ∧
channelRoundsLegal (r.update own) rs
/-- P.6: the same fixed communication model with local CPTP maps in place of unitaries. -/
structure ChannelProtocol (X Y O : Type) where
N : ℕ
initial : EuclideanSpace ℂ (Qubits N)
owner : Fin N → Party
rounds : List (ChannelRound X Y N)
outputParty : Party
measureAlice : X → O → Matrix (Qubits N) (Qubits N) ℂ
measureBob : Y → O → Matrix (Qubits N) (Qubits N) ℂ
/-- P.6: final ownership after all fixed transfers. -/
def ChannelProtocol.finalOwner {X Y O : Type} (P : ChannelProtocol X Y O) : Fin P.N → Party :=
P.rounds.foldl (fun own r => r.update own) P.owner
/-- P.6: the announcing player's own-input-controlled measurement. -/
def ChannelProtocol.measurement {X Y O : Type} (P : ChannelProtocol X Y O)
(x : X) (y : Y) : O → Matrix (Qubits P.N) (Qubits P.N) ℂ :=
if P.outputParty = .alice then P.measureAlice x else P.measureBob y
/-- P.6: complete validity conditions, including normalization and a local output. -/
def ChannelProtocol.valid {X Y O : Type} [Fintype O]
(P : ChannelProtocol X Y O) (start : Party) (k : ℕ) : Prop :=
‖P.initial‖ = 1 ∧ P.rounds.length = k ∧ channelRoundsLegal P.owner P.rounds ∧
(∀ i : Fin P.rounds.length, (P.rounds.get i).speaker = speakerAt start i.val) ∧
∀ x y, IsPOVM (P.measurement x y) ∧ ∀ o,
ActsWithin (owned P.finalOwner P.outputParty) (P.measurement x y o)
/-- P.6: the actual output density matrix after all local channels and ownership transfers. -/
def ChannelProtocol.finalState {X Y O : Type} (P : ChannelProtocol X Y O)
(x : X) (y : Y) : Matrix (Qubits P.N) (Qubits P.N) ℂ :=
P.rounds.foldl (fun rho r => r.operation x y rho) (pureDensity P.initial)
/-- P.6: the structural communication cost. -/
def ChannelProtocol.cost {X Y O : Type} (P : ChannelProtocol X Y O) : ℕ :=
(P.rounds.map fun r => r.sent.card).sum
/-- P.6: the full measured output law to be preserved by simulation. -/
def ChannelProtocol.probability {X Y O : Type} (P : ChannelProtocol X Y O)
(x : X) (y : Y) (o : O) : ℝ :=
effectProb (P.measurement x y o) (P.finalState x y)
/-- P.6: additional PRIVATE blank ancillas, rather than stronger prior entanglement or advice.
The injection preserves the original ownership and embeds exactly the original initial vector. -/
def BlankExtension {X Y O : Type} (P : ChannelProtocol X Y O)
(Q : QuantumProtocol X Y O) : Prop :=
∃ e : Fin P.N ↪ Fin Q.N, (∀ q, Q.owner (e q) = P.owner q) ∧
∀ z : Qubits Q.N, Q.initial z =
if ∀ q, q ∉ Set.range e → z q = false then P.initial (z ∘ e) else 0
example {X Y O : Type} (P : ChannelProtocol X Y O) (h : P.rounds = []) (x : X) (y : Y) :
P.finalState x y = pureDensity P.initial := by
simp [ChannelProtocol.finalState, h]
example {X Y O : Type} (P : ChannelProtocol X Y O) (h : P.rounds = []) : P.cost = 0 := by
simp [ChannelProtocol.cost, h]
/-- P.7: Alice prepares the input-independent shared vector on local wires, then sends
exactly the wires intended for Bob; the preparation phase is uncharged. -/
def preparationRound {N : ℕ} (own : Fin N → Party)
(U : Matrix.unitaryGroup (Qubits N) ℂ) : QuantumRound Unit Unit N where
speaker := .alice
sent := owned own .bob
alice := fun _ => U
bob := fun _ => 1
example {N : ℕ} (own : Fin N → Party) (U : Matrix.unitaryGroup (Qubits N) ℂ) :
(preparationRound own U).sent = owned own .bob := rfl
end QAlgorithms.Papers.Independent.Intakethird100.P81
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P81.AliceConfig
For any natural number and any ownership assignment , an Alice configuration is a Boolean-valued function on the subset of wires satisfying . It assigns one bit to each such wire, with no further conditions. If Alice owns no wires, including when , there is exactly one Alice configuration: the empty function.
QAlgorithms.Papers.Independent.Intakethird100.P81.BlankExtension
For arbitrary types , a channel protocol , and a quantum protocol with the same input and outcome types, the blank-extension property means that there exists an injection from 's wires into 's wires preserving their initial owners, such that for every bit string on 's wires,
Thus the initial vector is 's initial vector placed on the embedded wires with all additional wires fixed to false. Owners of additional wires are unrestricted. This property places no conditions on either protocol's rounds, measurements, output party, or validity. Either wire count may be zero whenever such an injection exists, and if there are no additional wires the condition outside the image is vacuous.
QAlgorithms.Papers.Independent.Intakethird100.P81.BobConfig
For any natural number and any ownership assignment , a Bob configuration is a Boolean-valued function on the subset of wires satisfying , which here is exactly the subset owned by Bob. It assigns one bit to each such wire, with no further conditions. If this subset is empty, including when , there is exactly one Bob configuration: the empty function.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.cost
For arbitrary types and a channel protocol , its cost is the natural number , where is the finite set of wires marked as sent in round , and the sum follows the round list with repetitions of rounds counted separately. A wire sent in several rounds contributes once in each such round. Empty sent sets contribute zero, and an empty round list has cost zero. This definition requires no legality or validity assumption and includes protocols with zero wires.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.finalOwner
For arbitrary types and a channel protocol , its final ownership assignment is obtained by starting with its initial assignment and processing its round list in order: at each round, every wire in that round's sent set is assigned to the other party from its speaker, and all remaining owners are retained. This calculation does not require the round list to be legal and does not depend on either input or the round operations. For an empty round list the final ownership equals the initial ownership; zero wires are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.finalState
For arbitrary types , a channel protocol , and inputs , form the initial matrix with entries , where is 's initial vector and range over its -bit strings. The final matrix is obtained by processing the rounds in list order, replacing the current matrix by applied to it for an Alice round and by applied to it for a Bob round. Ownership updates and sent-wire sets play no role in this calculation. With no rounds the result is ; zero wires are allowed. No validity assumption is required, so the definition does not assert that the resulting matrix is a density matrix.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol
For arbitrary types , a channel protocol is a record containing a natural number ; a complex vector indexed by all -bit strings, called its initial vector; an initial assignment of Alice or Bob to each wire; a finite list of rounds, each specifying a speaker, a finite sent-wire set, and maps on complex matrices indexed separately by Alice's input in and Bob's input in ; an output party; and two families of complex matrices, one indexed by and one by , each matrix indexed by -bit strings. The record imposes no normalization on the initial vector, no channel or locality conditions on round maps, no scheduling conditions, and no measurement conditions on the matrix families. The types may be empty, may be zero, and the round list may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.measurement
For arbitrary types , a channel protocol , and inputs , , the selected outcome-indexed matrix family is 's Alice family at if its output party is Alice, and its Bob family at if its output party is Bob. Each matrix is indexed by the -bit strings, where is 's wire count. This selection alone asserts no positivity, completeness, or locality of the matrices, and applies also to zero wires or an empty outcome type.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.probability
For arbitrary types , a channel protocol , inputs , and an outcome , the defined real number is
Here is the outcome- matrix from Alice's family at if Alice is the output party, and from Bob's family at otherwise; starts with entries from the initial vector and is transformed through the round list in order, using each speaker's input-indexed map. The definition requires no validity assumption and therefore does not itself assert that this number lies in or that the outcome values sum to one. Zero wires and an empty round list are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelProtocol.valid
For arbitrary types , a finite type with a specified finite enumeration, a channel protocol , a starting party , and a natural number , validity means the conjunction of the following conditions: its initial vector has Euclidean norm one; its round list has exactly entries; that list is legal from its initial ownership; its round at every index has speaker when is even and the other party when is odd; and, for every , its selected outcome matrices are positive semidefinite, satisfy , and each act within the wires finally owned by its output party. The selected round operation uses the speaker's own input, and the selected measurement uses the output party's own input. Legality requires, successively, that each sent wire belongs to the current speaker, that every selected operation has a finite Kraus representation with and every acting within that speaker's currently owned wires, and that ownership is then updated by assigning sent wires to the other party. A matrix acts within a wire set when it is the extension of some matrix on an injectively selected list of wires contained in : its entry at strings is if they agree outside those wires, and zero otherwise. Final ownership is obtained by all these updates. Zero rounds and zero wires are allowed, and sent sets need not be nonempty. If either input type is empty, the universally quantified operation and measurement conditions have no instances; if both have elements and is empty, measurement completeness is impossible.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelRound
For arbitrary input types and any natural number , a channel round is a record containing a speaker chosen from Alice and Bob, a finite set of sent wires contained in , a function assigning to every a map from complex matrices on -bit strings to matrices of the same size, and another such function indexed by . These two families are called the Alice and Bob operations. The structure itself imposes no linearity, positivity, trace preservation, locality, ownership, or compatibility conditions on these maps or on the sent wires. Empty input types, an empty sent set, and are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelRound.operation
For arbitrary types , a natural number , a round consisting of a speaker (Alice or Bob), a finite set of sent wires, and input-indexed maps and on complex matrices indexed by -bit strings, and inputs , , the selected operation is if Alice speaks and if Bob speaks. The result is simply a function from such matrices to such matrices; this definition imposes no linearity, positivity, normalization, or locality condition. The sent wires do not affect this selection, and is allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.ChannelRound.update
For arbitrary types , a natural number , a round with speaker Alice or Bob and sent-wire set , and an ownership assignment assigning Alice or Bob to every wire, the updated owner of wire is the other party from 's speaker if , and is otherwise. Thus every listed sent wire is assigned to the speaker's other party, regardless of its previous owner; the definition itself does not require the speaker to own it. An empty sent set leaves ownership unchanged, including when .
QAlgorithms.Papers.Independent.Intakethird100.P81.ClassicalTree.changes
For arbitrary types , a classical tree has output leaves carrying a function or , and internal nodes labelled Alice or Bob, each carrying a Boolean function of that party’s input and two subtrees. Given such a tree and a previous party , is defined recursively: either kind of output leaf has value ; an Alice node with subtrees has value ; and a Bob node has the corresponding value with Bob in place of Alice. Thus it is the maximum number of party changes along a structural path of internal nodes, counting a change from the supplied previous party to the first node when they differ. Both branches enter the maximum even if their Boolean tests make a path impossible for any input; the party named by an output leaf contributes no change.
QAlgorithms.Papers.Independent.Intakethird100.P81.ClassicalTree.cost
For arbitrary types , assign a natural-number cost to each finite binary tree whose Alice and Bob leaves carry functions and , respectively, and whose internal nodes carry Boolean functions on the corresponding input type. Either kind of output leaf has cost , and either kind of internal node with children has cost . This counts the maximum number of internal nodes on a structural path to a leaf, including branches that no input can follow; it requires no finiteness or nonemptiness assumption on .
QAlgorithms.Papers.Independent.Intakethird100.P81.ClassicalTree
For arbitrary types , , and , with no finiteness or nonemptiness assumptions, a classical tree is a finite inductively constructed binary tree of four possible forms: an Alice output leaf carrying a function ; a Bob output leaf carrying a function ; an Alice internal node carrying a Boolean function and two child trees called zero and one; or a Bob internal node carrying a Boolean function and two such child trees.
QAlgorithms.Papers.Independent.Intakethird100.P81.ClassicalTree.rounds
For arbitrary types , a classical tree whose internal nodes test Boolean functions of Alice’s input in or Bob’s input in , and a designated starting party , is for either kind of output leaf. If the root belongs to party and has subtrees , its value is when , or when , plus the maximum number of subsequent party changes in either subtree, taking as the previous party. Here subsequent changes are counted recursively by adding whenever an internal node’s party differs from the preceding party and taking the maximum over both branches; output leaves add nothing. All structural branches enter these maxima, including paths unrealizable by any input.
QAlgorithms.Papers.Independent.Intakethird100.P81.ClassicalTree.run
For arbitrary types , a finite binary tree whose leaves carry output functions on or and whose internal nodes carry Boolean functions on or , and inputs and , execution is defined recursively as follows: an Alice output leaf carrying returns ; a Bob output leaf carrying returns ; an Alice internal node evaluates its Boolean function at and executes its one child if true and its zero child if false; a Bob internal node does the same using . Every recursive execution uses the same inputs . No finiteness or nonemptiness assumption is imposed on the types.
QAlgorithms.Papers.Independent.Intakethird100.P81.LocalChannel
For any natural number , finite wire subset , and function from complex matrices on -bit strings to matrices of the same size, this predicate means that there exist a natural number and matrices such that
and each acts within in the following precise sense: there exist a natural number , an injection with image contained in , and a complex matrix on -bit strings, such that when agree on all wires outside that image, and otherwise. The quantification over is not restricted to density matrices. Zero-wire embeddings, empty , and are included; a zero-wire embedding is a scalar multiple of the identity. Although ranges over all natural numbers, cannot satisfy the completeness equation because the -bit-string space is nonempty.
QAlgorithms.Papers.Independent.Intakethird100.P81.MeasurementPattern
For each natural number , a measurement pattern is a record containing two Booleans, called and , and a finite subset . These fields have no additional constraints. In particular, the wire subset may be empty, and when it must be empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.PointerMap
For each natural number , a pointer map is an arbitrary function , with no injectivity or surjectivity requirement. When , this is the unique function from the empty set to itself.
QAlgorithms.Papers.Independent.Intakethird100.P81.PublicProtocol.bounded
For arbitrary types , a public protocol with finitely many nonnegative seed weights summing to and associated classical trees, a starting party , and natural numbers , the boundedness predicate means that every seed of strictly positive weight has a tree with at most rounds from and cost at most . Cost is at an output leaf and plus the maximum child cost at a test node, so it counts the maximum number of test nodes on a structural path. Rounds are at an output leaf; otherwise they count for the first test node, an additional if its party differs from , and all subsequent changes of testing party, maximized over structural paths. Unrealizable branches still enter these maxima, output-leaf parties add nothing, and seeds of weight impose no bounds. Both and are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.PublicProtocol.computes
For arbitrary types with decidable equality on , a public protocol with seed weights summing to and classical trees , a function , and any real number , the computation predicate means that for every and ,
Running a tree follows the false or true subtree according to the current party’s Boolean test on its own input; an Alice output leaf returns its function evaluated at , and a Bob output leaf returns its function evaluated at . There is no separate restriction on : if , the inequality is automatic; if and both input types are nonempty, it cannot hold. If either input type is empty, the condition on input pairs is vacuous.
QAlgorithms.Papers.Independent.Intakethird100.P81.PublicProtocol
For arbitrary types , a public protocol consists of a natural number of seeds, a real weight for each , proofs that every and , and one classical tree for each seed. Each tree has Alice nodes testing functions , Bob nodes testing functions , two subtrees at every test node, and output leaves carrying either a function or a function . Zero weights are permitted. Although the seed count is specified as a natural number, cannot satisfy the normalization requirement.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.computes
For arbitrary types , a quantum protocol , a function , and a real number , this predicate means that for every ,
The vector is the initial vector after all round unitaries have been applied in order, with each round using its speaker's input-dependent unitary. The outcome matrix is taken from Alice's -dependent family if Alice is the designated output party and from Bob's -dependent family otherwise. This predicate does not itself require the protocol to be valid or to lie in any specified interval; it is vacuous if either input type is empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.cost
For arbitrary types and a quantum protocol , this defines its cost to be the natural number
Thus each round contributes the cardinality of its designated sent-wire set; a wire designated as sent in several rounds is counted once in each such round. An empty round list has cost . No validity assumption is required.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol
For arbitrary types , a quantum protocol consists of a natural number ; an initial complex vector indexed by the -bit strings , equipped with the Euclidean norm; an initial assignment of each of the wires to Alice or Bob; a list of quantum rounds; an output party; and two matrix families, one assigning a complex matrix on to each pair , and the other assigning such a matrix to each . Each round contains a speaker, a finite set of wires, and Alice and Bob input-indexed families of unitary matrices on the full -bit space. The structure imposes no normalization on the initial vector, no legality or alternation condition on the rounds, and no positivity, completeness, or ownership-support condition on the output matrix families. Both output families are included regardless of the output party; and an empty round list are permitted.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.measurement
For arbitrary types , a quantum protocol with qubits, and inputs , , this defines an -indexed family of complex matrices on the basis of -bit strings. If 's designated output party is Alice, the family is ; otherwise it is . The definition itself requires neither positivity nor that these matrices sum to the identity, and imposes no restriction on which wires they act on.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.ownerAt
For arbitrary types , a quantum protocol with qubits, and any natural number , this defines an ownership assignment on the wires . Start with 's initial ownership assignment and process the first rounds in order, where is the length of its round list. In each processed round, assign every wire in that round's designated sent set to the party other than the round's speaker, and leave every other wire's ownership unchanged. Thus gives the initial assignment, and gives the assignment after all listed rounds. This definition imposes no legality condition: a designated sent wire is reassigned in this way even if the speaker did not previously own it.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.probability
For arbitrary types , a quantum protocol on qubits, inputs , and an outcome , this defines the real number
Here is obtained from the initial vector by applying every listed round's unitary in order, using the round's Alice unitary at when Alice speaks and its Bob unitary at otherwise; is Alice's outcome matrix at if Alice is the output party and Bob's outcome matrix at otherwise. The matrix has entry . No validity, normalization, positivity, or measurement-completeness assumption is part of this definition.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.stateAt
For arbitrary types , a quantum protocol on qubits, inputs , and a natural number , this defines a complex vector indexed by -bit strings by starting with 's initial vector and applying, in list order, the unitary matrices from the first rounds, where is the round-list length. A round uses its Alice unitary evaluated at if its speaker is Alice, and its Bob unitary evaluated at otherwise. Explicitly, writing these matrices as and , the vector is
with the empty product giving . Sending wires has no separate effect on this vector. No validity or normalization assumption is imposed, returns the initial vector, and applies all listed rounds.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumProtocol.valid
For arbitrary input types , a finite outcome type , a quantum protocol on qubits, a starting party , and a natural number , this predicate means the conjunction of the following conditions. The initial vector, indexed by -bit strings, has Euclidean norm , and the round list has length exactly . Starting from the initial ownership assignment and processing rounds in order, every wire designated as sent must currently belong to the speaker, and, for every input pair , the round's unitary must act within the speaker's currently owned wires; after the round, all sent wires are assigned to the other party and the remaining ownership assignments stay unchanged. Here the round's unitary is its Alice unitary at when Alice speaks and its Bob unitary at when Bob speaks. The speaker of round , numbered from , must be for even and the other party for odd . Finally, for every , select Alice's -dependent measurement family if Alice is the output party and Bob's -dependent family otherwise: every outcome matrix must be positive semidefinite, their sum over must equal the identity, and every outcome matrix must act within the output party's wires after all rounds. Precisely, “acts within” a wire set means that there exist a natural number , an injection with image contained in , and a complex matrix on -bit strings such that the full matrix has entry when and agree outside the image of , and entry otherwise. The value is allowed. The definition also allows and empty sent sets; requirements quantified over input pairs are vacuous if either input type is empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumRound.matrix
For arbitrary types , any natural number , a quantum round containing a speaker, a selected wire set, an Alice input-indexed family of unitary matrices, and a Bob input-indexed family of unitary matrices on , and inputs , the selected matrix is Alice’s matrix at if the speaker is Alice, and Bob’s matrix at otherwise. It is returned as a complex matrix indexed by -bit strings. The wire set does not enter this selection, and is included.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumRound
For arbitrary types and any natural number , a quantum round consists of a speaker, either Alice or Bob; a finite set of wire indices from ; a function assigning to every a complex unitary matrix indexed by the -bit strings ; and another such function assigning a unitary matrix to every . Both families are included regardless of the speaker. This structure places no ownership or support conditions on the matrices or the selected wires. For , the wire set is empty and the matrices are indexed by the single empty bit string.
QAlgorithms.Papers.Independent.Intakethird100.P81.QuantumRound.update
For arbitrary types , any natural number , a quantum round , and an ownership assignment , the updated assignment gives every wire in ’s selected set to the party opposite ’s speaker and leaves every other wire’s owner equal to . The opposite of Alice is Bob and the opposite of Bob is Alice. This rule applies regardless of who previously owned a selected wire; an empty selected set leaves the assignment unchanged, including when .
QAlgorithms.Papers.Independent.Intakethird100.P81.Vertex
For each natural number , the vertex type is the disjoint union of two copies of . Write their elements as and ; these are distinct even when their indices agree. When , there are no vertices.
QAlgorithms.Papers.Independent.Intakethird100.P81.agreement
For any finite type , any pair of complex matrices on , and any complex matrix on , this defines the real number
There is no assumption that the matrices form a measurement or that is a density matrix. If is empty, the value is zero.
QAlgorithms.Papers.Independent.Intakethird100.P81.aliceInputJoint
For arbitrary types , any natural number , ownership assignment , and any complex matrix indexed by , this definition gives a matrix indexed by , where is the set of Boolean assignments to Alice’s wires. Writing for the Boolean assignments to all remaining wires and for the full string using on Alice’s wires and elsewhere, its entries are
No finiteness assumption on , or positivity or normalization assumption on , is imposed. The sum is finite because the work register has finitely many wires. If Bob has no wires, the sum has one term indexed by the empty assignment; this includes .
QAlgorithms.Papers.Independent.Intakethird100.P81.channelRoundsLegal
For arbitrary types , a natural number , an ownership assignment on the wires, and a finite list of rounds, legality is defined recursively: the empty list is legal for every ownership assignment; a list beginning with round is legal exactly when every wire in 's sent set is currently owned by its speaker, for every and its selected matrix map is a local channel on that speaker's currently owned wires, and the remaining rounds are legal after assigning every sent wire to the other party. Here the selected map is for an Alice round and for a Bob round. A map is a local channel on a wire set precisely when there exist a natural number and matrices , indexed by -bit strings, such that
and each acts within . Acting within means that for some natural number , injection with image contained in , and matrix indexed by -bit strings, its entry at strings equals when agree outside the image of , and equals zero otherwise. Zero wires, empty sent sets, and an empty round list are included; if or is empty, the condition on selected operations is vacuous. No alternating-speaker condition is part of this definition.
QAlgorithms.Papers.Independent.Intakethird100.P81.classicalWeight
For any type , finite type , complex matrix indexed by , and element , this defines
No positivity or normalization is required, so this real number is not assumed to be a probability. If is empty, it is zero; if is empty, there is no element to supply.
QAlgorithms.Papers.Independent.Intakethird100.P81.coherentExecutionStateAt
For arbitrary types , with finite enumerations and decidable equality for , any quantum protocol record with work qubits, and any sequence of measurement patterns , this definition recursively produces complex matrices indexed by . Set , where , and set , so . Here retains an entry exactly when its Alice input coordinates agree if the pattern’s Alice Boolean is true, its Bob input coordinates agree if the Bob Boolean is true, and its work strings agree on every selected wire; it sets all other entries to zero. If the protocol has a round at zero-based position , then
where is zero between unequal input pairs and, on the block for , equals Alice’s input- unitary or Bob’s input- unitary according to that round’s speaker. If position is absent, then , without applying the next pattern. Thus the sequence is constant after all listed rounds have been processed. No protocol validity or initial normalization is assumed; empty input types and are allowed, with inverse zero interpreted as zero.
QAlgorithms.Papers.Independent.Intakethird100.P81.coherentInitial
For arbitrary types , with specified finite enumerations of and , and any quantum protocol record with input types , output type , work qubits, and initial amplitude vector , this definition gives the complex Euclidean vector indexed by whose amplitudes are
The protocol’s other fields do not affect this definition, and no validity or normalization hypothesis is imposed on or . The types and may be empty; in that case the resulting vector has an empty coordinate index set, and the scalar inverse of zero is defined to be zero. The case , with its single empty bit string, is also included.
QAlgorithms.Papers.Independent.Intakethird100.P81.controlledRound
For arbitrary types with decidable equality, any natural number , and any quantum round record , let be Alice’s specified unitary matrix at input when ’s speaker is Alice, and Bob’s specified unitary matrix at input when its speaker is Bob. This definition gives a complex matrix indexed by , with entries
The round’s set of sent wires does not enter this formula, and no ownership or locality condition is assumed. Empty input types and are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P81.dephaseSelectedRegisters
For arbitrary types with decidable equality, any natural number , a pattern consisting of two Booleans and a finite wire subset , and any complex matrix indexed by , this definition returns the matrix
No positivity, trace, or normalization condition is imposed on . An empty wire subset imposes no work-register agreement condition; when both Booleans are false and the wire subset is empty, every entry is retained. Empty input types and are included.
QAlgorithms.Papers.Independent.Intakethird100.P81.endpoint
For every natural number , natural number , starting index , and arbitrary functions , the endpoint is obtained by applying the successor function exactly times to , where a successor step sends to and to . In particular, when the endpoint is . The required starting index cannot be supplied when .
QAlgorithms.Papers.Independent.Intakethird100.P81.firstRegisterConditionalBlock
For any type , finite type , complex matrix indexed by , and element , let . This defines a matrix on by
No density or nonzero-weight hypothesis is imposed. In particular, when , the inverse is defined to be zero and is the zero matrix. The type may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.informationalDistance
For any finite types with decidable equality and any complex matrix indexed by , let , let , and put . This defines the real number
where the square root is defined by continuous functional calculus. There is no factor of . The definition applies without assuming that is Hermitian, positive, or normalized, and it includes empty index types.
QAlgorithms.Papers.Independent.Intakethird100.P81.iteratedLog
For every real number and natural number , define and recursively define . The declared function returns . Its real argument is unrestricted, including zero and negative values; all intermediate values are at least , and if , every value is .
QAlgorithms.Papers.Independent.Intakethird100.P81.jointMarginalProduct
For any finite types and any complex matrix indexed by , this defines the matrix whose entries are
Thus it is the Kronecker product of the matrices obtained by summing over the second and first registers, respectively. No positivity or normalization assumption is imposed, and either index type may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P81.jointMutualInfoBits
For any finite types with decidable equality and any complex matrix indexed by , define matrices by and . Writing for the continuous functional calculus of the real function at , set . The defined real number is
No positivity, Hermiticity, or trace normalization is required of . Empty index types are allowed, with empty sums and traces equal to zero.
QAlgorithms.Papers.Independent.Intakethird100.P81.logStar
For every natural number , regarded as a real number when used as an argument, define and . The declared natural number is the infimum in of : the least such index when this set is nonempty, with the natural-number infimum convention giving if it is empty. In particular, the result is for and .
QAlgorithms.Papers.Independent.Intakethird100.P81.mergeWork
For any natural number , ownership assignment , Boolean assignment on Alice’s wires, and Boolean assignment on the wires not owned by Alice, this definition gives the full -bit string
The arguments and are evaluated on their respective wire subsets. No wire is omitted, and gives the unique empty bit string.
QAlgorithms.Papers.Independent.Intakethird100.P81.nonDisjoint
For every natural number and Boolean functions , the defined Boolean is true exactly when there exists an index for which both and are true, and false otherwise. When , the existential condition is false, so the result is false.
QAlgorithms.Papers.Independent.Intakethird100.P81.owned
For any natural number , ownership assignment , and party , the defined finite set is exactly
It may be empty and is necessarily empty when .
QAlgorithms.Papers.Independent.Intakethird100.P81.pointerParity
For every natural number , natural number , starting index , and arbitrary functions , start at and take exactly steps, sending to and to . Label the resulting vertex by if it is and by if it is . The defined Boolean is true exactly when the sum of the binary digits of this natural-number label has remainder upon division by , and false otherwise. A zero label has binary digit sum zero and therefore gives false; when , no starting index exists.
QAlgorithms.Papers.Independent.Intakethird100.P81.preparationRound
For any natural number , including , any ownership assignment , and any unitary matrix on the complex vector space indexed by -bit strings, this defines a quantum round with singleton input sets for both parties. Alice is the speaker; the transmitted wires are exactly ; Alice’s unitary is for her unique input, and Bob’s unitary is the identity for his unique input.
QAlgorithms.Papers.Independent.Intakethird100.P81.roundsLegal
For arbitrary types and any natural number , legality of a list of quantum rounds is defined recursively from an ownership assignment . The empty list is legal. A list beginning with round is legal precisely when every selected wire currently belongs to ’s speaker, every input pair gives a selected matrix acting within that speaker’s currently owned wires, and the remaining list is legal after assigning the selected wires to the opposite party and leaving other owners unchanged. The selected matrix is Alice’s matrix at for an Alice speaker and Bob’s matrix at for a Bob speaker. Explicitly, acting within the owned wires means that there exist a natural number , an injection whose image consists of wires owned by the speaker, and a complex matrix indexed by -bit strings, such that the selected matrix has entries
Here is permitted. The universal matrix condition is vacuous if either input type is empty; legality does not itself require speakers to alternate or selected wire sets to be nonempty.
QAlgorithms.Papers.Independent.Intakethird100.P81.speakerAt
For a starting party and a natural number , the designated speaker is when is even and the opposite party when is odd, with Alice and Bob opposite to each other. In particular, the speaker at is .
QAlgorithms.Papers.Independent.Intakethird100.P81.successor
For every natural number and arbitrary functions , the successor function on the disjoint union of two copies of this index set is defined by and . When , it is the unique function on the empty vertex set.
QAlgorithms.Papers.Independent.Intakethird100.P81.swapState
For arbitrary types and any complex matrix indexed by , this defines a matrix on by
Neither finiteness nor any state condition is assumed; empty types are included.
QAlgorithms.Papers.Independent.Intakethird100.P81.vertexLabel
For every natural number , label the vertices in the disjoint union of two copies of by and , as natural numbers. Thus the left labels run from through and the right labels from through ; when , the labeling function has empty domain.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.