Measurements
QBase.measure — FunctionComputes the outcome probabilities for a quantum measurement. The conditional probabilities are determined by the Born rule, $P(i|j) = \text{Tr}[\Pi_i \rho_j]$, where $\Pi_j$ is a POVM element and $\rho_j$ is a density matrix.
Measurement of a single Ket or State:
measure(Π :: POVM, ρ :: State) :: Probabilities
measure(Π :: POVM, ψ :: Ket) :: Probabilities
measure(Π :: PVM, ρ :: State) :: Probabilities
measure(Π :: PVM, ψ :: Ket) :: ProbabilitiesMeasurement of an ensemble of Ket or State types:
measure(Π :: POVM, ρ_states :: Vector{<:State}) :: Conditionals
measure(Π :: POVM, ψ_kets :: Vector{<:Ket}) :: Conditionals
measure(Π :: PVM, ρ_states :: Vector{<:State}) :: Conditionals
measure(Π :: PVM, ψ_kets :: Vector{<:Ket}) :: ConditionalsQBase.Measurement — TypeMeasurement{T} <: AbstractVector{T}The abstract type representing a quantum measurement. A measurement consists of a complete set of possible outcomes.
Positive Operator-Valued Measures (POVM)
QBase.is_povm — Functionis_povm( Π :: Vector; atol=ATOL :: Float64 ) :: BoolReturns true if Π satisfies the following constraints
- The POVM is complete:
sum(Π) == I - Each POVM element is hermitian
- Each POVM element positive semi-definite
QBase.is_povm_element — Functionis_povm_element(M :: AbstractMatrix; atol=ATOL :: Float64) :: BoolReturns true if matrix M satisfies the following constraints:
Mis HermitianMis positive semi-definite
QBase.POVM — TypePOVM( Π :: Vector{POVMel{T}} ) <: Measurement{T}
POVM( Π :: Vector{Matrix{T}} ) <: Measurement{T}Positve-operator valued measures (POVMs) represent a general quantum measurement. Each POVM-element is a hermitian, positive-semidefinite matrix. The sum of all POVM-elements yields the identity matrix. The constructor, POVM(Π) throws a DomainError if the provided array of matrices, Π is not a valid POVM.
QBase.POVMel — TypePOVMel( M :: AbstractMatrix{T<:Number}; atol=ATOL :: Float64) <: Operator{T}A POVM element. A DomainError is thrown if matrix M is not hermitian and positive semi-definite within absolute tolerance atol.
POVM Constructors
QBase.mirror_symmetric_qubit_3povm — Functionmirror_symmetric_qubit_3povm( θ :: Real ) :: POVM{Float64}Constructs a POVM aligned with the three mirror symmetric qubit states. The first measurement is aligned with the $|0\rangle$ state and the remaining two are symmetric across the z-axis.
A DomainError is thrown if argument θ ∉ [π/4,π/2].
QBase.asymmetric_qubit_3povm — Functionasymmetric_qubit_3povm( θ1::Real, θ2::Real ) :: POVMConstructs a general non-orthogonal 3-element POVM.
Inputs:
θ1 ∈ (0,π/2] or [-π/2,0), the angle element 2 makes with $|0\rangle$ state.θ2 ∈ [-π/2,0) or (0,π/2], the angle element 3 makes with $|0\rangle$ state.
A DomainError is thrown if θ1 and θ2 are not in the valid ranges. Note that one angle must be positive and the other negative.
QBase.trine_qubit_povm — Functiontrine_qubit_povm() :: POVM{Float64}The POVM with elements parallel to the trine qubit states (see trine_qubit_kets).
QBase.sic_qubit_povm — Functionsic_qubit_povm() :: POVM{Complex{Float64}}The POVM with elements parallel to the symmetric informationally complete (SIC) qubit states (see sic_qubit_kets).
QBase.planar_symmetric_qubit_povm — Functionplanar_symmetric_qubit_povm( n :: Int64 ) :: POVM{Float64}Constructs an n-element POVM{Float64} from the planar_symmetric_qubit_states. Each state is multipled by a factor of 2/n to satisfy the completeness relation.
A DomainError is thrown if n ≥ 2 is not satisfied.
QBase.sqrt_povm — Functionsqrt_povm(priors :: Probabilities, states :: Vector{<:State}) :: POVMReturns the "pretty good" square-root povm for the given density operator states and priors.
QBase.naimark_dilation — Functionnaimark_dilation( Π::POVM )Returns the dilated projectors which are equivalent to the provided POVM. During measurement, the measured state must be tensored with the ancilla.
Projector-Valued Measures (PVM)
QBase.PVM — TypePVM( Π :: Vector{Vector{T}}; atol=ATOL :: Float64 ) <: Measurement{T}The concret type for a projector-valued measure. The projectors are represented as a set of orthonormal basis vectors
A DomainError is thrown if Π does not contain an orthonormal basis.