diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a4fc131..cde8638 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-04T16:32:24","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-05T09:58:34","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 6fe2428..03dc532 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,2 +1,2 @@ -List of functions · Ket.jl

List of functions

Basic

Ket.ketFunction
ket([T=ComplexF64,] i::Integer, d::Integer = 2)

Produces a ket of dimension d with nonzero element i.

source
Ket.ketbraFunction
ketbra(v::AbstractVector)

Produces a ketbra of vector v.

source
Ket.projFunction
proj([T=ComplexF64,] i::Integer, d::Integer = 2)

Produces a projector onto the basis state i in dimension d.

source
Ket.pauliFunction
pauli([T=ComplexF64,], ind::Vector{<:Integer})

Constructs the Pauli matrices: 0 or "I" for the identity, 1 or "X" for the Pauli X operation, 2 or "Y" for the Pauli Y operator, and 3 or "Z" for the Pauli Z operator. Vectors of integers between 0 and 3 or strings of I, X, Y, Z automatically generate Kronecker products of the corresponding operators.

source
Ket.gell_mann!Function
gell_mann!(res::AbstractMatrix{T}, i::Integer, j::Integer, d::Integer = 3)

In-place version of gell_mann.

source
Ket.partial_traceFunction
partial_trace(X::AbstractMatrix, remove::Vector, dims::Vector)

Takes the partial trace of matrix X with subsystem dimensions dims over the subsystems in remove.

source
partial_trace(X::AbstractMatrix, remove::Integer, dims::Vector)

Takes the partial trace of matrix X with subsystem dimensions dims over the subsystem remove.

source
Ket.partial_transposeFunction
partial_transpose(X::AbstractMatrix, transp::Vector, dims::Vector)

Takes the partial transpose of matrix X with subsystem dimensions dims on the subsystems in transp.

source
partial_transpose(X::AbstractMatrix, transp::Integer, dims::Vector)

Takes the partial transpose of matrix X with subsystem dimensions dims on the subsystem transp.

source
Ket.cleanup!Function
cleanup!(M::AbstractArray{T}; tol = Base.rtoldefault(real(T)))

Zeroes out real or imaginary parts of M that are smaller than tol.

source

Entropy

Ket.entropyFunction
entropy([base=2,] ρ::AbstractMatrix)

Computes the von Neumann entropy -tr(ρ log ρ) of a positive semidefinite operator ρ using a base base logarithm.

Reference: von Neumann entropy.

source
entropy([base=2,] p::AbstractVector)

Computes the Shannon entropy -Σᵢpᵢlog(pᵢ) of a non-negative vector p using a base base logarithm.

Reference: Entropy (information theory).

source
Ket.relative_entropyFunction
relative_entropy([base=2,] ρ::AbstractMatrix, σ::AbstractMatrix)

Computes the (quantum) relative entropy tr(ρ (log ρ - log σ)) between positive semidefinite matrices ρ and σ using a base base logarithm. Note that the support of ρ must be contained in the support of σ but for efficiency this is not checked.

Reference: Quantum relative entropy.

source
relative_entropy([base=2,] p::AbstractVector, q::AbstractVector)

Computes the relative entropy D(p||q) = Σᵢpᵢlog(pᵢ/qᵢ) between two non-negative vectors p and q using a base base logarithm. Note that the support of p must be contained in the support of q but for efficiency this is not checked.

Reference: Relative entropy.

source
Ket.binary_relative_entropyFunction
binary_relative_entropy([base=2,] p::Real, q::Real)

Computes the binary relative entropy D(p||q) = p log(p/q) + (1-p) log((1-p)/(1-q)) between two probabilities p and q using a base base logarithm.

Reference: Relative entropy.

source
Ket.conditional_entropyFunction
conditional_entropy([base=2,] pAB::AbstractMatrix)

Computes the conditional Shannon entropy H(A|B) of the joint probability distribution pAB using a base base logarithm.

Reference: Conditional entropy.

source
conditional_entropy([base=2,], rho::AbstractMatrix, csys::AbstractVector, dims::AbstractVector)

Computes the conditional von Neumann entropy of rho with subsystem dimensions dims and conditioning systems csys, using a base base logarithm.

Reference: Conditional quantum entropy.

source

Entanglement

Ket.schmidt_decompositionFunction
schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})

Produces the Schmidt decomposition of ψ with subsystem dimensions dims. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.

Reference: Schmidt decomposition.

source
schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})

Produces the Schmidt decomposition of ψ assuming equally-sized subsystems. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.

Reference: Schmidt decomposition.

source

Measurements

Ket.sic_povmFunction
sic_povm([T=ComplexF64,] d::Integer)

Constructs a vector of vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d. This construction is based on the Weyl-Heisenberg fiducial.

Reference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813

source
Ket.test_sicFunction
test_sic(vecs)

Tests whether vecs is a vector of vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d.

source
Ket.test_povmFunction
test_povm(A::Vector{<:AbstractMatrix{T}})

Checks if the measurement defined by A is valid (hermitian, semi-definite positive, and normalized).

source
Ket.dilate_povmFunction
dilate_povm(vecs::Vector{Vector{T}})

Does the Naimark dilation of a rank-1 POVM given as a vector of vectors. This is the minimal dilation.

source
dilate_povm(E::Vector{<:AbstractMatrix})

Does the Naimark dilation of a POVM given as a vector of matrices. This always works, but is wasteful if the POVM elements are not full rank.

source
Ket.povmFunction
povm(B::Vector{<:AbstractMatrix{T}})

Creates a set of (projective) measurements from a set of bases given as unitary matrices.

source
povm(A::Array{T, 4}, n::Vector{Int64})

Converts a set of measurements in the common tensor format into a matrix of matrices. The second argument is fixed by the size of A but can also contain custom number of outcomes.

source
Ket.mubFunction
mub([T=ComplexF64,] d::Integer)

Construction of the standard complete set of MUBs. The output contains 1+minᵢ pᵢ^rᵢ bases, where d = ∏ᵢ pᵢ^rᵢ.

Reference: Durt, Englert, Bengtsson, Życzkowski, arXiv:1004.3348.

source

Nonlocality

Ket.chshFunction
chsh([T=Float64,] d::Integer = 2)

CHSH-d nonlocal game in full probability notation. If T is an integer type the game is unnormalized.

Reference: Buhrman and Massar, arXiv:quant-ph/0409066.

source
Ket.local_boundFunction
local_bound(G::Array{T,4})

Computes the local bound of a bipartite Bell functional G, written in full probability notation as a 4-dimensional array.

source
Ket.tsirelson_boundFunction
tsirelson_bound(CG::Matrix, scenario::Vector, level::Integer)

Upper bounds the Tsirelson bound of a bipartite Bell funcional game CG, written in Collins-Gisin notation. scenario is vector detailing the number of inputs and outputs, in the order [oa, ob, ia, ib]. level is an integer determining the level of the NPA hierarchy.

This function requires Moment. It is only available if you first do "import MATLAB" or "using MATLAB".

source
Ket.correlation_tensorFunction
correlation_tensor(p::AbstractArray{T, N2}; marg::Bool = true)

Applies N sets of measurements onto a state rho to form a probability array. Convert a 2x...x2xmx...xm probability array into

  • a mx...xm correlation array (no marginals)
  • a (m+1)x...x(m+1) correlation array (marginals).
source
Ket.probability_tensorFunction
probability_tensor(rho::LA.Hermitian, all_Aax::Vector{Measurement}...)

Applies N sets of measurements onto a state rho to form a probability array.

source
Ket.fp2cgFunction
fp2cg(V::Array{T,4}) where {T <: Real}

Takes a bipartite Bell functional V in full probability notation and transforms it to Collins-Gisin notation.

source

Norms

Ket.kyfan_normFunction
kyfan_norm(X::AbstractMatrix, k::Integer, p::Real = 2)

Computes Ky-Fan (k,p) norm of matrix X.

source

Random

Ket.random_stateFunction
random_state([T=ComplexF64,] d::Integer, k::Integer = d)

Produces a uniformly distributed random quantum state in dimension d with rank k.

Reference: Życzkowski and Sommers, arXiv:quant-ph/0012101.

source
Ket.random_povmFunction
random_povm([T=ComplexF64,] d::Integer, n::Integer, r::Integer)

Produces a random POVM of dimension d with n outcomes and rank min(k, d).

Reference: Heinosaari et al., arXiv:1902.04751.

source

States

Ket.state_phiplus_ketFunction
state_phiplus_ket([T=ComplexF64,] d::Integer = 2)

Produces the vector of the maximally entangled state Φ⁺ of local dimension d.

source
Ket.state_phiplusFunction
state_phiplus([T=ComplexF64,] d::Integer = 2; v::Real = 1)

Produces the maximally entangled state Φ⁺ of local dimension d with visibility v.

source
Ket.isotropicFunction
isotropic(v::Real, d::Integer = 2)

Produces the isotropic state of local dimension d with visibility v.

source
Ket.state_psiminus_ketFunction
state_psiminus_ket([T=ComplexF64,] d::Integer = 2)

Produces the vector of the maximally entangled state ψ⁻ of local dimension d.

source
Ket.state_psiminusFunction
state_psiminus([T=ComplexF64,] d::Integer = 2; v::Real = 1)

Produces the maximally entangled state ψ⁻ of local dimension d with visibility v.

source
Ket.state_ghz_ketFunction
state_ghz_ket([T=ComplexF64,] d::Integer = 2, N::Integer = 3; coeff)

Produces the vector of the GHZ state local dimension d. By default, coeff contains 1/√d uniformly.

source
Ket.state_ghzFunction
state_ghz([T=ComplexF64,] d::Integer = 2, N::Integer = 3; v::Real = 1, coeff)

Produces the GHZ state of local dimension d with visibility v. By default, coeff contains 1/√d uniformly.

source
Ket.state_w_ketFunction
state_w_ket([T=ComplexF64,] N::Integer = 3; coeff)

Produces the vector of the N-partite W state. By default, coeff contains 1/√N uniformly.

source
Ket.state_wFunction
state_w([T=ComplexF64,] N::Integer = 3; v::Real = 1, coeff)

Produces the N-partite W state with visibility v. By default, coeff contains 1/√N uniformly.

source
Ket.white_noiseFunction
white_noise(rho::LA.Hermitian, v::Real)

Returns v * rho + (1 - v) * id, where id is the maximally mixed state.

source
Ket.white_noise!Function
white_noise!(rho::LA.Hermitian, v::Real)

Modifies rho in place to tranform in into v * rho + (1 - v) * id where id is the maximally mixed state.

source

Internal functions

Ket._partitionFunction
partition(n::Integer, k::Integer)

If n ≥ k partitions the set 1:n into k parts as equally sized as possible. Otherwise partitions it into n parts of size 1.

source
Ket._fiducial_WHFunction
_fiducial_WH([T=ComplexF64,] d::Integer)

Computes the fiducial Weyl-Heisenberg vector of dimension d.

Reference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813 http://www.gerhardzauner.at/sicfiducials.html

source
Ket._idxFunction
_idx(tidx::Vector, dims::Vector)

Converts a tensor index tidx = [i₁, i₂, ...] with subsystems dimensions dims to a standard index.

source
Ket._tidxFunction
_tidx(idx::Integer, dims::Vector)

Converts a standard index idx to a tensor index [i₁, i₂, ...] with subsystems dimensions dims.

source
+List of functions · Ket.jl

List of functions

Basic

Ket.ketFunction
ket([T=ComplexF64,] i::Integer, d::Integer = 2)

Produces a ket of dimension d with nonzero element i.

source
Ket.ketbraFunction
ketbra(v::AbstractVector)

Produces a ketbra of vector v.

source
Ket.projFunction
proj([T=ComplexF64,] i::Integer, d::Integer = 2)

Produces a projector onto the basis state i in dimension d.

source
Ket.pauliFunction
pauli([T=ComplexF64,], ind::Vector{<:Integer})

Constructs the Pauli matrices: 0 or "I" for the identity, 1 or "X" for the Pauli X operation, 2 or "Y" for the Pauli Y operator, and 3 or "Z" for the Pauli Z operator. Vectors of integers between 0 and 3 or strings of I, X, Y, Z automatically generate Kronecker products of the corresponding operators.

source
Ket.gell_mann!Function
gell_mann!(res::AbstractMatrix{T}, i::Integer, j::Integer, d::Integer = 3)

In-place version of gell_mann.

source
Ket.partial_traceFunction
partial_trace(X::AbstractMatrix, remove::Vector, dims::Vector)

Takes the partial trace of matrix X with subsystem dimensions dims over the subsystems in remove.

source
partial_trace(X::AbstractMatrix, remove::Integer, dims::Vector)

Takes the partial trace of matrix X with subsystem dimensions dims over the subsystem remove.

source
Ket.partial_transposeFunction
partial_transpose(X::AbstractMatrix, transp::Vector, dims::Vector)

Takes the partial transpose of matrix X with subsystem dimensions dims on the subsystems in transp.

source
partial_transpose(X::AbstractMatrix, transp::Integer, dims::Vector)

Takes the partial transpose of matrix X with subsystem dimensions dims on the subsystem transp.

source
Ket.cleanup!Function
cleanup!(M::AbstractArray{T}; tol = Base.rtoldefault(real(T)))

Zeroes out real or imaginary parts of M that are smaller than tol.

source

Entropy

Ket.entropyFunction
entropy([base=2,] ρ::AbstractMatrix)

Computes the von Neumann entropy -tr(ρ log ρ) of a positive semidefinite operator ρ using a base base logarithm.

Reference: von Neumann entropy.

source
entropy([base=2,] p::AbstractVector)

Computes the Shannon entropy -Σᵢpᵢlog(pᵢ) of a non-negative vector p using a base base logarithm.

Reference: Entropy (information theory).

source
Ket.relative_entropyFunction
relative_entropy([base=2,] ρ::AbstractMatrix, σ::AbstractMatrix)

Computes the (quantum) relative entropy tr(ρ (log ρ - log σ)) between positive semidefinite matrices ρ and σ using a base base logarithm. Note that the support of ρ must be contained in the support of σ but for efficiency this is not checked.

Reference: Quantum relative entropy.

source
relative_entropy([base=2,] p::AbstractVector, q::AbstractVector)

Computes the relative entropy D(p||q) = Σᵢpᵢlog(pᵢ/qᵢ) between two non-negative vectors p and q using a base base logarithm. Note that the support of p must be contained in the support of q but for efficiency this is not checked.

Reference: Relative entropy.

source
Ket.binary_relative_entropyFunction
binary_relative_entropy([base=2,] p::Real, q::Real)

Computes the binary relative entropy D(p||q) = p log(p/q) + (1-p) log((1-p)/(1-q)) between two probabilities p and q using a base base logarithm.

Reference: Relative entropy.

source
Ket.conditional_entropyFunction
conditional_entropy([base=2,] pAB::AbstractMatrix)

Computes the conditional Shannon entropy H(A|B) of the joint probability distribution pAB using a base base logarithm.

Reference: Conditional entropy.

source
conditional_entropy([base=2,], rho::AbstractMatrix, csys::AbstractVector, dims::AbstractVector)

Computes the conditional von Neumann entropy of rho with subsystem dimensions dims and conditioning systems csys, using a base base logarithm.

Reference: Conditional quantum entropy.

source

Entanglement

Ket.schmidt_decompositionFunction
schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})

Produces the Schmidt decomposition of ψ with subsystem dimensions dims. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.

Reference: Schmidt decomposition.

source
schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})

Produces the Schmidt decomposition of ψ assuming equally-sized subsystems. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.

Reference: Schmidt decomposition.

source

Measurements

Ket.sic_povmFunction
sic_povm([T=ComplexF64,] d::Integer)

Constructs a vector of vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d. This construction is based on the Weyl-Heisenberg fiducial.

Reference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813

source
Ket.test_sicFunction
test_sic(vecs)

Tests whether vecs is a vector of vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d.

source
Ket.test_povmFunction
test_povm(A::Vector{<:AbstractMatrix{T}})

Checks if the measurement defined by A is valid (hermitian, semi-definite positive, and normalized).

source
Ket.dilate_povmFunction
dilate_povm(vecs::Vector{Vector{T}})

Does the Naimark dilation of a rank-1 POVM given as a vector of vectors. This is the minimal dilation.

source
dilate_povm(E::Vector{<:AbstractMatrix})

Does the Naimark dilation of a POVM given as a vector of matrices. This always works, but is wasteful if the POVM elements are not full rank.

source
Ket.povmFunction
povm(B::Vector{<:AbstractMatrix{T}})

Creates a set of (projective) measurements from a set of bases given as unitary matrices.

source
povm(A::Array{T, 4}, n::Vector{Int64})

Converts a set of measurements in the common tensor format into a matrix of matrices. The second argument is fixed by the size of A but can also contain custom number of outcomes.

source
Ket.mubFunction
mub([T=ComplexF64,] d::Integer)

Construction of the standard complete set of MUBs. The output contains 1+minᵢ pᵢ^rᵢ bases, where d = ∏ᵢ pᵢ^rᵢ.

Reference: Durt, Englert, Bengtsson, Życzkowski, arXiv:1004.3348.

source

Nonlocality

Ket.chshFunction
chsh([T=Float64,] d::Integer = 2)

CHSH-d nonlocal game in full probability notation. If T is an integer type the game is unnormalized.

Reference: Buhrman and Massar, arXiv:quant-ph/0409066.

source
Ket.local_boundFunction
local_bound(G::Array{T,4})

Computes the local bound of a bipartite Bell functional G, written in full probability notation as a 4-dimensional array.

source
Ket.tsirelson_boundFunction
tsirelson_bound(CG::Matrix, scenario::Vector, level::Integer)

Upper bounds the Tsirelson bound of a bipartite Bell funcional game CG, written in Collins-Gisin notation. scenario is vector detailing the number of inputs and outputs, in the order [oa, ob, ia, ib]. level is an integer determining the level of the NPA hierarchy.

This function requires Moment. It is only available if you first do "import MATLAB" or "using MATLAB".

source
Ket.correlation_tensorFunction
correlation_tensor(p::AbstractArray{T, N2}; marg::Bool = true)

Applies N sets of measurements onto a state rho to form a probability array. Convert a 2x...x2xmx...xm probability array into

  • a mx...xm correlation array (no marginals)
  • a (m+1)x...x(m+1) correlation array (marginals).
source
Ket.probability_tensorFunction
probability_tensor(rho::LA.Hermitian, all_Aax::Vector{Measurement}...)

Applies N sets of measurements onto a state rho to form a probability array.

source
Ket.fp2cgFunction
fp2cg(V::Array{T,4}) where {T <: Real}

Takes a bipartite Bell functional V in full probability notation and transforms it to Collins-Gisin notation.

source

Norms

Ket.kyfan_normFunction
kyfan_norm(X::AbstractMatrix, k::Integer, p::Real = 2)

Computes Ky-Fan (k,p) norm of matrix X.

source

Random

Ket.random_stateFunction
random_state([T=ComplexF64,] d::Integer, k::Integer = d)

Produces a uniformly distributed random quantum state in dimension d with rank k.

Reference: Życzkowski and Sommers, arXiv:quant-ph/0012101.

source
Ket.random_povmFunction
random_povm([T=ComplexF64,] d::Integer, n::Integer, r::Integer)

Produces a random POVM of dimension d with n outcomes and rank min(k, d).

Reference: Heinosaari et al., arXiv:1902.04751.

source

States

Ket.state_phiplus_ketFunction
state_phiplus_ket([T=ComplexF64,] d::Integer = 2)

Produces the vector of the maximally entangled state Φ⁺ of local dimension d.

source
Ket.state_phiplusFunction
state_phiplus([T=ComplexF64,] d::Integer = 2; v::Real = 1)

Produces the maximally entangled state Φ⁺ of local dimension d with visibility v.

source
Ket.isotropicFunction
isotropic(v::Real, d::Integer = 2)

Produces the isotropic state of local dimension d with visibility v.

source
Ket.state_psiminus_ketFunction
state_psiminus_ket([T=ComplexF64,] d::Integer = 2)

Produces the vector of the maximally entangled state ψ⁻ of local dimension d.

source
Ket.state_psiminusFunction
state_psiminus([T=ComplexF64,] d::Integer = 2; v::Real = 1)

Produces the maximally entangled state ψ⁻ of local dimension d with visibility v.

source
Ket.state_ghz_ketFunction
state_ghz_ket([T=ComplexF64,] d::Integer = 2, N::Integer = 3; coeff)

Produces the vector of the GHZ state local dimension d. By default, coeff contains 1/√d uniformly.

source
Ket.state_ghzFunction
state_ghz([T=ComplexF64,] d::Integer = 2, N::Integer = 3; v::Real = 1, coeff)

Produces the GHZ state of local dimension d with visibility v. By default, coeff contains 1/√d uniformly.

source
Ket.state_w_ketFunction
state_w_ket([T=ComplexF64,] N::Integer = 3; coeff)

Produces the vector of the N-partite W state. By default, coeff contains 1/√N uniformly.

source
Ket.state_wFunction
state_w([T=ComplexF64,] N::Integer = 3; v::Real = 1, coeff)

Produces the N-partite W state with visibility v. By default, coeff contains 1/√N uniformly.

source
Ket.white_noiseFunction
white_noise(rho::AbstractMatrix, v::Real)

Returns v * rho + (1 - v) * id, where id is the maximally mixed state.

source
Ket.white_noise!Function
white_noise!(rho::AbstractMatrix, v::Real)

Modifies rho in place to tranform in into v * rho + (1 - v) * id where id is the maximally mixed state.

source

Internal functions

Ket._partitionFunction
partition(n::Integer, k::Integer)

If n ≥ k partitions the set 1:n into k parts as equally sized as possible. Otherwise partitions it into n parts of size 1.

source
Ket._fiducial_WHFunction
_fiducial_WH([T=ComplexF64,] d::Integer)

Computes the fiducial Weyl-Heisenberg vector of dimension d.

Reference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813 http://www.gerhardzauner.at/sicfiducials.html

source
Ket._idxFunction
_idx(tidx::Vector, dims::Vector)

Converts a tensor index tidx = [i₁, i₂, ...] with subsystems dimensions dims to a standard index.

source
Ket._tidxFunction
_tidx(idx::Integer, dims::Vector)

Converts a standard index idx to a tensor index [i₁, i₂, ...] with subsystems dimensions dims.

source
diff --git a/dev/index.html b/dev/index.html index be1dfc8..513a99a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · Ket.jl

Ket.jl

Dev

Toolbox for quantum information, nonlocality, and entanglement.

Highlights are the functions mub and sic_povm, that produce respectively MUBs and SIC-POVMs with arbitrary precision, local_bound that uses a parallelized algorithm to compute the local bound of a Bell inequality, and partial_trace and partial_transpose, that compute the partial trace and partial transpose in a way that can be used for optimization with JuMP. Also worth mentioning are the functions to produce uniformly-distributed random states, unitaries, and POVMs: random_state, random_unitary, random_povm. And the eponymous ket, of course.

For the full list of functions see the documentation.

+Home · Ket.jl

Ket.jl

Dev

Toolbox for quantum information, nonlocality, and entanglement.

Highlights are the functions mub and sic_povm, that produce respectively MUBs and SIC-POVMs with arbitrary precision, local_bound that uses a parallelized algorithm to compute the local bound of a Bell inequality, and partial_trace and partial_transpose, that compute the partial trace and partial transpose in a way that can be used for optimization with JuMP. Also worth mentioning are the functions to produce uniformly-distributed random states, unitaries, and POVMs: random_state, random_unitary, random_povm. And the eponymous ket, of course.

For the full list of functions see the documentation.

diff --git a/dev/search_index.js b/dev/search_index.js index 355bbb0..a08d859 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"api/#List-of-functions","page":"List of functions","title":"List of functions","text":"","category":"section"},{"location":"api/#Basic","page":"List of functions","title":"Basic","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"ket\nketbra\nproj\nshift\nclock\npauli\ngell_mann\ngell_mann!\npartial_trace\npartial_transpose\ncleanup!","category":"page"},{"location":"api/#Ket.ket","page":"List of functions","title":"Ket.ket","text":"ket([T=ComplexF64,] i::Integer, d::Integer = 2)\n\nProduces a ket of dimension d with nonzero element i.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.ketbra","page":"List of functions","title":"Ket.ketbra","text":"ketbra(v::AbstractVector)\n\nProduces a ketbra of vector v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.proj","page":"List of functions","title":"Ket.proj","text":"proj([T=ComplexF64,] i::Integer, d::Integer = 2)\n\nProduces a projector onto the basis state i in dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.shift","page":"List of functions","title":"Ket.shift","text":"shift([T=ComplexF64,] d::Integer, p::Integer = 1)\n\nConstructs the shift operator X of dimension d to the power p.\n\nReference: Generalized Clifford algebra\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.clock","page":"List of functions","title":"Ket.clock","text":"clock([T=ComplexF64,] d::Integer, p::Integer = 1)\n\nConstructs the clock operator Z of dimension d to the power p.\n\nReference: Generalized Clifford algebra\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.pauli","page":"List of functions","title":"Ket.pauli","text":"pauli([T=ComplexF64,], ind::Vector{<:Integer})\n\nConstructs the Pauli matrices: 0 or \"I\" for the identity, 1 or \"X\" for the Pauli X operation, 2 or \"Y\" for the Pauli Y operator, and 3 or \"Z\" for the Pauli Z operator. Vectors of integers between 0 and 3 or strings of I, X, Y, Z automatically generate Kronecker products of the corresponding operators.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.gell_mann","page":"List of functions","title":"Ket.gell_mann","text":"gell_mann([T=ComplexF64,], d::Integer = 3)\n\nConstructs the set G of generalized Gell-Mann matrices in dimension d such that G[1] = I and G[i]*G[j] = 2 δ_ij.\n\nReference: Generalizations of Pauli matrices\n\n\n\n\n\ngell_mann([T=ComplexF64,], i::Integer, j::Integer, d::Integer = 3)\n\nConstructs the set i,jth Gell-Mann matrix of dimension d.\n\nReference: Generalizations of Pauli matrices\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.gell_mann!","page":"List of functions","title":"Ket.gell_mann!","text":"gell_mann!(res::AbstractMatrix{T}, i::Integer, j::Integer, d::Integer = 3)\n\nIn-place version of gell_mann.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.partial_trace","page":"List of functions","title":"Ket.partial_trace","text":"partial_trace(X::AbstractMatrix, remove::Vector, dims::Vector)\n\nTakes the partial trace of matrix X with subsystem dimensions dims over the subsystems in remove.\n\n\n\n\n\npartial_trace(X::AbstractMatrix, remove::Integer, dims::Vector)\n\nTakes the partial trace of matrix X with subsystem dimensions dims over the subsystem remove.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.partial_transpose","page":"List of functions","title":"Ket.partial_transpose","text":"partial_transpose(X::AbstractMatrix, transp::Vector, dims::Vector)\n\nTakes the partial transpose of matrix X with subsystem dimensions dims on the subsystems in transp.\n\n\n\n\n\npartial_transpose(X::AbstractMatrix, transp::Integer, dims::Vector)\n\nTakes the partial transpose of matrix X with subsystem dimensions dims on the subsystem transp.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.cleanup!","page":"List of functions","title":"Ket.cleanup!","text":"cleanup!(M::AbstractArray{T}; tol = Base.rtoldefault(real(T)))\n\nZeroes out real or imaginary parts of M that are smaller than tol.\n\n\n\n\n\n","category":"function"},{"location":"api/#Entropy","page":"List of functions","title":"Entropy","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"entropy\nbinary_entropy\nrelative_entropy\nbinary_relative_entropy\nconditional_entropy","category":"page"},{"location":"api/#Ket.entropy","page":"List of functions","title":"Ket.entropy","text":"entropy([base=2,] ρ::AbstractMatrix)\n\nComputes the von Neumann entropy -tr(ρ log ρ) of a positive semidefinite operator ρ using a base base logarithm.\n\nReference: von Neumann entropy.\n\n\n\n\n\nentropy([base=2,] p::AbstractVector)\n\nComputes the Shannon entropy -Σᵢpᵢlog(pᵢ) of a non-negative vector p using a base base logarithm.\n\nReference: Entropy (information theory).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.binary_entropy","page":"List of functions","title":"Ket.binary_entropy","text":"binary_entropy([base=2,] p::Real)\n\nComputes the Shannon entropy -p log(p) - (1-p)log(1-p) of a probability p using a base base logarithm.\n\nReference: Entropy (information theory).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.relative_entropy","page":"List of functions","title":"Ket.relative_entropy","text":"relative_entropy([base=2,] ρ::AbstractMatrix, σ::AbstractMatrix)\n\nComputes the (quantum) relative entropy tr(ρ (log ρ - log σ)) between positive semidefinite matrices ρ and σ using a base base logarithm. Note that the support of ρ must be contained in the support of σ but for efficiency this is not checked.\n\nReference: Quantum relative entropy.\n\n\n\n\n\nrelative_entropy([base=2,] p::AbstractVector, q::AbstractVector)\n\nComputes the relative entropy D(p||q) = Σᵢpᵢlog(pᵢ/qᵢ) between two non-negative vectors p and q using a base base logarithm. Note that the support of p must be contained in the support of q but for efficiency this is not checked.\n\nReference: Relative entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.binary_relative_entropy","page":"List of functions","title":"Ket.binary_relative_entropy","text":"binary_relative_entropy([base=2,] p::Real, q::Real)\n\nComputes the binary relative entropy D(p||q) = p log(p/q) + (1-p) log((1-p)/(1-q)) between two probabilities p and q using a base base logarithm.\n\nReference: Relative entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.conditional_entropy","page":"List of functions","title":"Ket.conditional_entropy","text":"conditional_entropy([base=2,] pAB::AbstractMatrix)\n\nComputes the conditional Shannon entropy H(A|B) of the joint probability distribution pAB using a base base logarithm.\n\nReference: Conditional entropy.\n\n\n\n\n\nconditional_entropy([base=2,], rho::AbstractMatrix, csys::AbstractVector, dims::AbstractVector)\n\nComputes the conditional von Neumann entropy of rho with subsystem dimensions dims and conditioning systems csys, using a base base logarithm.\n\nReference: Conditional quantum entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Entanglement","page":"List of functions","title":"Entanglement","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"schmidt_decomposition","category":"page"},{"location":"api/#Ket.schmidt_decomposition","page":"List of functions","title":"Ket.schmidt_decomposition","text":"schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})\n\nProduces the Schmidt decomposition of ψ with subsystem dimensions dims. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.\n\nReference: Schmidt decomposition.\n\n\n\n\n\nschmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})\n\nProduces the Schmidt decomposition of ψ assuming equally-sized subsystems. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.\n\nReference: Schmidt decomposition.\n\n\n\n\n\n","category":"function"},{"location":"api/#Measurements","page":"List of functions","title":"Measurements","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"sic_povm\ntest_sic\ntest_povm\ndilate_povm\npovm\nmub\ntest_mub","category":"page"},{"location":"api/#Ket.sic_povm","page":"List of functions","title":"Ket.sic_povm","text":"sic_povm([T=ComplexF64,] d::Integer)\n\nConstructs a vector of d² vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d. This construction is based on the Weyl-Heisenberg fiducial.\n\nReference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_sic","page":"List of functions","title":"Ket.test_sic","text":"test_sic(vecs)\n\nTests whether vecs is a vector of d² vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_povm","page":"List of functions","title":"Ket.test_povm","text":"test_povm(A::Vector{<:AbstractMatrix{T}})\n\nChecks if the measurement defined by A is valid (hermitian, semi-definite positive, and normalized).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.dilate_povm","page":"List of functions","title":"Ket.dilate_povm","text":"dilate_povm(vecs::Vector{Vector{T}})\n\nDoes the Naimark dilation of a rank-1 POVM given as a vector of vectors. This is the minimal dilation.\n\n\n\n\n\ndilate_povm(E::Vector{<:AbstractMatrix})\n\nDoes the Naimark dilation of a POVM given as a vector of matrices. This always works, but is wasteful if the POVM elements are not full rank.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.povm","page":"List of functions","title":"Ket.povm","text":"povm(B::Vector{<:AbstractMatrix{T}})\n\nCreates a set of (projective) measurements from a set of bases given as unitary matrices.\n\n\n\n\n\npovm(A::Array{T, 4}, n::Vector{Int64})\n\nConverts a set of measurements in the common tensor format into a matrix of matrices. The second argument is fixed by the size of A but can also contain custom number of outcomes.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.mub","page":"List of functions","title":"Ket.mub","text":"mub([T=ComplexF64,] d::Integer)\n\nConstruction of the standard complete set of MUBs. The output contains 1+minᵢ pᵢ^rᵢ bases, where d = ∏ᵢ pᵢ^rᵢ.\n\nReference: Durt, Englert, Bengtsson, Życzkowski, arXiv:1004.3348.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_mub","page":"List of functions","title":"Ket.test_mub","text":"Check whether the input is indeed mutually unbiased\n\n\n\n\n\n","category":"function"},{"location":"api/#Nonlocality","page":"List of functions","title":"Nonlocality","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"chsh\ncglmp\nlocal_bound\ntsirelson_bound\ncorrelation_tensor\nprobability_tensor\nfp2cg","category":"page"},{"location":"api/#Ket.chsh","page":"List of functions","title":"Ket.chsh","text":"chsh([T=Float64,] d::Integer = 2)\n\nCHSH-d nonlocal game in full probability notation. If T is an integer type the game is unnormalized.\n\nReference: Buhrman and Massar, arXiv:quant-ph/0409066.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.cglmp","page":"List of functions","title":"Ket.cglmp","text":"cglmp([T=Float64,] d::Integer)\n\nCGLMP nonlocal game in full probability notation. If T is an integer type the game is unnormalized.\n\nReferences: arXiv:quant-ph/0106024 for the original game, and arXiv:2005.13418 for the form presented here.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.local_bound","page":"List of functions","title":"Ket.local_bound","text":"local_bound(G::Array{T,4})\n\nComputes the local bound of a bipartite Bell functional G, written in full probability notation as a 4-dimensional array.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.tsirelson_bound","page":"List of functions","title":"Ket.tsirelson_bound","text":"tsirelson_bound(CG::Matrix, scenario::Vector, level::Integer)\n\nUpper bounds the Tsirelson bound of a bipartite Bell funcional game CG, written in Collins-Gisin notation. scenario is vector detailing the number of inputs and outputs, in the order [oa, ob, ia, ib]. level is an integer determining the level of the NPA hierarchy.\n\nThis function requires Moment. It is only available if you first do \"import MATLAB\" or \"using MATLAB\".\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.correlation_tensor","page":"List of functions","title":"Ket.correlation_tensor","text":"correlation_tensor(p::AbstractArray{T, N2}; marg::Bool = true)\n\nApplies N sets of measurements onto a state rho to form a probability array. Convert a 2x...x2xmx...xm probability array into\n\na mx...xm correlation array (no marginals)\na (m+1)x...x(m+1) correlation array (marginals).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.probability_tensor","page":"List of functions","title":"Ket.probability_tensor","text":"probability_tensor(rho::LA.Hermitian, all_Aax::Vector{Measurement}...)\n\nApplies N sets of measurements onto a state rho to form a probability array.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.fp2cg","page":"List of functions","title":"Ket.fp2cg","text":"fp2cg(V::Array{T,4}) where {T <: Real}\n\nTakes a bipartite Bell functional V in full probability notation and transforms it to Collins-Gisin notation.\n\n\n\n\n\n","category":"function"},{"location":"api/#Norms","page":"List of functions","title":"Norms","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"trace_norm\nkyfan_norm\nschatten_norm","category":"page"},{"location":"api/#Ket.trace_norm","page":"List of functions","title":"Ket.trace_norm","text":"trace_norm(X::AbstractMatrix)\n\nComputes trace norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.kyfan_norm","page":"List of functions","title":"Ket.kyfan_norm","text":"kyfan_norm(X::AbstractMatrix, k::Integer, p::Real = 2)\n\nComputes Ky-Fan (k,p) norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.schatten_norm","page":"List of functions","title":"Ket.schatten_norm","text":"schatten_norm(X::AbstractMatrix, p::Real)\n\nComputes Schatten p-norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Random","page":"List of functions","title":"Random","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"random_state\nrandom_state_vector\nrandom_unitary\nrandom_povm\nrandom_probability","category":"page"},{"location":"api/#Ket.random_state","page":"List of functions","title":"Ket.random_state","text":"random_state([T=ComplexF64,] d::Integer, k::Integer = d)\n\nProduces a uniformly distributed random quantum state in dimension d with rank k.\n\nReference: Życzkowski and Sommers, arXiv:quant-ph/0012101.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_state_vector","page":"List of functions","title":"Ket.random_state_vector","text":"random_state_vector([T=ComplexF64,] d::Integer)\n\nProduces a Haar-random quantum state vector in dimension d.\n\nReference: Życzkowski and Sommers, arXiv:quant-ph/0012101.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_unitary","page":"List of functions","title":"Ket.random_unitary","text":"random_unitary([T=ComplexF64,] d::Integer)\n\nProduces a Haar-random unitary matrix in dimension d. If T is a real type the output is instead a Haar-random (real) orthogonal matrix.\n\nReferences: Mezzadri, arXiv:math-ph/0609050. Stewart, doi:10.1137/0717034\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_povm","page":"List of functions","title":"Ket.random_povm","text":"random_povm([T=ComplexF64,] d::Integer, n::Integer, r::Integer)\n\nProduces a random POVM of dimension d with n outcomes and rank min(k, d).\n\nReference: Heinosaari et al., arXiv:1902.04751.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_probability","page":"List of functions","title":"Ket.random_probability","text":"random_probability([T=Float64,] d::Integer)\n\nProduces a random probability vector of dimension d uniformly distributed on the simplex.\n\nReference: Dirichlet distribution\n\n\n\n\n\n","category":"function"},{"location":"api/#States","page":"List of functions","title":"States","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"state_phiplus_ket\nstate_phiplus\nisotropic\nstate_psiminus_ket\nstate_psiminus\nstate_ghz_ket\nstate_ghz\nstate_w_ket\nstate_w\nwhite_noise\nwhite_noise!","category":"page"},{"location":"api/#Ket.state_phiplus_ket","page":"List of functions","title":"Ket.state_phiplus_ket","text":"state_phiplus_ket([T=ComplexF64,] d::Integer = 2)\n\nProduces the vector of the maximally entangled state Φ⁺ of local dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_phiplus","page":"List of functions","title":"Ket.state_phiplus","text":"state_phiplus([T=ComplexF64,] d::Integer = 2; v::Real = 1)\n\nProduces the maximally entangled state Φ⁺ of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.isotropic","page":"List of functions","title":"Ket.isotropic","text":"isotropic(v::Real, d::Integer = 2)\n\nProduces the isotropic state of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_psiminus_ket","page":"List of functions","title":"Ket.state_psiminus_ket","text":"state_psiminus_ket([T=ComplexF64,] d::Integer = 2)\n\nProduces the vector of the maximally entangled state ψ⁻ of local dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_psiminus","page":"List of functions","title":"Ket.state_psiminus","text":"state_psiminus([T=ComplexF64,] d::Integer = 2; v::Real = 1)\n\nProduces the maximally entangled state ψ⁻ of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_ghz_ket","page":"List of functions","title":"Ket.state_ghz_ket","text":"state_ghz_ket([T=ComplexF64,] d::Integer = 2, N::Integer = 3; coeff)\n\nProduces the vector of the GHZ state local dimension d. By default, coeff contains 1/√d uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_ghz","page":"List of functions","title":"Ket.state_ghz","text":"state_ghz([T=ComplexF64,] d::Integer = 2, N::Integer = 3; v::Real = 1, coeff)\n\nProduces the GHZ state of local dimension d with visibility v. By default, coeff contains 1/√d uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_w_ket","page":"List of functions","title":"Ket.state_w_ket","text":"state_w_ket([T=ComplexF64,] N::Integer = 3; coeff)\n\nProduces the vector of the N-partite W state. By default, coeff contains 1/√N uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_w","page":"List of functions","title":"Ket.state_w","text":"state_w([T=ComplexF64,] N::Integer = 3; v::Real = 1, coeff)\n\nProduces the N-partite W state with visibility v. By default, coeff contains 1/√N uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.white_noise","page":"List of functions","title":"Ket.white_noise","text":"white_noise(rho::LA.Hermitian, v::Real)\n\nReturns v * rho + (1 - v) * id, where id is the maximally mixed state.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.white_noise!","page":"List of functions","title":"Ket.white_noise!","text":"white_noise!(rho::LA.Hermitian, v::Real)\n\nModifies rho in place to tranform in into v * rho + (1 - v) * id where id is the maximally mixed state.\n\n\n\n\n\n","category":"function"},{"location":"api/#Internal-functions","page":"List of functions","title":"Internal functions","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"Ket._partition\nKet._fiducial_WH\nKet._idx\nKet._tidx","category":"page"},{"location":"api/#Ket._partition","page":"List of functions","title":"Ket._partition","text":"partition(n::Integer, k::Integer)\n\nIf n ≥ k partitions the set 1:n into k parts as equally sized as possible. Otherwise partitions it into n parts of size 1.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._fiducial_WH","page":"List of functions","title":"Ket._fiducial_WH","text":"_fiducial_WH([T=ComplexF64,] d::Integer)\n\nComputes the fiducial Weyl-Heisenberg vector of dimension d.\n\nReference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813 http://www.gerhardzauner.at/sicfiducials.html\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._idx","page":"List of functions","title":"Ket._idx","text":"_idx(tidx::Vector, dims::Vector)\n\nConverts a tensor index tidx = [i₁, i₂, ...] with subsystems dimensions dims to a standard index.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._tidx","page":"List of functions","title":"Ket._tidx","text":"_tidx(idx::Integer, dims::Vector)\n\nConverts a standard index idx to a tensor index [i₁, i₂, ...] with subsystems dimensions dims.\n\n\n\n\n\n","category":"function"},{"location":"","page":"Home","title":"Home","text":"EditURL = \"https://github.com/araujoms/Ket.jl/blob/master/README.md\"","category":"page"},{"location":"#Ket.jl","page":"Home","title":"Ket.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"(Image: Dev)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Toolbox for quantum information, nonlocality, and entanglement.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Highlights are the functions mub and sic_povm, that produce respectively MUBs and SIC-POVMs with arbitrary precision, local_bound that uses a parallelized algorithm to compute the local bound of a Bell inequality, and partial_trace and partial_transpose, that compute the partial trace and partial transpose in a way that can be used for optimization with JuMP. Also worth mentioning are the functions to produce uniformly-distributed random states, unitaries, and POVMs: random_state, random_unitary, random_povm. And the eponymous ket, of course.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For the full list of functions see the documentation.","category":"page"}] +[{"location":"api/#List-of-functions","page":"List of functions","title":"List of functions","text":"","category":"section"},{"location":"api/#Basic","page":"List of functions","title":"Basic","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"ket\nketbra\nproj\nshift\nclock\npauli\ngell_mann\ngell_mann!\npartial_trace\npartial_transpose\ncleanup!","category":"page"},{"location":"api/#Ket.ket","page":"List of functions","title":"Ket.ket","text":"ket([T=ComplexF64,] i::Integer, d::Integer = 2)\n\nProduces a ket of dimension d with nonzero element i.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.ketbra","page":"List of functions","title":"Ket.ketbra","text":"ketbra(v::AbstractVector)\n\nProduces a ketbra of vector v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.proj","page":"List of functions","title":"Ket.proj","text":"proj([T=ComplexF64,] i::Integer, d::Integer = 2)\n\nProduces a projector onto the basis state i in dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.shift","page":"List of functions","title":"Ket.shift","text":"shift([T=ComplexF64,] d::Integer, p::Integer = 1)\n\nConstructs the shift operator X of dimension d to the power p.\n\nReference: Generalized Clifford algebra\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.clock","page":"List of functions","title":"Ket.clock","text":"clock([T=ComplexF64,] d::Integer, p::Integer = 1)\n\nConstructs the clock operator Z of dimension d to the power p.\n\nReference: Generalized Clifford algebra\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.pauli","page":"List of functions","title":"Ket.pauli","text":"pauli([T=ComplexF64,], ind::Vector{<:Integer})\n\nConstructs the Pauli matrices: 0 or \"I\" for the identity, 1 or \"X\" for the Pauli X operation, 2 or \"Y\" for the Pauli Y operator, and 3 or \"Z\" for the Pauli Z operator. Vectors of integers between 0 and 3 or strings of I, X, Y, Z automatically generate Kronecker products of the corresponding operators.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.gell_mann","page":"List of functions","title":"Ket.gell_mann","text":"gell_mann([T=ComplexF64,], d::Integer = 3)\n\nConstructs the set G of generalized Gell-Mann matrices in dimension d such that G[1] = I and G[i]*G[j] = 2 δ_ij.\n\nReference: Generalizations of Pauli matrices\n\n\n\n\n\ngell_mann([T=ComplexF64,], i::Integer, j::Integer, d::Integer = 3)\n\nConstructs the set i,jth Gell-Mann matrix of dimension d.\n\nReference: Generalizations of Pauli matrices\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.gell_mann!","page":"List of functions","title":"Ket.gell_mann!","text":"gell_mann!(res::AbstractMatrix{T}, i::Integer, j::Integer, d::Integer = 3)\n\nIn-place version of gell_mann.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.partial_trace","page":"List of functions","title":"Ket.partial_trace","text":"partial_trace(X::AbstractMatrix, remove::Vector, dims::Vector)\n\nTakes the partial trace of matrix X with subsystem dimensions dims over the subsystems in remove.\n\n\n\n\n\npartial_trace(X::AbstractMatrix, remove::Integer, dims::Vector)\n\nTakes the partial trace of matrix X with subsystem dimensions dims over the subsystem remove.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.partial_transpose","page":"List of functions","title":"Ket.partial_transpose","text":"partial_transpose(X::AbstractMatrix, transp::Vector, dims::Vector)\n\nTakes the partial transpose of matrix X with subsystem dimensions dims on the subsystems in transp.\n\n\n\n\n\npartial_transpose(X::AbstractMatrix, transp::Integer, dims::Vector)\n\nTakes the partial transpose of matrix X with subsystem dimensions dims on the subsystem transp.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.cleanup!","page":"List of functions","title":"Ket.cleanup!","text":"cleanup!(M::AbstractArray{T}; tol = Base.rtoldefault(real(T)))\n\nZeroes out real or imaginary parts of M that are smaller than tol.\n\n\n\n\n\n","category":"function"},{"location":"api/#Entropy","page":"List of functions","title":"Entropy","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"entropy\nbinary_entropy\nrelative_entropy\nbinary_relative_entropy\nconditional_entropy","category":"page"},{"location":"api/#Ket.entropy","page":"List of functions","title":"Ket.entropy","text":"entropy([base=2,] ρ::AbstractMatrix)\n\nComputes the von Neumann entropy -tr(ρ log ρ) of a positive semidefinite operator ρ using a base base logarithm.\n\nReference: von Neumann entropy.\n\n\n\n\n\nentropy([base=2,] p::AbstractVector)\n\nComputes the Shannon entropy -Σᵢpᵢlog(pᵢ) of a non-negative vector p using a base base logarithm.\n\nReference: Entropy (information theory).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.binary_entropy","page":"List of functions","title":"Ket.binary_entropy","text":"binary_entropy([base=2,] p::Real)\n\nComputes the Shannon entropy -p log(p) - (1-p)log(1-p) of a probability p using a base base logarithm.\n\nReference: Entropy (information theory).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.relative_entropy","page":"List of functions","title":"Ket.relative_entropy","text":"relative_entropy([base=2,] ρ::AbstractMatrix, σ::AbstractMatrix)\n\nComputes the (quantum) relative entropy tr(ρ (log ρ - log σ)) between positive semidefinite matrices ρ and σ using a base base logarithm. Note that the support of ρ must be contained in the support of σ but for efficiency this is not checked.\n\nReference: Quantum relative entropy.\n\n\n\n\n\nrelative_entropy([base=2,] p::AbstractVector, q::AbstractVector)\n\nComputes the relative entropy D(p||q) = Σᵢpᵢlog(pᵢ/qᵢ) between two non-negative vectors p and q using a base base logarithm. Note that the support of p must be contained in the support of q but for efficiency this is not checked.\n\nReference: Relative entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.binary_relative_entropy","page":"List of functions","title":"Ket.binary_relative_entropy","text":"binary_relative_entropy([base=2,] p::Real, q::Real)\n\nComputes the binary relative entropy D(p||q) = p log(p/q) + (1-p) log((1-p)/(1-q)) between two probabilities p and q using a base base logarithm.\n\nReference: Relative entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.conditional_entropy","page":"List of functions","title":"Ket.conditional_entropy","text":"conditional_entropy([base=2,] pAB::AbstractMatrix)\n\nComputes the conditional Shannon entropy H(A|B) of the joint probability distribution pAB using a base base logarithm.\n\nReference: Conditional entropy.\n\n\n\n\n\nconditional_entropy([base=2,], rho::AbstractMatrix, csys::AbstractVector, dims::AbstractVector)\n\nComputes the conditional von Neumann entropy of rho with subsystem dimensions dims and conditioning systems csys, using a base base logarithm.\n\nReference: Conditional quantum entropy.\n\n\n\n\n\n","category":"function"},{"location":"api/#Entanglement","page":"List of functions","title":"Entanglement","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"schmidt_decomposition","category":"page"},{"location":"api/#Ket.schmidt_decomposition","page":"List of functions","title":"Ket.schmidt_decomposition","text":"schmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})\n\nProduces the Schmidt decomposition of ψ with subsystem dimensions dims. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.\n\nReference: Schmidt decomposition.\n\n\n\n\n\nschmidt_decomposition(ψ::AbstractVector, dims::AbstractVector{<:Integer})\n\nProduces the Schmidt decomposition of ψ assuming equally-sized subsystems. Returns the (sorted) Schmidt coefficients λ and isometries U, V such that kron(U', V')*ψ is of Schmidt form.\n\nReference: Schmidt decomposition.\n\n\n\n\n\n","category":"function"},{"location":"api/#Measurements","page":"List of functions","title":"Measurements","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"sic_povm\ntest_sic\ntest_povm\ndilate_povm\npovm\nmub\ntest_mub","category":"page"},{"location":"api/#Ket.sic_povm","page":"List of functions","title":"Ket.sic_povm","text":"sic_povm([T=ComplexF64,] d::Integer)\n\nConstructs a vector of d² vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d. This construction is based on the Weyl-Heisenberg fiducial.\n\nReference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_sic","page":"List of functions","title":"Ket.test_sic","text":"test_sic(vecs)\n\nTests whether vecs is a vector of d² vectors |vᵢ⟩ such that |vᵢ⟩⟨vᵢ| forms a SIC-POVM of dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_povm","page":"List of functions","title":"Ket.test_povm","text":"test_povm(A::Vector{<:AbstractMatrix{T}})\n\nChecks if the measurement defined by A is valid (hermitian, semi-definite positive, and normalized).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.dilate_povm","page":"List of functions","title":"Ket.dilate_povm","text":"dilate_povm(vecs::Vector{Vector{T}})\n\nDoes the Naimark dilation of a rank-1 POVM given as a vector of vectors. This is the minimal dilation.\n\n\n\n\n\ndilate_povm(E::Vector{<:AbstractMatrix})\n\nDoes the Naimark dilation of a POVM given as a vector of matrices. This always works, but is wasteful if the POVM elements are not full rank.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.povm","page":"List of functions","title":"Ket.povm","text":"povm(B::Vector{<:AbstractMatrix{T}})\n\nCreates a set of (projective) measurements from a set of bases given as unitary matrices.\n\n\n\n\n\npovm(A::Array{T, 4}, n::Vector{Int64})\n\nConverts a set of measurements in the common tensor format into a matrix of matrices. The second argument is fixed by the size of A but can also contain custom number of outcomes.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.mub","page":"List of functions","title":"Ket.mub","text":"mub([T=ComplexF64,] d::Integer)\n\nConstruction of the standard complete set of MUBs. The output contains 1+minᵢ pᵢ^rᵢ bases, where d = ∏ᵢ pᵢ^rᵢ.\n\nReference: Durt, Englert, Bengtsson, Życzkowski, arXiv:1004.3348.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.test_mub","page":"List of functions","title":"Ket.test_mub","text":"Check whether the input is indeed mutually unbiased\n\n\n\n\n\n","category":"function"},{"location":"api/#Nonlocality","page":"List of functions","title":"Nonlocality","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"chsh\ncglmp\nlocal_bound\ntsirelson_bound\ncorrelation_tensor\nprobability_tensor\nfp2cg","category":"page"},{"location":"api/#Ket.chsh","page":"List of functions","title":"Ket.chsh","text":"chsh([T=Float64,] d::Integer = 2)\n\nCHSH-d nonlocal game in full probability notation. If T is an integer type the game is unnormalized.\n\nReference: Buhrman and Massar, arXiv:quant-ph/0409066.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.cglmp","page":"List of functions","title":"Ket.cglmp","text":"cglmp([T=Float64,] d::Integer)\n\nCGLMP nonlocal game in full probability notation. If T is an integer type the game is unnormalized.\n\nReferences: arXiv:quant-ph/0106024 for the original game, and arXiv:2005.13418 for the form presented here.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.local_bound","page":"List of functions","title":"Ket.local_bound","text":"local_bound(G::Array{T,4})\n\nComputes the local bound of a bipartite Bell functional G, written in full probability notation as a 4-dimensional array.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.tsirelson_bound","page":"List of functions","title":"Ket.tsirelson_bound","text":"tsirelson_bound(CG::Matrix, scenario::Vector, level::Integer)\n\nUpper bounds the Tsirelson bound of a bipartite Bell funcional game CG, written in Collins-Gisin notation. scenario is vector detailing the number of inputs and outputs, in the order [oa, ob, ia, ib]. level is an integer determining the level of the NPA hierarchy.\n\nThis function requires Moment. It is only available if you first do \"import MATLAB\" or \"using MATLAB\".\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.correlation_tensor","page":"List of functions","title":"Ket.correlation_tensor","text":"correlation_tensor(p::AbstractArray{T, N2}; marg::Bool = true)\n\nApplies N sets of measurements onto a state rho to form a probability array. Convert a 2x...x2xmx...xm probability array into\n\na mx...xm correlation array (no marginals)\na (m+1)x...x(m+1) correlation array (marginals).\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.probability_tensor","page":"List of functions","title":"Ket.probability_tensor","text":"probability_tensor(rho::LA.Hermitian, all_Aax::Vector{Measurement}...)\n\nApplies N sets of measurements onto a state rho to form a probability array.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.fp2cg","page":"List of functions","title":"Ket.fp2cg","text":"fp2cg(V::Array{T,4}) where {T <: Real}\n\nTakes a bipartite Bell functional V in full probability notation and transforms it to Collins-Gisin notation.\n\n\n\n\n\n","category":"function"},{"location":"api/#Norms","page":"List of functions","title":"Norms","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"trace_norm\nkyfan_norm\nschatten_norm","category":"page"},{"location":"api/#Ket.trace_norm","page":"List of functions","title":"Ket.trace_norm","text":"trace_norm(X::AbstractMatrix)\n\nComputes trace norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.kyfan_norm","page":"List of functions","title":"Ket.kyfan_norm","text":"kyfan_norm(X::AbstractMatrix, k::Integer, p::Real = 2)\n\nComputes Ky-Fan (k,p) norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.schatten_norm","page":"List of functions","title":"Ket.schatten_norm","text":"schatten_norm(X::AbstractMatrix, p::Real)\n\nComputes Schatten p-norm of matrix X.\n\n\n\n\n\n","category":"function"},{"location":"api/#Random","page":"List of functions","title":"Random","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"random_state\nrandom_state_vector\nrandom_unitary\nrandom_povm\nrandom_probability","category":"page"},{"location":"api/#Ket.random_state","page":"List of functions","title":"Ket.random_state","text":"random_state([T=ComplexF64,] d::Integer, k::Integer = d)\n\nProduces a uniformly distributed random quantum state in dimension d with rank k.\n\nReference: Życzkowski and Sommers, arXiv:quant-ph/0012101.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_state_vector","page":"List of functions","title":"Ket.random_state_vector","text":"random_state_vector([T=ComplexF64,] d::Integer)\n\nProduces a Haar-random quantum state vector in dimension d.\n\nReference: Życzkowski and Sommers, arXiv:quant-ph/0012101.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_unitary","page":"List of functions","title":"Ket.random_unitary","text":"random_unitary([T=ComplexF64,] d::Integer)\n\nProduces a Haar-random unitary matrix in dimension d. If T is a real type the output is instead a Haar-random (real) orthogonal matrix.\n\nReferences: Mezzadri, arXiv:math-ph/0609050. Stewart, doi:10.1137/0717034\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_povm","page":"List of functions","title":"Ket.random_povm","text":"random_povm([T=ComplexF64,] d::Integer, n::Integer, r::Integer)\n\nProduces a random POVM of dimension d with n outcomes and rank min(k, d).\n\nReference: Heinosaari et al., arXiv:1902.04751.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.random_probability","page":"List of functions","title":"Ket.random_probability","text":"random_probability([T=Float64,] d::Integer)\n\nProduces a random probability vector of dimension d uniformly distributed on the simplex.\n\nReference: Dirichlet distribution\n\n\n\n\n\n","category":"function"},{"location":"api/#States","page":"List of functions","title":"States","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"state_phiplus_ket\nstate_phiplus\nisotropic\nstate_psiminus_ket\nstate_psiminus\nstate_ghz_ket\nstate_ghz\nstate_w_ket\nstate_w\nwhite_noise\nwhite_noise!","category":"page"},{"location":"api/#Ket.state_phiplus_ket","page":"List of functions","title":"Ket.state_phiplus_ket","text":"state_phiplus_ket([T=ComplexF64,] d::Integer = 2)\n\nProduces the vector of the maximally entangled state Φ⁺ of local dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_phiplus","page":"List of functions","title":"Ket.state_phiplus","text":"state_phiplus([T=ComplexF64,] d::Integer = 2; v::Real = 1)\n\nProduces the maximally entangled state Φ⁺ of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.isotropic","page":"List of functions","title":"Ket.isotropic","text":"isotropic(v::Real, d::Integer = 2)\n\nProduces the isotropic state of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_psiminus_ket","page":"List of functions","title":"Ket.state_psiminus_ket","text":"state_psiminus_ket([T=ComplexF64,] d::Integer = 2)\n\nProduces the vector of the maximally entangled state ψ⁻ of local dimension d.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_psiminus","page":"List of functions","title":"Ket.state_psiminus","text":"state_psiminus([T=ComplexF64,] d::Integer = 2; v::Real = 1)\n\nProduces the maximally entangled state ψ⁻ of local dimension d with visibility v.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_ghz_ket","page":"List of functions","title":"Ket.state_ghz_ket","text":"state_ghz_ket([T=ComplexF64,] d::Integer = 2, N::Integer = 3; coeff)\n\nProduces the vector of the GHZ state local dimension d. By default, coeff contains 1/√d uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_ghz","page":"List of functions","title":"Ket.state_ghz","text":"state_ghz([T=ComplexF64,] d::Integer = 2, N::Integer = 3; v::Real = 1, coeff)\n\nProduces the GHZ state of local dimension d with visibility v. By default, coeff contains 1/√d uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_w_ket","page":"List of functions","title":"Ket.state_w_ket","text":"state_w_ket([T=ComplexF64,] N::Integer = 3; coeff)\n\nProduces the vector of the N-partite W state. By default, coeff contains 1/√N uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.state_w","page":"List of functions","title":"Ket.state_w","text":"state_w([T=ComplexF64,] N::Integer = 3; v::Real = 1, coeff)\n\nProduces the N-partite W state with visibility v. By default, coeff contains 1/√N uniformly.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.white_noise","page":"List of functions","title":"Ket.white_noise","text":"white_noise(rho::AbstractMatrix, v::Real)\n\nReturns v * rho + (1 - v) * id, where id is the maximally mixed state.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket.white_noise!","page":"List of functions","title":"Ket.white_noise!","text":"white_noise!(rho::AbstractMatrix, v::Real)\n\nModifies rho in place to tranform in into v * rho + (1 - v) * id where id is the maximally mixed state.\n\n\n\n\n\n","category":"function"},{"location":"api/#Internal-functions","page":"List of functions","title":"Internal functions","text":"","category":"section"},{"location":"api/","page":"List of functions","title":"List of functions","text":"Ket._partition\nKet._fiducial_WH\nKet._idx\nKet._tidx","category":"page"},{"location":"api/#Ket._partition","page":"List of functions","title":"Ket._partition","text":"partition(n::Integer, k::Integer)\n\nIf n ≥ k partitions the set 1:n into k parts as equally sized as possible. Otherwise partitions it into n parts of size 1.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._fiducial_WH","page":"List of functions","title":"Ket._fiducial_WH","text":"_fiducial_WH([T=ComplexF64,] d::Integer)\n\nComputes the fiducial Weyl-Heisenberg vector of dimension d.\n\nReference: Appleby, Yadsan-Appleby, Zauner, arXiv:1209.1813 http://www.gerhardzauner.at/sicfiducials.html\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._idx","page":"List of functions","title":"Ket._idx","text":"_idx(tidx::Vector, dims::Vector)\n\nConverts a tensor index tidx = [i₁, i₂, ...] with subsystems dimensions dims to a standard index.\n\n\n\n\n\n","category":"function"},{"location":"api/#Ket._tidx","page":"List of functions","title":"Ket._tidx","text":"_tidx(idx::Integer, dims::Vector)\n\nConverts a standard index idx to a tensor index [i₁, i₂, ...] with subsystems dimensions dims.\n\n\n\n\n\n","category":"function"},{"location":"","page":"Home","title":"Home","text":"EditURL = \"https://github.com/araujoms/Ket.jl/blob/master/README.md\"","category":"page"},{"location":"#Ket.jl","page":"Home","title":"Ket.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"(Image: Dev)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Toolbox for quantum information, nonlocality, and entanglement.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Highlights are the functions mub and sic_povm, that produce respectively MUBs and SIC-POVMs with arbitrary precision, local_bound that uses a parallelized algorithm to compute the local bound of a Bell inequality, and partial_trace and partial_transpose, that compute the partial trace and partial transpose in a way that can be used for optimization with JuMP. Also worth mentioning are the functions to produce uniformly-distributed random states, unitaries, and POVMs: random_state, random_unitary, random_povm. And the eponymous ket, of course.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For the full list of functions see the documentation.","category":"page"}] }