Documentation

QuantumInfo.Finite.Ensemble

@[reducible, inline]
abbrev MEnsemble (d : Type u_1) (α : Type u_2) [Fintype d] [Fintype α] :
Type (max u_2 u_1)

A mixed-state ensemble is a random variable valued in MState d. That is, a collection of mixed states var : α → MState d, each with their own probability weight described by distr : Distribution α.

Equations
Instances For
    @[reducible, inline]
    abbrev PEnsemble (d : Type u_1) (α : Type u_2) [Fintype d] [Fintype α] :
    Type (max u_2 u_1)

    A pure-state ensemble is a random variable valued in Ket d. That is, a collection of pure states var : α → Ket d, each with their own probability weight described by distr : Distribution α.

    Equations
    Instances For
      @[reducible, inline]
      abbrev MEnsemble.states {α : Type u_1} {d : Type u_3} [Fintype d] [Fintype α] :
      MEnsemble d ααMState d

      Alias for Distribution.var for mixed-state ensembles.

      Equations
      Instances For
        @[reducible, inline]
        abbrev PEnsemble.states {α : Type u_1} {d : Type u_3} [Fintype d] [Fintype α] :
        PEnsemble d ααKet d

        Alias for Distribution.var for pure-state ensembles.

        Equations
        Instances For
          def Ensemble.toMEnsemble {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] :
          PEnsemble d αMEnsemble d α

          A pure-state ensemble is a mixed-state ensemble if all kets are interpreted as mixed states.

          Equations
          Instances For
            @[simp]
            theorem Ensemble.toMEnsemble_mk {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {ps : αKet d} {distr : Distribution α} :
            { var := ps, distr := distr } = { var := MState.pure ps, distr := distr }
            theorem Ensemble.coe_PEnsemble_iff_pure_states {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (me : MEnsemble d α) :
            (∃ (pe : PEnsemble d α), pe = me) ∃ (ψ : αKet d), me.states = MState.pure ψ

            A mixed-state ensemble comes from a pure-state ensemble if and only if all states are pure.

            def Ensemble.mix {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (e : MEnsemble d α) :

            The resulting mixed state after mixing the states in an ensemble with their respective probability weights. Note that, generically, a single mixed state has infinitely many ensembles that mixes into it.

            Equations
            Instances For
              @[simp]
              theorem Ensemble.mix_of {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (e : MEnsemble d α) :
              (mix e).m = i : α, (e.distr i) (e.states i).m
              def Ensemble.congrMEnsemble {α : Type u_1} {β : Type u_2} {d : Type u_3} [Fintype α] [Fintype β] [Fintype d] (σ : α β) :

              Two mixed-state ensembles indexed by \alpha and \beta are equivalent if α ≃ β.

              Equations
              Instances For
                def Ensemble.congrPEnsemble {α : Type u_1} {β : Type u_2} {d : Type u_3} [Fintype α] [Fintype β] [Fintype d] (σ : α β) :

                Two pure-state ensembles indexed by \alpha and \beta are equivalent if α ≃ β.

                Equations
                Instances For
                  @[simp]
                  theorem Ensemble.mix_congrMEnsemble_eq_mix {α : Type u_1} {β : Type u_2} {d : Type u_3} [Fintype α] [Fintype β] [Fintype d] (σ : α β) (e : MEnsemble d α) :
                  mix ((congrMEnsemble σ) e) = mix e

                  Equivalence of mixed-state ensembles leaves the resulting mixed state invariant

                  @[simp]
                  theorem Ensemble.mix_congrPEnsemble_eq_mix {α : Type u_1} {β : Type u_2} {d : Type u_3} [Fintype α] [Fintype β] [Fintype d] (σ : α β) (e : PEnsemble d α) :
                  mix ((congrPEnsemble σ) e) = mix e

                  Equivalence of pure-state ensembles leaves the resulting mixed state invariant

                  def Ensemble.average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : MState dT) (e : MEnsemble d α) :
                  T

                  The average of a function f : MState d → T, where T is of Mixable U T instance, on a mixed-state ensemble e is the expectation value of f acting on the states of e, with the corresponding probability weights from e.distr.

                  Equations
                  Instances For
                    def Ensemble.average_NNReal {α : Type u_1} [Fintype α] {d : Type} [Fintype d] (f : MState dNNReal) (e : MEnsemble d α) :

                    A version of average conveniently specialized for functions f : MState d → ℝ≥0 returning nonnegative reals. Notably, the average is also a nonnegative real number.

                    Equations
                    Instances For
                      def Ensemble.pure_average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : Ket dT) (e : PEnsemble d α) :
                      T

                      The average of a function f : Ket d → T, where T is of Mixable U T instance, on a pure-state ensemble e is the expectation value of f acting on the states of e, with the corresponding probability weights from e.distr.

                      Equations
                      Instances For
                        def Ensemble.pure_average_NNReal {α : Type u_1} [Fintype α] {d : Type} [Fintype d] (f : Ket dNNReal) (e : PEnsemble d α) :

                        A version of average conveniently specialized for functions f : Ket d → ℝ≥0 returning nonnegative reals. Notably, the average is also a nonnegative real number.

                        Equations
                        Instances For
                          theorem Ensemble.average_of_pure_ensemble {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : MState dT) (e : PEnsemble d α) :

                          The average of f : MState d → T on a coerced pure-state ensemble ↑e : MEnsemble d α is equal to averaging the restricted function over Kets f ∘ pure : Ket d → T on e.

                          theorem Ensemble.mix_pEnsemble_pure_iff_pure {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {ψ : Ket d} {e : PEnsemble d α} :
                          mix e = MState.pure ψ ∀ (i : α), e.distr i 0e.states i = ψ

                          A pure-state ensemble mixes into a pure state if and only if the only states in the ensemble with nonzero probability are equal to ψ

                          theorem Ensemble.mix_pEnsemble_pure_average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {ψ : Ket d} {e : PEnsemble d α} {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : Ket dT) (hmix : mix e = MState.pure ψ) :
                          pure_average f e = f ψ

                          The average of f : Ket d → T on an ensemble that mixes to a pure state ψ is f ψ

                          theorem Ensemble.mix_mEnsemble_pure_iff_pure {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {ψ : Ket d} {e : MEnsemble d α} :
                          mix e = MState.pure ψ ∀ (i : α), e.distr i 0e.states i = MState.pure ψ

                          A mixed-state ensemble mixes into a pure state if and only if the only states in the ensemble with nonzero probability are equal to pure ψ

                          theorem Ensemble.mix_mEnsemble_pure_average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {ψ : Ket d} {e : MEnsemble d α} {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : MState dT) (hmix : mix e = MState.pure ψ) :
                          average f e = f (MState.pure ψ)

                          The average of f : MState d → T on an ensemble that mixes to a pure state ψ is f (pure ψ)

                          def Ensemble.trivial_mEnsemble {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (ρ : MState d) (i : α) :

                          The trivial mixed-state ensemble of ρ consists of copies of rho, with the i-th one having probability 1.

                          Equations
                          Instances For
                            theorem Ensemble.trivial_mEnsemble_mix {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (ρ : MState d) (i : α) :

                            The trivial mixed-state ensemble of ρ mixes to ρ

                            theorem Ensemble.trivial_mEnsemble_average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : MState dT) (ρ : MState d) (i : α) :

                            The average of f : MState d → T on a trivial ensemble of ρ is f ρ

                            def Ensemble.trivial_pEnsemble {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (ψ : Ket d) (i : α) :

                            The trivial pure-state ensemble of ψ consists of copies of ψ, with the i-th one having probability 1.

                            Equations
                            Instances For
                              theorem Ensemble.trivial_pEnsemble_mix {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] (ψ : Ket d) (i : α) :

                              The trivial pure-state ensemble of ψ mixes to ψ

                              theorem Ensemble.trivial_pEnsemble_average {α : Type u_1} {d : Type u_3} [Fintype α] [Fintype d] {T : Type u_3} {U : Type u_4} [AddCommGroup U] [Module U] [inst : Mixable U T] (f : Ket dT) (ψ : Ket d) (i : α) :

                              The average of f : Ket d → T on a trivial ensemble of ψ is f ψ

                              def Ensemble.spectral_ensemble {d : Type u_3} [Fintype d] (ρ : MState d) :

                              The spectral pure-state ensemble of ρ. The states are its eigenvectors, and the probabilities, eigenvalues.

                              Equations
                              Instances For
                                theorem Ensemble.spectral_ensemble_mix {d : Type u_3} [Fintype d] {ρ : MState d} :

                                The spectral pure-state ensemble of ρ mixes to ρ