Documentation

QuantumInfo.Finite.Qubit.Basic

Quantum theory and operations specific to qubits.

@[reducible, inline]
abbrev Qubit :
Equations
Instances For
    @[simp]
    theorem Matrix.neg_unitary_val {α : Type u_2} [DecidableEq α] [Fintype α] (u : 𝐔[α]) :
    ↑(-u) = -u
    @[simp]
    theorem Matrix.star_kron {α : Type u_2} {β : Type u_3} (a : Matrix α α ) (b : Matrix β β ) :
    star (kroneckerMap (fun (x1 x2 : ) => x1 * x2) a b) = kroneckerMap (fun (x1 x2 : ) => x1 * x2) (star a) (star b)
    theorem Matrix.kron_unitary {α : Type u_2} {β : Type u_3} [DecidableEq α] [Fintype α] [DecidableEq β] [Fintype β] (a : 𝐔[α]) (b : 𝐔[β]) :
    kroneckerMap (fun (x1 x2 : ) => x1 * x2) a b 𝐔[α × β]
    def Matrix.unitary_kron {α : Type u_2} {β : Type u_3} [DecidableEq α] [Fintype α] [DecidableEq β] [Fintype β] (a : 𝐔[α]) (b : 𝐔[β]) :
    𝐔[α × β]
    Equations
    Instances For
      @[simp]
      theorem Matrix.unitary_kron_apply {α : Type u_2} {β : Type u_3} [DecidableEq α] [Fintype α] [DecidableEq β] [Fintype β] (a : 𝐔[α]) (b : 𝐔[β]) (i₁ i₂ : α) (j₁ j₂ : β) :
      (unitary_kron a b) (i₁, j₁) (i₂, j₂) = a i₁ i₂ * b j₁ j₂
      @[simp]
      theorem Matrix.unitary_kron_one_one {α : Type u_2} {β : Type u_3} [DecidableEq α] [Fintype α] [DecidableEq β] [Fintype β] :

      Proves goals equating small matrices by expanding out products and simpliying standard Real arithmetic.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The Pauli Z gate on a qubit.

        Equations
        Instances For

          The Pauli X gate on a qubit.

          Equations
          Instances For

            The Pauli Y gate on a qubit.

            Equations
            Instances For
              noncomputable def Qubit.H :

              The H gate, a Hadamard gate, on a qubit.

              Equations
              Instances For

                The S gate, or Rz(π/2) rotation on a qubit.

                Equations
                Instances For
                  noncomputable def Qubit.T :

                  The T gate, or Rz(π/4) rotation on a qubit.

                  Equations
                  Instances For
                    @[simp]
                    theorem Qubit.Z_sq :
                    Z * Z = 1
                    @[simp]
                    theorem Qubit.X_sq :
                    X * X = 1
                    @[simp]
                    theorem Qubit.Y_sq :
                    Y * Y = 1
                    @[simp]
                    theorem Qubit.H_sq :
                    H * H = 1
                    @[simp]
                    theorem Qubit.S_sq :
                    S * S = Z
                    @[simp]
                    theorem Qubit.T_sq :
                    T * T = S
                    @[simp]

                    The anticommutator {X,Y} is zero. Marked simp as to put Pauli products in a canonical Y-X-Z order.

                    The anticommutator {Y,Z} is zero.

                    The anticommutator {Z,X} is zero.

                    @[simp]
                    theorem Qubit.S_Z_comm :
                    Z * S = S * Z
                    @[simp]
                    theorem Qubit.T_Z_comm :
                    Z * T = T * Z
                    @[simp]
                    theorem Qubit.S_T_comm :
                    S * T = T * S
                    def Qubit.controllize {k : Type u_1} [Fintype k] [DecidableEq k] (g : 𝐔[k]) :

                    Given a unitary U on some Hilbert space k, we have the controllized version that acts on Fin 2 ⊗ k where U is conditionally applied if the first qubit is 1.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[simp]
                        theorem Qubit.controllize_apply_zero_zero {k : Type u_1} [Fintype k] [DecidableEq k] (g : 𝐔[k]) (j₁ j₂ : k) :
                        (controllize g) (0, j₁) (0, j₂) = 1 j₁ j₂
                        @[simp]
                        theorem Qubit.controllize_apply_zero_one {k : Type u_1} [Fintype k] [DecidableEq k] (g : 𝐔[k]) (j₁ j₂ : k) :
                        (controllize g) (0, j₁) (1, j₂) = 0
                        @[simp]
                        theorem Qubit.controllize_apply_one_zero {k : Type u_1} [Fintype k] [DecidableEq k] (g : 𝐔[k]) (j₁ j₂ : k) :
                        (controllize g) (1, j₁) (0, j₂) = 0
                        @[simp]
                        theorem Qubit.controllize_apply_one_one {k : Type u_1} [Fintype k] [DecidableEq k] (g : 𝐔[k]) (j₁ j₂ : k) :
                        (controllize g) (1, j₁) (1, j₂) = g j₁ j₂
                        @[simp]
                        theorem Qubit.controllize_mul {k : Type u_1} [Fintype k] [DecidableEq k] (g₁ g₂ : 𝐔[k]) :
                        controllize g₁ * controllize g₂ = controllize (g₁ * g₂)
                        @[simp]
                        @[simp]