Documentation

CslibFrontier.Foundations.Quantum.Bipartite

Bipartite pure states #

A pure state of a bipartite system with computational bases ι and κ is a vector of ℂ^{ι × κ}. This file provides:

Main definitions #

Main results #

References #

Product states #

noncomputable def Cslib.Quantum.prodState {ι : Type u_1} {κ : Type u_2} (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :

The product state ψ ⊗ φ ∈ ℂ^{ι × κ}, with amplitudes (ψ ⊗ φ)_{(i, k)} = ψ_i φ_k.

@[simp]
theorem Cslib.Quantum.prodState_apply {ι : Type u_1} {κ : Type u_2} (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) (p : ι × κ) :
(prodState ψ φ).ofLp p = ψ.ofLp p.1 * φ.ofLp p.2
theorem Cslib.Quantum.prodState_add_left {ι : Type u_1} {κ : Type u_2} (ψ ψ' : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :
prodState (ψ + ψ') φ = prodState ψ φ + prodState ψ' φ
theorem Cslib.Quantum.prodState_smul_left {ι : Type u_1} {κ : Type u_2} (c : ℂ) (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :
prodState (c • ψ) φ = c • prodState ψ φ
theorem Cslib.Quantum.prodState_ket {ι : Type u_1} {κ : Type u_2} [DecidableEq ι] [DecidableEq κ] (i : ι) (k : κ) :
prodState (ket i) (ket k) = ket (i, k)
theorem Cslib.Quantum.inner_prodState {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] (ψ ψ' : EuclideanSpace ℂ ι) (φ φ' : EuclideanSpace ℂ κ) :
inner ℂ (prodState ψ φ) (prodState ψ' φ') = inner ℂ ψ ψ' * inner ℂ φ φ'
theorem Cslib.Quantum.norm_prodState {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :

Kronecker products #

theorem Cslib.Quantum.kronecker_mulVec_prodState {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] (A : Matrix ι ι ℂ) (B : Matrix κ κ ℂ) (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :
(Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) A B).mulVec (prodState ψ φ).ofLp = fun (p : ι × κ) => A.mulVec ψ.ofLp p.1 * B.mulVec φ.ofLp p.2

(A ⊗ₖ B)(ψ ⊗ φ) = Aψ ⊗ Bφ; see Matrix.kronecker_mulVec_mul for the action of a Kronecker product on vectors over any commutative semiring.

Measuring the first system #

noncomputable def Cslib.Quantum.condState {ι : Type u_1} {κ : Type u_2} (i : ι) :

The conditional state (⟨i| ⊗ 1) Ψ of the second system after outcome i of a computational-basis measurement of the first: the unnormalized post-measurement state, with amplitudes Ψ_{(i, k)}.

@[simp]
theorem Cslib.Quantum.condState_apply {ι : Type u_1} {κ : Type u_2} (i : ι) (Ψ : EuclideanSpace ℂ (ι × κ)) (k : κ) :
((condState i) Ψ).ofLp k = Ψ.ofLp (i, k)
theorem Cslib.Quantum.condState_prodState {ι : Type u_1} {κ : Type u_2} (i : ι) (ψ : EuclideanSpace ℂ ι) (φ : EuclideanSpace ℂ κ) :
(condState i) (prodState ψ φ) = ψ.ofLp i • φ
theorem Cslib.Quantum.norm_condState_sq {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] [DecidableEq ι] (i : ι) (Ψ : EuclideanSpace ℂ (ι × κ)) :
‖(condState i) Ψ‖ ^ 2 = measureProb Ψ {p : ι × κ | p.1 = i}

The squared norm of the conditional state is the probability of the outcome.

theorem Cslib.Quantum.measure_map_fst_apply {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] (Ψ : EuclideanSpace ℂ (ι × κ)) (hΨ : ‖Ψ‖ = 1) (i : ι) :

Measuring the first system of a unit state Ψ gives outcome i with probability ‖(⟨i| ⊗ 1) Ψ‖².

noncomputable def Cslib.Quantum.postMeasure {ι : Type u_1} {κ : Type u_2} [Fintype κ] (i : ι) (Ψ : EuclideanSpace ℂ (ι × κ)) :

The post-measurement state (⟨i| ⊗ 1) Ψ / ‖(⟨i| ⊗ 1) Ψ‖ of the second system after outcome i on the first.

theorem Cslib.Quantum.postMeasure_def {ι : Type u_1} {κ : Type u_2} [Fintype κ] (i : ι) (Ψ : EuclideanSpace ℂ (ι × κ)) :
theorem Cslib.Quantum.norm_postMeasure {ι : Type u_1} {κ : Type u_2} [Fintype κ] (i : ι) (Ψ : EuclideanSpace ℂ (ι × κ)) (h : (condState i) Ψ ≠ 0) :

The post-measurement state of an outcome of positive probability is a unit vector.