jonathanfishbein1/elm-quantum/1.1.0

NOTE: the latest version is 6.1.1

Quantum

Quantum Computing Simulator in Elm

Types

type Ket a

Ket Type

type Bra a

Bra Type

Type constructors

ket : Monoid a -> Vector a -> Result String (Ket a)

Create Ket

bra : Ket a -> Bra a

Create Bra

Values

ket0 : Ket Float

Ket representing zero state

ket1 : Ket Float

Ket representing one state

ketPlus : Ket Float

Ket representing + state

ketMinus : Ket Float

Ket representing + state

Unitary Operations

scalarMultiplication : Field a -> a -> Ket a -> Ket a

Multiply a Ket by a Scalar

Binary Operations

add : Field a -> Ket a -> Ket a -> Ket a

Add two Kets

Quantum Operators

h : Matrix Float

Hadamard Operation

x : Matrix Float

NOT Operation

probabilityOfState : InnerProductSpace a -> Bra a -> Ket a -> Result String a

Calculate the probability of end state, the Bra, with given start state, the Ket