Documentation

Kraus.Basic

Kraus operator automata and projection-valued measures #

We define the language accepted by a measure-once Kraus operator automaton, and a family of examples due to Grudka et al.

References:

def krausApply {R : Type u_1} [Mul R] [Star R] [AddCommMonoid R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] (K : rMatrix q q R) (ρ : Matrix q q R) :
Matrix q q R

Completely positive map given by a (not necessarily minimal) Kraus family.

Equations
Instances For
    theorem krausApply.posSemidef {R : Type u_1} [Ring R] [PartialOrder R] [StarRing R] [AddLeftMono R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] (K : rMatrix q q R) {ρ : Matrix q q R} ( : ρ.PosSemidef) :

    Kraus operator preserves PSD property.

    def QuantumChannel {R : Type u_1} [Mul R] [One R] [Star R] [AddCommMonoid R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] (K : rMatrix q q R) :
    Equations
    Instances For
      def QuantumOperation {R : Type u_1} [RCLike R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] (K : rMatrix q q R) :
      Equations
      Instances For
        def densityMatrix {R : Type u_1} [Ring R] [PartialOrder R] [StarRing R] (d : Type u_2) [Fintype d] :
        Type (max 0 u_1 u_2)
        Equations
        Instances For
          def densityMatrix.convex_comb {R : Type u_1} [RCLike R] {d : } (ρ₀ ρ₁ : densityMatrix (Fin d)) {t : R} (hp₀ : 0 t) (hp₁ : 0 1 - t) :
          Equations
          Instances For
            def subNormalizedDensityMatrix {R : Type u_1} [Ring R] [PartialOrder R] [StarRing R] (q : Type u_2) [Fintype q] :
            Type (max 0 u_1 u_2)
            Equations
            Instances For
              theorem QuantumChannel.trace_eq {R : Type u_1} [CommRing R] [PartialOrder R] [StarRing R] {q r : } {K : Fin rMatrix (Fin q) (Fin q) R} (hK : QuantumChannel K) (ρ : Matrix (Fin q) (Fin q) R) :
              theorem QuantumChannel.trace_eq_one {R : Type u_1} [CommRing R] [PartialOrder R] [StarRing R] {q r : } {K : Fin rMatrix (Fin q) (Fin q) R} (hK : QuantumChannel K) (ρ : Matrix (Fin q) (Fin q) R) ( : ρ.trace = 1) :
              (krausApply K ρ).trace = 1
              def densityMatrix.applyChannel {R : Type u_1} [CommRing R] [PartialOrder R] [StarRing R] [AddLeftMono R] {q r : } {K : Fin rMatrix (Fin q) (Fin q) R} (hK : QuantumChannel K) (ρ : densityMatrix (Fin q)) :

              Realizing a QuantumChannel as a map on densityMatrices.

              Equations
              Instances For
                def krausApplyWord {α : Type u_1} {R : Type u_2} [Mul R] [Star R] [AddCommMonoid R] {n q r : } (word : Fin nα) (𝓚 : αFin rMatrix (Fin q) (Fin q) R) (ρ : Matrix (Fin q) (Fin q) R) :
                Matrix (Fin q) (Fin q) R

                Transition function δ^* corresponding to a word word over an alphabet α, where each symbol a:α is mapped to a completely positive map in Kraus form, of rank at most r.

                Equations
                Instances For
                  theorem krausApplyWord_densityMatrix {α : Type u_1} {R : Type u_2} [CommRing R] [StarRing R] [PartialOrder R] [AddLeftMono R] {n q r : } (word : Fin nα) {𝓚 : αFin rMatrix (Fin q) (Fin q) R} (h𝓚 : ∀ (a : α), QuantumChannel (𝓚 a)) (ρ : densityMatrix (Fin q)) :
                  (krausApplyWord word 𝓚 ρ).PosSemidef (krausApplyWord word 𝓚 ρ).trace = 1

                  Using a family of quantum channels, we can iterate over a word and stay within the density matrices.

                  def krausApplyWord_map {α : Type u_1} {R : Type u_2} [CommRing R] [StarRing R] [PartialOrder R] [AddLeftMono R] {n q r : } (word : Fin nα) (𝓚 : αFin rMatrix (Fin q) (Fin q) R) (hq : ∀ (a : α), QuantumChannel (𝓚 a)) (ρ : densityMatrix (Fin q)) :

                  Using a family of quantum channels, we can iterate over a word and stay within the density matrices.

                  Equations
                  Instances For
                    def e {R : Type u_1} [One R] [Zero R] {k : Type u_2} [DecidableEq k] :
                    kMatrix k (Fin 1) R
                    Equations
                    Instances For
                      def ev {R : Type u_1} [One R] [Zero R] {k : } :
                      Fin kFin kR

                      A version of e for use with *ᵥ. However, when combining with ⊗ₖ it may be better to stick with e.

                      Equations
                      Instances For
                        def pureState_C {R : Type u_1} [Mul R] [Add R] [Zero R] [Star R] {k : } (e : Matrix (Fin k) (Fin 1) R) :
                        Matrix (Fin k) (Fin k) R
                        Equations
                        Instances For
                          def pureState' {R : Type u_1} [RCLike R] {k : Type u_2} {l : Type u_3} [Fintype k] [Fintype l] (v : Matrix k l R) :
                          Matrix k k R
                          Equations
                          Instances For
                            def pureState_Cv {R : Type u_1} [Mul R] [Add R] [Zero R] [Star R] {k : } (e : Fin kR) :
                            Matrix (Fin k) (Fin k) R

                            A version of pureState_C for use with *ᵥ.

                            Equations
                            Instances For
                              theorem preState_Cv_eq_pureState_C {R : Type u_1} [Mul R] [Add R] [Zero R] [Star R] {k : } (e : Matrix (Fin k) (Fin 1) R) :
                              pureState_C e = pureState_Cv fun (i : Fin k) => e i 0
                              theorem pureState_selfAdjoint_C {R : Type u_1} [Ring R] [StarRing R] {k : } (e : Matrix (Fin k) (Fin 1) R) :
                              def pureState_projection'_C {R : Type u_1} [RCLike R] {k : } (e : EuclideanSpace R (Fin k)) (he : e = 1) :
                              IsStarProjection (pureState_C fun (i : Fin k) (x : Fin 1) => e.ofLp i)
                              Equations
                              • =
                              Instances For
                                theorem pureState_projection_C {R : Type u_1} [Ring R] [StarRing R] {k : } (i : Fin k) :
                                theorem psd_versions_general {R : Type u_1} [Ring R] [StarRing R] [PartialOrder R] {k : } {e : Matrix (Fin k) (Fin k) R} {x : Fin k →₀ R} (he : 0 star x ⬝ᵥ e.mulVec x) :
                                0 x.sum fun (i : Fin k) (xi : R) => x.sum fun (j : Fin k) (xj : R) => star xi * e i j * xj
                                theorem psd_versions {k : } {e : Matrix (Fin k) (Fin k) } {x : Fin k →₀ } (he : 0 x ⬝ᵥ e.mulVec x) :
                                0 x.sum fun (i : Fin k) (xi : ) => x.sum fun (j : Fin k) (xj : ) => star xi * e i j * xj
                                theorem dotProduct_mul_mulVec {R : Type u_1} [RCLike R] (k : ) (d : Matrix (Fin k) (Fin 1) R) (e : Matrix (Fin 1) (Fin k) R) (α β : Fin kR) :
                                β ⬝ᵥ (d * e).mulVec α = (Matrix.vecMul β d * e.mulVec α) 0
                                theorem pureState_psd_C {R : Type u_1} [RCLike R] [PartialOrder R] [StarOrderedRing R] {k : } (e : Matrix (Fin k) (Fin 1) R) :
                                theorem pure_state_eq_C {R : Type u_1} [RCLike R] {k : } (i : Fin k) :
                                theorem matrix_caution :
                                (fun (x x_1 : Fin 2) => 1) = 1

                                Cautionary example: This does not become a matrix! A different kind of identity kicks in.

                                theorem oftr {n : } (P : Matrix (Fin n) (Fin n) ) (hP : 0 P) :
                                theorem matrix_posSemidef_eq_star_mul_self'_C {R : Type u_1} [RCLike R] {n : } (P : Matrix (Fin n) (Fin n) R) (hP : 0 P) :
                                ∃ (B : Matrix (Fin n) (Fin n) R), P = star B * B
                                theorem trace_mul_posSemidef_nonneg {n : } {ρ P : Matrix (Fin n) (Fin n) } ( : ρ.PosSemidef) (hP : P.PosSemidef) :
                                0 (P * ρ).trace
                                theorem trace_mul_posSemidef_nonneg_general {R : Type u_1} [RCLike R] {n : } {ρ P : Matrix (Fin n) (Fin n) R} ( : ρ 0) (hP : P 0) :
                                0 (P * ρ).trace
                                theorem QuantumOperation.trace_le {R : Type u_1} [RCLike R] {q r : } {K : Fin rMatrix (Fin q) (Fin q) R} (hK : QuantumOperation K) {ρ : Matrix (Fin q) (Fin q) R} ( : 0 ρ) :

                                Feb 1, 2026. And almost again May 9, 2026.

                                theorem QuantumOperation_preserves_trace_le_one {R : Type u_1} [RCLike R] {q r : } {K : Fin rMatrix (Fin q) (Fin q) R} (hK : QuantumOperation K) {ρ : Matrix (Fin q) (Fin q) R} ( : 0 ρ) (hρ₁ : ρ.trace 1) :

                                Feb 1, 2026 Realizing a QuantumOperation as a map on subnormalized density matrices.

                                Equations
                                Instances For
                                  theorem krausApplyWord_subNormalizedDensityMatrix {α : Type u_1} {R : Type u_2} [RCLike R] {n q r : } (word : Fin nα) {𝓚 : αFin rMatrix (Fin q) (Fin q) R} (h𝓚 : ∀ (a : α), QuantumOperation (𝓚 a)) (ρ : subNormalizedDensityMatrix (Fin q)) :
                                  (krausApplyWord word 𝓚 ρ).PosSemidef (krausApplyWord word 𝓚 ρ).trace 1
                                  def krausApplyWord_map_sub {α : Type u_1} {R : Type u_2} [RCLike R] {n q r : } (word : Fin nα) {𝓚 : αFin rMatrix (Fin q) (Fin q) R} (h𝓚 : ∀ (a : α), QuantumOperation (𝓚 a)) (ρ : subNormalizedDensityMatrix (Fin q)) :

                                  If each letter is a quantum channel then the whole word maps density matrices to density matrices.

                                  Equations
                                  Instances For
                                    theorem posSemidef_of_isStarProjection_C {R : Type u_1} [RCLike R] {n : } (P : Matrix (Fin n) (Fin n) R) (hP : IsStarProjection P) :
                                    theorem trace_mul_nonneg {n : } {ρ P : Matrix (Fin n) (Fin n) } (hρ' : ρ.PosSemidef) (hP : IsStarProjection P) :
                                    0 (P * ρ).trace
                                    theorem trace_mul_nonneg_C {R : Type u_1} [RCLike R] {n : } {ρ P : Matrix (Fin n) (Fin n) R} (hρ' : ρ.PosSemidef) (hP : IsStarProjection P) :
                                    0 (P * ρ).trace
                                    theorem nonneg_trace'_C {R : Type u_1} [RCLike R] {n : } {ρ : Matrix (Fin n) (Fin n) R} (hρ' : ρ.PosSemidef) (e : Matrix (Fin n) (Fin 1) R) (he : WithLp.toLp 2 fun (i : Fin n) => e i 0 = 1) :
                                    theorem nonneg_trace_of_posSemidef_C {R : Type u_1} [RCLike R] {n : } {ρ : Matrix (Fin n) (Fin n) R} (hρ' : ρ.PosSemidef) (i : Fin n) :
                                    0 (pureState_C (e i) * ρ).trace
                                    theorem sum_rows_C {R : Type u_1} [RCLike R] {k : } (ρ : Matrix (Fin k) (Fin k) R) :
                                    x : Fin k, Matrix.of (Function.update 0 x (ρ.row x)) = ρ
                                    theorem single_row {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (x : Fin k) :
                                    theorem combined_rows {k : } (ρ : Matrix (Fin k) (Fin k) ) :
                                    x : Fin k, Matrix.single x x 1 * ρ = ρ
                                    theorem standard_basis_probability_C {R : Type u_1} [RCLike R] {k : } (ρ : Matrix (Fin k) (Fin k) R) :
                                    a : Fin k, (pureState_C (e a) * ρ).trace = ρ.trace

                                    Unlike standard_basis_probability_one this one does not require PSD.

                                    theorem standard_basis_probability_one_C {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) :
                                    a : Fin k, (pureState_C (e a) * ρ).trace = 1

                                    Unlike standard_basis_probability_one this one does not require PSD.

                                    theorem standard_basis_probability_le_one_C {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) :
                                    a : Fin k, (pureState_C (e a) * ρ).trace 1

                                    Unlike standard_basis_probability_one this one does not require PSD.

                                    theorem standard_basis_probability_general {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} :
                                    a : Fin k, (pureState_C (e a) * ρ).trace = ρ.trace
                                    def subPMF (α : Type u_1) :
                                    Type u_1
                                    Equations
                                    Instances For
                                      def subPMF.ofFinset (α : Type u_1) (f : αENNReal) (s : Finset α) (h : as, f a 1) (h' : as, f a = 0) :
                                      Equations
                                      Instances For
                                        def subPMF.ofFintype (α : Type u_1) [Fintype α] (f : αENNReal) (h : a : α, f a 1) :
                                        Equations
                                        Instances For
                                          theorem one_eq_sum_pureState {R : Type u_1} [RCLike R] {k : } :
                                          i : Fin k, pureState_C (e i) = 1
                                          theorem sum_one_sub₀ {R : Type u_1} [Ring R] {k : } (acc : Fin k) (f : Fin kMatrix (Fin k) (Fin k) R) :
                                          i : Fin k, f i - f acc = i : Fin k, if i = acc then 0 else f i
                                          theorem trace_one_sub_C {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hPS : ρ.PosSemidef) :
                                          0 ((1 - pureState_C (e acc)) * ρ).trace
                                          theorem pure_trace_one_sub_re {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hPS : ρ.PosSemidef) :
                                          0 RCLike.re ((1 - pureState_C (e acc)) * ρ).trace
                                          theorem pure_trace_nonneg_re {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hPS : ρ.PosSemidef) :
                                          def preQuantumInstrument {R : Type u_1} [RCLike R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] {α : Type u_4} [Fintype α] (𝓔 : αrMatrix q q R) :
                                          Equations
                                          Instances For
                                            def QuantumInstrument {R : Type u_1} [RCLike R] {q : Type u_2} {r : Type u_3} [Fintype q] [Fintype r] [DecidableEq q] [DecidableEq r] {α : Type u_4} [Fintype α] (𝓔 : αrMatrix q q R) :
                                            Equations
                                            Instances For
                                              theorem ofReal_inj_aux {α : Type u_1} [Fintype α] {J : α} (hnn : ∀ (a : α), J a 0) :
                                              a : α, J a, = a : α, J a,
                                              theorem krausApply_trace_nonneg {R : Type u_1} [RCLike R] {r : Type u_2} [Fintype r] [inst_2 : DecidableEq r] {α : Type u_3} {k : } {𝓔 : αrMatrix (Fin k) (Fin k) R} {ρ : Matrix (Fin k) (Fin k) R} (hPS : 0 ρ) (i : α) :
                                              0 (krausApply (𝓔 i) ρ).trace
                                              def PMF_of_preQuantumInstrument {R : Type u_1} [RCLike R] {r : Type u_2} [Fintype r] [DecidableEq r] {α : Type u_3} [Fintype α] {k : } {𝓔 : αrMatrix (Fin k) (Fin k) R} (h𝓔 : preQuantumInstrument 𝓔) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : 0 ρ) :
                                              PMF α

                                              May 13, 2026.

                                              Equations
                                              Instances For
                                                theorem pureState_C_QuantumInstrument {R : Type u_1} [RCLike R] {q : } :
                                                QuantumInstrument fun (i : Fin q) (x : Fin 1) => pureState_C (e i)
                                                def POVM_PMF {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : 0 ρ) :
                                                PMF (Fin k)

                                                Positive operator (or projection) valued measure as a probability mass function. Technically the measure is valued in Fin k although pureState (e i) can stand for i. Could be generalized to let e be any orthonormal basis.

                                                pureState_psd shows that it is a POVM. pureState_projection shows that it is in fact a PVM for the standard basis. In fact pureState_projection' shows it's a projection whenever the vectors have length 1.

                                                Equations
                                                Instances For
                                                  def POVM_PMF_alt {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : 0 ρ) :
                                                  PMF (Fin k)
                                                  Equations
                                                  Instances For
                                                    theorem POVM_PMF_eq_POVM_PMF_alt {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : 0 ρ) :
                                                    POVM_PMF hUT hPS = POVM_PMF_alt hUT hPS

                                                    (pre)quantum instruments can be used as an alternative construction of our PMF.

                                                    def p {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hPS : 0 ρ) (i : Fin (k + 1)) :

                                                    Probability measure with "lost" trace in the last outcome.

                                                    Equations
                                                    Instances For
                                                      theorem p.ne_top {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hPS : 0 ρ) :
                                                      a : Fin (k + 1), p hPS a
                                                      theorem trace_arithmetic {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : 0 ρ) :
                                                      def POVM_PMF_withTop₀ {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : 0 ρ) :
                                                      PMF (Fin (k + 1))

                                                      May 8, 2026. Used to construct POVM_PMF_withTop.

                                                      Equations
                                                      Instances For
                                                        noncomputable def POVM_PMF_withTop {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : 0 ρ) :
                                                        PMF (Option (Fin k))

                                                        A PMF where the probability of none is the probability lost due to trace decrease.

                                                        Equations
                                                        Instances For
                                                          theorem POVM_PMF_withTop_none {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : 0 ρ) :

                                                          POVM_PMF_withTop API, part 1: The lost probability is 1 - the trace.

                                                          theorem POVM_PMF_withTop_none₀ {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : 0 ρ) :
                                                          (POVM_PMF_withTop hPS) none = 0

                                                          POVM_PMF_withTop API, part 2: If the trace is one then no probability is lost.

                                                          theorem POVM_PMF_withTop_none₁ {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 0) (hPS : 0 ρ) :
                                                          (POVM_PMF_withTop hPS) none = 1

                                                          POVM_PMF_withTop API, part 3. If the trace is zero then all probability is lost.

                                                          noncomputable def POVM_subPMF {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : 0 ρ) :

                                                          Feb 1, 2026. An analogous construction from May 8, 2026 uses PMF (Fin (k+1)).

                                                          Equations
                                                          Instances For
                                                            def POVM_PMF' {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                            PMF (Fin k)
                                                            Equations
                                                            Instances For
                                                              noncomputable def POVM_subPMF' {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : ρ.PosSemidef) :
                                                              Equations
                                                              Instances For
                                                                theorem PMF₂₃help {R : Type u_1} [RCLike R] {ρ : Matrix (Fin 3) (Fin 3) R} (hPS : ρ.PosSemidef) :
                                                                0 ((pureState_C (e 0) + pureState_C (e 1)) * ρ).trace
                                                                theorem RCLike.re_sum {R : Type u_1} [RCLike R] {α : Type u_2} (s : Finset α) (f : αR) :
                                                                re (∑ is, f i) = is, re (f i)

                                                                Had to make this lemma as it seems missing in Mathlib.

                                                                theorem RCLike.sub_re {R : Type u_1} [RCLike R] (z w : R) :
                                                                re (z - w) = re z - re w

                                                                Had to make this lemma as it seems missing in Mathlib.

                                                                theorem Finset.sum_erase_sub {k : } (c : Fin k) (J : Fin k) :
                                                                i : Fin k, J i - J c = i : Fin k with i c, J i
                                                                theorem PMF_of_state.sum_one_general {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                                i : Fin 2, ↑(if i = 0 then RCLike.re ((1 - pureState_C (e acc)) * ρ).trace, else RCLike.re (pureState_C (e acc) * ρ).trace, ) = 1
                                                                theorem trace_nonneg_re {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hPS : ρ.PosSemidef) :
                                                                theorem PMF_of_state.sum_one_general_general {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hPS : ρ.PosSemidef) :
                                                                i : Fin 2, ↑(if i = 0 then RCLike.re ((1 - pureState_C (e acc)) * ρ).trace, else RCLike.re (pureState_C (e acc) * ρ).trace, ) = RCLike.re ρ.trace,
                                                                noncomputable def PMF_of_state_general {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                                PMF (Fin 2)
                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  noncomputable def PMF_of_state_CPTNI {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : ρ.PosSemidef) :
                                                                  PMF (Option (Fin 2))

                                                                  May 9, 2026

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    noncomputable def subPMF_of_state_general {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : ρ.PosSemidef) :

                                                                    To use conditional computability here we would need to know the state had positive trace.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      noncomputable def PMF_of_state_bern {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : ρ.PosSemidef) :

                                                                      Feb 1, 2026: nonincreasing trace operators and a PMF.

                                                                      Equations
                                                                      Instances For
                                                                        structure PVM :

                                                                        Projection-valued measure.

                                                                        Instances For
                                                                          structure PVMeas :

                                                                          Projection-valued measure. In this version we allow non-probability measures.

                                                                          Instances For
                                                                            structure PVMeas_C {R : Type u_1} [RCLike R] :
                                                                            Type u_1

                                                                            Projection-valued measure. In this version we allow non-probability measures.

                                                                            Instances For
                                                                              structure PVM_C {R : Type u_1} [RCLike R] :
                                                                              Type u_1
                                                                              Instances For
                                                                                structure PVM_CPTNI {R : Type u_1} [RCLike R] :
                                                                                Type u_1

                                                                                May 9, 2026.

                                                                                Instances For
                                                                                  theorem trace_real_of_projection_and_pos_semidef {R : Type u_1} [RCLike R] {k : } {ρ O : Matrix (Fin k) (Fin k) R} (g₀ : ρ.IsHermitian) (g₁ : O.IsHermitian) :
                                                                                  (O * ρ).trace = star (O * ρ).trace
                                                                                  theorem im_zero_PVM {R : Type u_1} [RCLike R] (M : PVM_C) (i : Fin M.t) :
                                                                                  RCLike.im (M.op i * M.ρ).trace = 0

                                                                                  The probability is given as a real part of a complex number. Fortunately, the imaginary part is zero.

                                                                                  noncomputable def myPVM_C {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                                                  Equations
                                                                                  Instances For
                                                                                    noncomputable def myPVMeas_C_trace_one {R : Type u_1} [RCLike R] {k : } {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                                                    Equations
                                                                                    Instances For
                                                                                      noncomputable def PVM_of_state_C {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace = 1) (hPS : ρ.PosSemidef) :
                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        noncomputable def PVM_of_state_CPTNI {R : Type u_1} [RCLike R] {k : } (acc : Fin k) {ρ : Matrix (Fin k) (Fin k) R} (hUT : ρ.trace 1) (hPS : ρ.PosSemidef) :

                                                                                        May 9, 2026.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          def languageAcceptedBy_C {R : Type u_1} [RCLike R] {α : Type u_2} {q r : } (acceptStateIndex : Fin q.succ) (𝓚 : αFin rMatrix (Fin q.succ) (Fin q.succ) R) :
                                                                                          Set ((n : ) × (Fin nα))
                                                                                          Equations
                                                                                          Instances For
                                                                                            theorem basisState_trace_one_C {R : Type u_1} [RCLike R] {k : } {i : Fin k.succ} :
                                                                                            noncomputable def PVM_of_word_of_channel_C {R : Type u_1} [RCLike R] {α : Type u_2} {r k : } (acc : Fin k.succ) {𝓚 : αFin rMatrix (Fin k.succ) (Fin k.succ) R} (h𝓚 : ∀ (a : α), QuantumChannel (𝓚 a)) (word : (n : ) × (Fin nα)) :
                                                                                            Equations
                                                                                            Instances For
                                                                                              def MOlanguageAcceptedBy_C {R : Type u_1} [RCLike R] {α : Type u_2} {r k : } (acc : Fin k.succ) {𝓚 : αFin rMatrix (Fin k.succ) (Fin k.succ) R} (h𝓚 : ∀ (a : α), QuantumChannel (𝓚 a)) :
                                                                                              Set ((n : ) × (Fin nα))
                                                                                              Equations
                                                                                              Instances For
                                                                                                noncomputable def PVM_of_word_of_operation {R : Type u_1} [RCLike R] {α : Type u_2} {r k : } (acc : Fin k.succ) {𝓚 : αFin rMatrix (Fin k.succ) (Fin k.succ) R} (h𝓚 : ∀ (a : α), QuantumOperation (𝓚 a)) (word : (n : ) × (Fin nα)) :
                                                                                                Equations
                                                                                                Instances For
                                                                                                  def MOlanguageAcceptedBy_CPTNI {R : Type u_1} [RCLike R] {α : Type u_2} {r k : } (acc : Fin k.succ) {𝓚 : αFin rMatrix (Fin k.succ) (Fin k.succ) R} (h𝓚 : ∀ (a : α), QuantumOperation (𝓚 a)) :
                                                                                                  Set ((n : ) × (Fin nα))

                                                                                                  May 9, 2026. Language accepted by a family of quantum operations, as opposed to quantum channels.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    theorem matrix_1x1_nonneg_iff (x : ) :
                                                                                                    0 !![x] 0 x
                                                                                                    def exampleLanguage₁ :
                                                                                                    Set ((n : ) × (Fin nFin 1))

                                                                                                    The matrix !![1 / 2] has trace < 1, but we are able to use it to define a language:

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      theorem exampleLanguage₁_length_one (word : Fin 1Fin 1) :

                                                                                                      May 10, 2026. Even though there is only one state and it is accepting, because of the trace-loss the length-one word is not accepted :)

                                                                                                      theorem MO_language_nonempty_C {α : Type u_1} {r k : } {𝓚 : αFin rMatrix (Fin k.succ) (Fin k.succ) } (h𝓚 : ∀ (a : α), QuantumChannel (𝓚 a)) :

                                                                                                      If the start and accept states are the same then the empty string is accepted in the measure-once setting.