Documentation

LeanPool.LeanQuantumAlg.Core.Components.Kets

Named one-qubit kets #

The standard one-qubit computational- and Hadamard-basis kets, as named instances of the generic basis ket LeanPool.LeanQuantumAlg.PureState.ket:

|0>, |1>, |+> = (|0> + |1>)/sqrt 2, and |-> = (|0> - |1>)/sqrt 2.

Linear combinations are formed at the raw StateVector layer and then bundled as PureState values once their unit norm has been proved.

|0>, the first one-qubit basis ket.

Equations
Instances For

    |1>, the second one-qubit basis ket.

    Equations
    Instances For

      (sqrt 2)^-1 : ℂ, the ubiquitous normalization scalar.

      Equations
      Instances For

        Norm over Fin (2 ^ 1) as a two-term sum.

        Workhorse for test circuits: on |0> ⊗ alpha + |1> ⊗ beta the probability of reading 0 on qubit 0 is ‖alpha‖^2.

        On |0> ⊗ alpha + |1> ⊗ beta the probability of reading 1 on qubit 0 is ‖beta‖^2.