Documentation

QuantumInfo.Finite.MState

Finite dimensional quantum mixed states, ρ.

The same comments apply as in Braket:

These could be done with a Hilbert space of Fintype, which would look like

(H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] [FiniteDimensional ℂ H]

or by choosing a particular Basis and asserting it is Fintype. But frankly it seems easier to mostly focus on the basis-dependent notion of Matrix, which has the added benefit of an obvious "classical" interpretation (as the basis elements, or diagonal elements of a mixed state). In that sense, this quantum theory comes with the a particular classical theory always preferred.

Important definitions:

structure MState (d : Type u_1) [Fintype d] [DecidableEq d] :
Type u_1

A mixed quantum state is a PSD matrix with trace 1.

We don't extend (M : HermitianMat d ℂ) because that gives an annoying thing where M is actually a Subtype, which means ρ.M.foo notation doesn't work.

Instances For
    theorem MState.ext_iff {d : Type u_1} {inst✝ : Fintype d} {inst✝¹ : DecidableEq d} {x y : MState d} :
    x = y x = y
    theorem MState.ext {d : Type u_1} {inst✝ : Fintype d} {inst✝¹ : DecidableEq d} {x y : MState d} (M : x = y) :
    x = y
    instance MState.instCoe {d : Type u_1} [Fintype d] [DecidableEq d] :
    Equations
    def MState.m {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :

    The underlying Matrix in an MState. Prefer MState.M for the HermitianMat.

    Equations
    • ρ.m = ρ
    Instances For
      @[simp]
      theorem MState.toMat_M {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
      ρ = ρ.m
      theorem MState.pos {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
      theorem MState.Hermitian {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :

      Every mixed state is Hermitian.

      @[simp]
      theorem MState.tr' {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
      ρ.m.trace = 1
      theorem MState.ext_m {d : Type u_1} [Fintype d] [DecidableEq d] {ρ₁ ρ₂ : MState d} (h : ρ₁.m = ρ₂.m) :
      ρ₁ = ρ₂

      The map from mixed states to their matrices is injective

      theorem MState.convex (d : Type u_1) [Fintype d] [DecidableEq d] :

      The matrices corresponding to MStates are Convex

      Equations
      instance MState.nonempty {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
      theorem MState.eigenvalue_nonneg {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (i : d) :
      theorem MState.eigenvalue_le_one {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (i : d) :
      theorem MState.le_one {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
      ρ 1
      def MState.inner {d : Type u_1} [Fintype d] [DecidableEq d] (ρ σ : MState d) :

      The inner product of two MState's, as a real number between 0 and 1.

      Equations
      Instances For

        The inner product of two MState's, as a real number between 0 and 1.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def MState.exp_val_ℂ {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (T : Matrix d d ) :
          Equations
          Instances For
            def MState.exp_val {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (T : HermitianMat d ) :

            The expectation value of an operator on a quantum state.

            Equations
            Instances For
              theorem MState.exp_val_nonneg {d : Type u_1} [Fintype d] [DecidableEq d] {T : HermitianMat d } (h : 0 T) (ρ : MState d) :
              0 ρ.exp_val T
              @[simp]
              theorem MState.exp_val_zero {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
              ρ.exp_val 0 = 0
              @[simp]
              theorem MState.exp_val_one {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
              ρ.exp_val 1 = 1
              theorem MState.exp_val_le_one {d : Type u_1} [Fintype d] [DecidableEq d] {T : HermitianMat d } (h : T 1) (ρ : MState d) :
              ρ.exp_val T 1
              theorem MState.exp_val_prob {d : Type u_1} [Fintype d] [DecidableEq d] {T : HermitianMat d } (h : 0 T T 1) (ρ : MState d) :
              0 ρ.exp_val T ρ.exp_val T 1
              theorem MState.exp_val_sub {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (A B : HermitianMat d ) :
              ρ.exp_val (A - B) = ρ.exp_val A - ρ.exp_val B
              theorem MState.exp_val_eq_zero_iff {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) {A : HermitianMat d } (hA₁ : 0 A) :
              ρ.exp_val A = 0 (↑ρ).support A.ker

              If a PSD observable A has expectation value of 0 on a state ρ, it must entirely contain the support of ρ in its kernel.

              theorem MState.exp_val_eq_one_iff {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) {A : HermitianMat d } (hA₂ : A 1) :
              ρ.exp_val A = 1 (↑ρ).support (1 - A).ker

              If an observable A has expectation value of 1 on a state ρ, it must entirely contain the support of ρ in its 1-eigenspace.

              theorem MState.exp_val_add {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (A B : HermitianMat d ) :
              ρ.exp_val (A + B) = ρ.exp_val A + ρ.exp_val B
              @[simp]
              theorem MState.exp_val_smul {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (r : ) (A : HermitianMat d ) :
              ρ.exp_val (r A) = r * ρ.exp_val A
              theorem MState.exp_val_le_exp_val {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) {A B : HermitianMat d } (h : A B) :
              ρ.exp_val A ρ.exp_val B
              def MState.pure {d : Type u_1} [Fintype d] [DecidableEq d] (ψ : Ket d) :

              A mixed state can be constructed as a pure state arising from a ket.

              Equations
              Instances For
                @[simp]
                theorem MState.pure_apply {d : Type u_1} [Fintype d] [DecidableEq d] {i j : d} (ψ : Ket d) :
                (pure ψ).m i j = ψ i * (starRingEnd ) (ψ j)
                theorem MState.pure_mul_self {d : Type u_1} [Fintype d] [DecidableEq d] (ψ : Ket d) :
                (pure ψ).m * (pure ψ).m = (pure ψ)
                def MState.purity {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :

                The purity of a state is Tr[ρ^2]. This is a Prob, because it is always between zero and one.

                Equations
                Instances For
                  def MState.spectrum {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :

                  The eigenvalue spectrum of a mixed quantum state, as a Distribution.

                  Equations
                  Instances For
                    theorem MState.spectrum_pure_eq_constant {d : Type u_1} [Fintype d] [DecidableEq d] (ψ : Ket d) :
                    ∃ (i : d), (pure ψ).spectrum = Distribution.constant i

                    The specturm of a pure state is (1,0,0,...), i.e. a constant distribution.

                    theorem MState.pure_of_constant_spectrum {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (h : ∃ (i : d), ρ.spectrum = Distribution.constant i) :
                    ∃ (ψ : Ket d), ρ = pure ψ

                    If the specturm of a mixed state is (1,0,0...) i.e. a constant distribution, it is a pure state.

                    theorem MState.pure_iff_constant_spectrum {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                    (∃ (ψ : Ket d), ρ = pure ψ) ∃ (i : d), ρ.spectrum = Distribution.constant i

                    A state ρ is pure iff its spectrum is (1,0,0,...) i.e. a constant distribution.

                    theorem MState.pure_iff_purity_one {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                    (∃ (ψ : Ket d), ρ = pure ψ) ρ.purity = 1
                    theorem Matrix.unitaryGroup_row_norm {d : Type u_1} [Fintype d] [DecidableEq d] (U : (unitaryGroup d )) (i : d) :
                    j : d, U j i ^ 2 = 1
                    theorem MState.spectralDecomposition {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                    ∃ (ψs : dKet d), ρ = i : d, (ρ.spectrum i) (pure (ψs i))
                    def MState.prod {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ₁ : MState d₁) (ρ₂ : MState d₂) :
                    MState (d₁ × d₂)
                    Equations
                    • ρ₁ ρ₂ = { M := (↑ρ₁).kronecker ρ₂, zero_le := , tr := }
                    Instances For
                      theorem MState.prod_inner_prod {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ξ1 ψ1 : MState d₁) (ξ2 ψ2 : MState d₂) :
                      (ξ1 ξ2).inner (ψ1 ψ2) = ξ1.inner ψ1 * ξ2.inner ψ2
                      theorem MState.pure_prod_pure {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ψ₁ : Ket d₁) (ψ₂ : Ket d₂) :
                      pure (ψ₁ ψ₂) = pure ψ₁ pure ψ₂

                      The product of pure states is a pure product state , Ket.prod.

                      def MState.ofClassical {d : Type u_1} [Fintype d] [DecidableEq d] (dist : Distribution d) :

                      A representation of a classical distribution as a quantum state, diagonal in the given basis.

                      Equations
                      Instances For
                        @[simp]
                        theorem MState.coe_ofClassical {d : Type u_1} [Fintype d] [DecidableEq d] (dist : Distribution d) :
                        (ofClassical dist) = HermitianMat.diagonal fun (x : d) => (dist x)
                        theorem MState.ofClassical_pow {d : Type u_1} [Fintype d] [DecidableEq d] (dist : Distribution d) (p : ) :
                        (ofClassical dist) ^ p = HermitianMat.diagonal fun (i : d) => (dist i) ^ p
                        def MState.uniform {d : Type u_1} [Fintype d] [DecidableEq d] [Nonempty d] :

                        The maximally mixed state.

                        Equations
                        Instances For
                          instance MState.instUnique {d : Type u_1} [Fintype d] [DecidableEq d] [Unique d] :

                          There is exactly one state on a dimension-1 system.

                          Equations

                          There exists a mixed state for every nonempty d. Here, the maximally mixed one is chosen.

                          Equations
                          def MState.traceLeft {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                          MState d₂

                          Partial tracing out the left half of a system.

                          Equations
                          Instances For
                            def MState.traceRight {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                            MState d₁

                            Partial tracing out the right half of a system.

                            Equations
                            Instances For
                              @[simp]
                              theorem MState.traceLeft_prod_eq {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ₁ : MState d₁) (ρ₂ : MState d₂) :
                              (ρ₁ ρ₂).traceLeft = ρ₂

                              Taking the direct product on the left and tracing it back out gives the same state.

                              @[simp]
                              theorem MState.traceRight_prod_eq {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ₁ : MState d₁) (ρ₂ : MState d₂) :
                              (ρ₁ ρ₂).traceRight = ρ₁

                              Taking the direct product on the right and tracing it back out gives the same state.

                              theorem MState.spectrum_prod {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ₁ : MState d₁) (ρ₂ : MState d₂) :
                              ∃ (σ : d₁ × d₂ d₁ × d₂), ∀ (i : d₁) (j : d₂), (ρ₁ ρ₂).spectrum (σ (i, j)) = ρ₁.spectrum i * ρ₂.spectrum j

                              Spectrum of direct product. There is a permutation σ so that the spectrum of the direct product of ρ₁ and ρ₂, as permuted under σ, is the pairwise products of the spectra of ρ₁ and ρ₂.

                              def MState.IsSeparable {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :

                              A mixed state is separable iff it can be written as a convex combination of product mixed states.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem MState.IsSeparable_prod {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ₁ : MState d₁) (ρ₂ : MState d₂) :
                                (ρ₁ ρ₂).IsSeparable

                                A product state MState.prod is separable.

                                theorem MState.pure_separable_iff_IsProd {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ψ : Ket (d₁ × d₂)) :

                                A pure state is separable iff the ket is a product state.

                                theorem MState.pure_separable_iff_traceLeft_pure {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ψ : Ket (d₁ × d₂)) :
                                (pure ψ).IsSeparable ∃ (ψ₁ : Ket d₂), pure ψ₁ = (pure ψ).traceLeft

                                A pure state is separable iff the partial trace on the left is pure.

                                def MState.purify {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                                Ket (d × d)

                                The purification of a mixed state. Always uses the full dimension of the Hilbert space (d) to purify, so e.g. an existing pure state with d=4 still becomes d=16 in the purification. The defining property is MState.traceRight_of_purify; see also MState.purify' for the bundled version.

                                Equations
                                Instances For
                                  @[simp]
                                  theorem MState.purify_spec {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :

                                  The defining property of purification, that tracing out the purifying system gives the original mixed state.

                                  def MState.purifyX {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                                  { ψ : Ket (d × d) // (pure ψ).traceRight = ρ }

                                  MState.purify bundled with its defining property MState.traceRight_of_purify.

                                  Equations
                                  Instances For
                                    def MState.relabel {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState d₁) (e : d₂ d₁) :
                                    MState d₂
                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem MState.relabel_M {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState d₁) (e : d₂ d₁) :
                                      (ρ.relabel e) = (↑ρ).reindex e.symm
                                      @[simp]
                                      theorem MState.relabel_m {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState d₁) (e : d₂ d₁) :
                                      (ρ.relabel e).m = ρ.m.submatrix e e
                                      @[simp]
                                      theorem MState.relabel_refl {d : Type u_5} [Fintype d] [DecidableEq d] (ρ : MState d) :
                                      ρ.relabel (Equiv.refl d) = ρ
                                      @[simp]
                                      theorem MState.relabel_relabel {d : Type u_5} {d₂ : Type u_6} {d₃ : Type u_7} [Fintype d] [DecidableEq d] [Fintype d₂] [DecidableEq d₂] [Fintype d₃] [DecidableEq d₃] (ρ : MState d) (e : d₂ d) (e₂ : d₃ d₂) :
                                      (ρ.relabel e).relabel e₂ = ρ.relabel (e₂.trans e)
                                      theorem MState.eq_relabel_iff {d₁ d₂ : Type u} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] (ρ : MState d₁) (σ : MState d₂) (h : d₁ d₂) :
                                      ρ = σ.relabel h ρ.relabel h.symm = σ
                                      theorem MState.relabel_comp {d₁ : Type u_5} {d₂ : Type u_6} {d₃ : Type u_7} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] [Fintype d₃] [DecidableEq d₃] (ρ : MState d₁) (e : d₂ d₁) (f : d₃ d₂) :
                                      (ρ.relabel e).relabel f = ρ.relabel (f.trans e)
                                      theorem MState.relabel_cast {d₁ d₂ : Type u} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] (ρ : MState d₁) (e : d₂ = d₁) :
                                      ρ.relabel (Equiv.cast e) = cast ρ
                                      def MState.SWAP {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                                      MState (d₂ × d₁)

                                      The heterogeneous SWAP gate that exchanges the left and right halves of a quantum system. This can apply even when the two "halves" are of different types, as opposed to (say) the SWAP gate on quantum circuits that leaves the qubit dimensions unchanged. Notably, it is not unitary.

                                      Equations
                                      Instances For
                                        def MState.spectrum_SWAP {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                                        ∃ (e : d₁ × d₂ d₂ × d₁), ρ.SWAP.spectrum.relabel e = ρ.spectrum
                                        Equations
                                        • =
                                        Instances For
                                          @[simp]
                                          theorem MState.SWAP_SWAP {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                                          ρ.SWAP.SWAP = ρ
                                          @[simp]
                                          theorem MState.traceLeft_SWAP {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                                          @[simp]
                                          theorem MState.traceRight_SWAP {d₁ : Type u_2} {d₂ : Type u_3} [Fintype d₁] [Fintype d₂] [DecidableEq d₁] [DecidableEq d₂] (ρ : MState (d₁ × d₂)) :
                                          def MState.assoc {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState ((d₁ × d₂) × d₃)) :
                                          MState (d₁ × d₂ × d₃)

                                          The associator that re-clusters the parts of a quantum system.

                                          Equations
                                          Instances For
                                            def MState.assoc' {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState (d₁ × d₂ × d₃)) :
                                            MState ((d₁ × d₂) × d₃)

                                            The associator that re-clusters the parts of a quantum system.

                                            Equations
                                            Instances For
                                              @[simp]
                                              theorem MState.assoc_assoc' {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState (d₁ × d₂ × d₃)) :
                                              ρ.assoc'.assoc = ρ
                                              @[simp]
                                              theorem MState.assoc'_assoc {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState ((d₁ × d₂) × d₃)) :
                                              ρ.assoc.assoc' = ρ
                                              @[simp]
                                              theorem MState.traceLeft_right_assoc {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState ((d₁ × d₂) × d₃)) :
                                              @[simp]
                                              theorem MState.traceRight_left_assoc' {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState (d₁ × d₂ × d₃)) :
                                              @[simp]
                                              theorem MState.traceRight_assoc {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState ((d₁ × d₂) × d₃)) :
                                              @[simp]
                                              theorem MState.traceLeft_assoc' {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState (d₁ × d₂ × d₃)) :
                                              @[simp]
                                              theorem MState.traceLeft_left_assoc {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState ((d₁ × d₂) × d₃)) :
                                              @[simp]
                                              theorem MState.traceRight_right_assoc' {d₁ : Type u_2} {d₂ : Type u_3} {d₃ : Type u_4} [Fintype d₁] [Fintype d₂] [Fintype d₃] [DecidableEq d₁] [DecidableEq d₂] [DecidableEq d₃] (ρ : MState (d₁ × d₂ × d₃)) :
                                              @[simp]
                                              theorem MState.traceNorm_eq_1 {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) :
                                              theorem MState.relabel_kron {d₁ : Type u_5} {d₂ : Type u_6} {d₃ : Type u_7} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] [Fintype d₃] [DecidableEq d₃] (ρ : MState d₁) (σ : MState d₂) (e : d₃ d₁) :
                                              ρ.relabel e σ = (ρ σ).relabel (e.prodCongr (Equiv.refl d₂))
                                              theorem MState.kron_relabel {d₁ : Type u_5} {d₂ : Type u_6} {d₃ : Type u_7} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] [Fintype d₃] [DecidableEq d₃] (ρ : MState d₁) (σ : MState d₂) (e : d₃ d₂) :
                                              ρ σ.relabel e = (ρ σ).relabel ((Equiv.refl d₁).prodCongr e)
                                              theorem MState.prod_assoc {d₁ : Type u_5} {d₂ : Type u_6} {d₃ : Type u_7} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] [Fintype d₃] [DecidableEq d₃] (ρ : MState d₁) (σ : MState d₂) (τ : MState d₃) :
                                              ρ (σ τ) = (ρ σ τ).relabel (Equiv.prodAssoc d₁ d₂ d₃).symm

                                              Mixed states inherit the subspace topology from matrices

                                              Equations

                                              The projection from mixed states to their Hermitian matrices is an embedding

                                              theorem MState.dist_eq {d : Type u_1} [Fintype d] [DecidableEq d] (x y : MState d) :
                                              dist x y = dist x y
                                              def MState.piProd {ι : Type u} [DecidableEq ι] [ : Fintype ι] {dI : ιType v} [(i : ι) → Fintype (dI i)] [(i : ι) → DecidableEq (dI i)] (ρi : (i : ι) → MState (dI i)) :
                                              MState ((i : ι) → dI i)
                                              Equations
                                              • MState.piProd ρi = { M := fun (j k : (i : ι) → dI i) => i : ι, (ρi i).m (j i) (k i), , zero_le := , tr := }
                                              Instances For
                                                def MState.npow {d : Type u_1} [Fintype d] [DecidableEq d] (ρ : MState d) (n : ) :
                                                MState (Fin nd)

                                                The n-copy "power" of a mixed state, with the standard basis indexed by pi types.

                                                Equations
                                                Instances For

                                                  The n-copy "power" of a mixed state, with the standard basis indexed by pi types.

                                                  Equations
                                                  Instances For
                                                    theorem MState.PosDef.kron {d₁ : Type u_5} {d₂ : Type u_6} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] {σ₁ : MState d₁} {σ₂ : MState d₂} (hσ₁ : σ₁.m.PosDef) (hσ₂ : σ₂.m.PosDef) :
                                                    (σ₁ σ₂).m.PosDef
                                                    theorem MState.PosDef.relabel {d₁ : Type u_5} {d₂ : Type u_6} [Fintype d₁] [DecidableEq d₁] [Fintype d₂] [DecidableEq d₂] {ρ : MState d₁} ( : ρ.m.PosDef) (e : d₂ d₁) :
                                                    theorem MState.PosDef_mix {d : Type u_5} [Fintype d] [DecidableEq d] {σ₁ σ₂ : MState d} (hσ₁ : σ₁.m.PosDef) (hσ₂ : σ₂.m.PosDef) (p : Prob) :
                                                    p[σ₁σ₂].m.PosDef

                                                    If both states positive definite, so is their mixture.

                                                    theorem MState.PosDef_mix_of_ne_zero {d : Type u_5} [Fintype d] [DecidableEq d] {σ₁ σ₂ : MState d} (hσ₁ : σ₁.m.PosDef) (p : Prob) (hp : p 0) :
                                                    p[σ₁σ₂].m.PosDef

                                                    If one state is positive definite and the mixture is nondegenerate, their mixture is also positive definite.

                                                    theorem MState.PosDef_mix_of_ne_one {d : Type u_5} [Fintype d] [DecidableEq d] {σ₁ σ₂ : MState d} (hσ₂ : σ₂.m.PosDef) (p : Prob) (hp : p 1) :
                                                    p[σ₁σ₂].m.PosDef

                                                    If the second state is positive definite and the mixture is nondegenerate, their mixture is also positive definite.

                                                    theorem MState.posDef_of_unique {d : Type u_5} [Fintype d] [DecidableEq d] (ρ : MState d) [Unique d] :