Observables

Braket.Observables.XType
Braket.Observables.X <: Observable
Braket.Observables.X([coeff::Float64]) -> Braket.Observables.X

Struct representing a Braket.Observables.X observable in a measurement. The observable may be scaled by coeff.

Braket.Observables.YType
Braket.Observables.Y <: Observable
Braket.Observables.Y([coeff::Float64]) -> Braket.Observables.Y

Struct representing a Braket.Observables.Y observable in a measurement. The observable may be scaled by coeff.

Braket.Observables.ZType
Braket.Observables.Z <: Observable
Braket.Observables.Z([coeff::Float64]) -> Braket.Observables.Z

Struct representing a Braket.Observables.Z observable in a measurement. The observable may be scaled by coeff.

Braket.Observables.HType
Braket.Observables.H <: Observable
Braket.Observables.H([coeff::Float64]) -> Braket.Observables.H

Struct representing a Braket.Observables.H observable in a measurement. The observable may be scaled by coeff.

Braket.Observables.IType
Braket.Observables.I <: Observable
Braket.Observables.I([coeff::Float64]) -> Braket.Observables.I

Struct representing a Braket.Observables.I observable in a measurement. The observable may be scaled by coeff.

Braket.Observables.TensorProductType
TensorProduct <: Observable
TensorProduct(factors::Vector{<:Observable}) -> TensorProduct
TensorProduct(factors::Vector{String}) -> TensorProduct

Struct representing a tensor product of smaller observables.

Examples

julia> Braket.Observables.TensorProduct(["x", "h"])
Braket.Observables.TensorProduct(Braket.Observables.Observable[Braket.Observables.X(), Braket.Observables.H()])

julia> ho = Braket.Observables.HermitianObservable([0 1; 1 0]);

julia> Braket.Observables.TensorProduct([ho, Braket.Observables.Z()])
Braket.Observables.TensorProduct(Braket.Observables.Observable[Braket.Observables.HermitianObservable(Complex{Int64}[0 + 0im 1 + 0im; 1 + 0im 0 + 0im]), Braket.Observables.Z()])
Braket.Observables.HermitianObservableType
HermitianObservable <: Observable
HermitianObservable(matrix::Matrix) -> HermitianObservable

Struct representing an observable of an arbitrary complex Hermitian matrix.

Examples

julia> ho = Braket.Observables.HermitianObservable([0 1; 1 0])
Braket.Observables.HermitianObservable(Complex{Int64}[0 + 0im 1 + 0im; 1 + 0im 0 + 0im])
Braket.Observables.SumType
Sum <: Observable
Sum(summands::Vector{<:Observable}) -> Sum

Struct representing the sum of observables.

Examples

julia> o1 = 2.0 * Observables.I() @ Observables.Z();

julia> o2 = 3.0 * Observables.X() @ Observables.X();

julia> o = o1 + o2
Braket.Observables.Sum()