Library
BellDiagonalQudits.AnalysedCoordState
BellDiagonalQudits.AnalysisSpecification
BellDiagonalQudits.BoundedCoordEW
BellDiagonalQudits.BoundedEW
BellDiagonalQudits.ClassConflictException
BellDiagonalQudits.CoordState
BellDiagonalQudits.DensityState
BellDiagonalQudits.EntanglementWitness
BellDiagonalQudits.StandardBasis
BellDiagonalQudits.analyse_coordstate
BellDiagonalQudits.calculate_mub_correlation
BellDiagonalQudits.classify_analyzed_states!
BellDiagonalQudits.classify_entanglement
BellDiagonalQudits.concurrence_qp_check
BellDiagonalQudits.create_basis_state_operators
BellDiagonalQudits.create_bipartite_maxentangled
BellDiagonalQudits.create_bipartite_weyloperator_basis
BellDiagonalQudits.create_comppar_unitary
BellDiagonalQudits.create_densitystate
BellDiagonalQudits.create_dictionary_from_basis
BellDiagonalQudits.create_dimelement_sublattices
BellDiagonalQudits.create_halfspheric_witnesses
BellDiagonalQudits.create_index_sublattice_state
BellDiagonalQudits.create_kernel_hpolytope
BellDiagonalQudits.create_kernel_polytope
BellDiagonalQudits.create_kernel_vertexstates
BellDiagonalQudits.create_random_bounded_ews
BellDiagonalQudits.create_random_coordstates
BellDiagonalQudits.create_random_witnesses
BellDiagonalQudits.create_red_parmatrix_from_parvector
BellDiagonalQudits.create_standard_indexbasis
BellDiagonalQudits.create_standard_mub
BellDiagonalQudits.create_weyloperator_basis
BellDiagonalQudits.direct_optimization
BellDiagonalQudits.extend_vpolytope_by_densitystates
BellDiagonalQudits.generate_symmetries
BellDiagonalQudits.generic_vectorproduct
BellDiagonalQudits.get_bounded_coordew
BellDiagonalQudits.get_bounded_ew
BellDiagonalQudits.get_comppar_unitary_from_parvector
BellDiagonalQudits.get_concurrence_qp
BellDiagonalQudits.get_direct_functions_for_wit_traceoptimization
BellDiagonalQudits.get_intertwiner
BellDiagonalQudits.get_permutation_from_momentuminversion
BellDiagonalQudits.get_permutation_from_quarterrotation
BellDiagonalQudits.get_permutation_from_translation
BellDiagonalQudits.get_permutation_from_verticalshear
BellDiagonalQudits.get_properdivisors
BellDiagonalQudits.get_symcoords
BellDiagonalQudits.get_witness_extrema
BellDiagonalQudits.isppt
BellDiagonalQudits.ispsd
BellDiagonalQudits.kernel_check
BellDiagonalQudits.map_indices_to_normcoords
BellDiagonalQudits.mub_check
BellDiagonalQudits.numeric_ew_check
BellDiagonalQudits.ppt_check
BellDiagonalQudits.realignment_check
BellDiagonalQudits.rounddigits
BellDiagonalQudits.spinrep_check
BellDiagonalQudits.sym_analyse_coordstate
BellDiagonalQudits.uniform_bell_sampler
BellDiagonalQudits.weyloperator
BellDiagonalQudits.weyltrf
BellDiagonalQudits.δ
BellDiagonalQudits.δ_mod
Public
BellDiagonalQudits.AnalysedCoordState
— TypeRepresenting an entanglement analyzed Bell diagonal state.
- coordState: The analyzed
CoordState
- kernel:
true
if kernel check successful, elsefalse
.missing
if entanglement check not applied. - spinrep:
true
if spinrep check successful, elsefalse
.missing
if entanglement check not applied. - ppt:
true
if ppt check successful, elsefalse
.missing
if entanglement check not applied. - realign:
true
if realignment check successful, elsefalse
.missing
if entanglement check not applied. - concurrence:
true
if concurrence check successful, elsefalse
.missing
if entanglement check not applied. - mub:
true
if mub check successful, elsefalse
.missing
if entanglement check not applied. - numericEW:
true
if numericEW check successful, elsefalse
.missing
if entanglement check not applied.
BellDiagonalQudits.AnalysisSpecification
— TypeSpecification which entanglement checks to use.
- kernel_check
- spinrep_check
- ppt_check
- realignment_check
- concurrenceqpcheck
- mub_check
- numericewcheck
- useSymmetries
BellDiagonalQudits.BoundedCoordEW
— TypeRepresents an entanglement witness $W$ with extrema to detect entangled Bell diagonal states.
- coords: Coordinates in Bell basis.
- upperBound: Upper bound of $tr W \rho$ satisfied by all separable states $\rho$. Violation detects entanglement.
- lowerBound: Lower bound of $tr W \rho$ satisfied by all separable states $\rho$. Violation detects entanglement.
- checkedIterations: Number of iterations used in the optimization of bounds.
BellDiagonalQudits.ClassConflictException
— TypeException for conflicts in analysis results.
- state: The
AnalysedCoordState
for which a conflict occurs.
BellDiagonalQudits.CoordState
— TypeRepresents a Bell diagonal state in Bell basis.
- coords: Coordinates in Bell basis.
- eClass: Entanglement class of the represented state.
BellDiagonalQudits.DensityState
— TypeRepresents a Bell diagonal state.
- coords: Coordinates in Bell basis.
- densityMatrix: Hermitian density matrix in computational basis.
- eClass: Entanglement class of the represented state.
BellDiagonalQudits.StandardBasis
— TypeRepresents a Bell basis related to Weyl operators.
- basis: Array with elements containing Bell basis density matrices, Weyl- and flat indices.
BellDiagonalQudits.analyse_coordstate
— Functionanalyse_coordstate(
d,
coordState::CoordState,
anaSpec::AnalysisSpecification,
stdBasis::StandardBasis=missing,
kernelPolytope::Union{HPolytope{Float64,Array{Float64,1}},VPolytope{Float64,Array{Float64,1}},Missing}=missing,
bipartiteWeylBasis::Union{Vector{Array{Complex{Float64},2}},Missing}=missing,
dictionaries::Union{Any,Missing}=missing,
mubSet::Union{Vector{Vector{Vector{ComplexF64}}},Missing}=missing,
boundedEWs::Union{Array{BoundedCoordEW},Missing}=missing,
precision=10,
relUncertainity=0.0
)
Return an AnalysedCoordState
for a coordState
in d
dimensions based on the given anaSpec
and corresponding analysis objects.
If an entanglement check should not be carried out or if an analysis object in not passed as variable, the corresponding property in anaSpec
needs to be false
. In this case, return the corresponding property of the AnalysedCoordState
as missing
.
BellDiagonalQudits.classify_analyzed_states!
— Methodclassify_analyzed_states!(anaCoordStates::Array{AnalysedCoordState})
Set entanglement class for array of analysedCoordStates
.
BellDiagonalQudits.create_bipartite_weyloperator_basis
— Methodcreate_bipartite_weyloperator_basis(d)
Return vector of length $d^4$, containing the product basis of two Weyl operator bases as basis for the $(d^2,d^2)$ matrix space.
BellDiagonalQudits.create_densitystate
— Methodcreate_densitystate(coordState::CoordState, standardBasis::StandardBasis)
Return DensityState
containing the density matrix in computational basis based on
coordStatecoordinates in Bell
standardBasis`.
BellDiagonalQudits.create_dictionary_from_basis
— Methodcreate_dictionary_from_basis(stdBasis)
Return vector containing a dictionary and it's inverse, relating the $d^2$ flat indices to the double indices of stdBasis
.
BellDiagonalQudits.create_kernel_polytope
— Methodcreate_kernel_polytope(d, standardBasis::StandardBasis)
Return LazySets.HPolytope representation of the kernel polytope for dimension d
and Bell basis standardBasis
.
BellDiagonalQudits.create_random_bounded_ews
— Functioncreate_random_bounded_ews(
d,
standardBasis::StandardBasis,
n,
sphericalOnly::Bool,
iterations::Integer,
method=Optim.NelderMead,
useConstrainedOpt=false
)
Return array of n
BoundedEW
with $d^2$ standardBasis
coordinates uniformly distributed in [-1, 1] if sphericalOnly
is false or uniformly distributed on unit sphere otherwise.
Use iterations
runs to improve optimizatio with Optim.jl optimization method method
.
BellDiagonalQudits.create_random_coordstates
— Functioncreate_random_coordstates(nSamples, d, object=:magicSimplex, precision=10, roundToSteps::Int=0, nTriesMax=10000000)
Return an array of nSamples
$d^2$ dimensional CoordStates.
Use the object
to specify the coordinate ranges to [0,1] for 'magicSimplex' or [0, 1/d] for 'enclosurePolytope'. If roundToSteps
> 0, round the coordinates to the vertices that divide the range in roundToSteps
` equally sized sections. Be aware that the resulting distribution of points is generally not uniform.
BellDiagonalQudits.create_standard_indexbasis
— Methodcreate_standard_indexbasis(d, precision)
Return indexed Bell basis for d
dimensions as StandardBasis
rounded to precision
digits.
BellDiagonalQudits.create_standard_mub
— Methodcreate_standard_mub(d)
Return vector of mutually unbiased bases for dimensions d
three or four.
BellDiagonalQudits.extend_vpolytope_by_densitystates
— Methodextend_vpolytope_by_densitystates(
sepPolytope::VPolytope{Float64,Array{Float64,1}},
sepDensityStates::Array{DensityState},
precision::Integer
)
Return an extended Lazysets.VPolytope representation of polytope of separable states based on given polytope sepPolytope
and new separable sepDensityStates
as new vertices.
BellDiagonalQudits.generate_symmetries
— Functiongenerate_symmetries(stdBasis::StandardBasis, d, orderLimit=0)
Return array of Permutations.Permutation
of all symmetries up to order orderLimit
in d
dimensions generated by the generators represented in standardBasis
.
BellDiagonalQudits.get_bounded_coordew
— Methodget_bounded_coordew(bEw::BoundedEW)::BoundedCoordEW
Map BoundedEW bEw
to corresponding BoundedCoordEW
.
BellDiagonalQudits.get_symcoords
— Methodget_symcoords(coords::Array{Float64,1}, symPermutations::Array{Permutation})
Return array containing all symmetric Bell coordinates of given symmetries symPermutations
applied to Bell coordinates coords
.
BellDiagonalQudits.sym_analyse_coordstate
— Functionsym_analyse_coordstate(
d,
coordState::CoordState,
symmetries::Array{Permutation},
anaSpec::AnalysisSpecification,
stdBasis::StandardBasis=missing,
kernelPolytope::Union{HPolytope{Float64,Array{Float64,1}},VPolytope{Float64,Array{Float64,1}},Missing}=missing,
bipartiteWeylBasis::Union{Vector{Array{Complex{Float64},2}},Missing}=missing,
dictionaries::Union{Any,Missing}=missing,
mubSet::Union{Vector{Vector{Vector{ComplexF64}}},Missing}=missing,
boundedCoordEWs::Union{Array{BoundedCoordEW},Missing}=missing,
precision=10,
relUncertainity=0.0
)
Return an AnalysedCoordState
for a coordState
in d
dimensions based on the given anaSpec
and corresponding analysis objects and symmetry analysis.
If an entanglement check should not be carried out or if an analysis object in not passed as variable, the corresponding property in anaSpec
needs to be false
. In this case, return the corresponding property of the AnalysedCoordState
as missing
.
BellDiagonalQudits.uniform_bell_sampler
— Functionuniform_bell_sampler(n, d, object=:magicSimplex, precision=10)
Create array of n
uniformly distributed $d^2$ Bell diagonal states represented as CoordState
rounded to precision
digits.
Use object=:enclosurePolytope
to create CoordStates in the enclosure polytope, having all $coords \leq 1/d$.
Internal
BellDiagonalQudits.BoundedEW
— TypeRepresents an entanglement witness $W$ with extrema and extremizers to detect entangled Bell diagonal states.
- coords: Coordinates in Bell basis.
- upperBound: Upper bound of $tr W \rho$ satisfied by all separable states $\rho$. Violation detects entanglement.
- lowerBound: Lower bound of $tr W \rho$ satisfied by all separable states $\rho$. Violation detects entanglement.
- maximizingDensityMatrix: Density matrix of separable state $\rho$ in computational basis, maximizing $tr W \rho$.
- minimizingDensityMatrix: Density matrix of separable state $\rho$ in computational basis. minimizing $tr W \rho$.
- checkedIterations: Number of iterations used in the optimization of bounds.
BellDiagonalQudits.EntanglementWitness
— TypeRepresents an operator to detect Bell diagonal entangled states.
- coords: Coordinates in Bell basis
- operatorMatrix: Hermitian matrix representing the linear operator in computational basis.
BellDiagonalQudits.calculate_mub_correlation
— Functioncalculate_mub_correlation(d, mubSet::Vector{Vector{Vector{ComplexF64}}}, ρ, s=-1)
Based on complete set of mutually unbiased bases mubSet
, return sum of mutual predictibilities, shifted by s
, for density matrix ρ
in d
dimensions.
BellDiagonalQudits.classify_entanglement
— Methodclassify_entanglement(analysedCoordState)
Return entanglement class of analysedCoordState
.
Entanglement class can be "UNKNWON", "PPT_UNKNOWN" for PPT states that can be separable or entangled, "SEP" for separable states, "BOUND" for PPT/bound entangled states or "NPT" for NPT/free entangled states.
BellDiagonalQudits.concurrence_qp_check
— Functionconcurrence_qp_check(coordState::CoordState, d, dictionaries, precision=10)
Return true
if the quasi-pure concurrence (see concurrence.jl
) is positive for a coordState
and given basis dictionaries
in the given precision
.
BellDiagonalQudits.create_basis_state_operators
— Methodcreate_basis_state_operators(d, bellStateOperator, precision)
Use maximally entangled Bell state bellStateOperator
of dimension d
to create Bell basis and return with corresponding flat and Weyl indices.
BellDiagonalQudits.create_bipartite_maxentangled
— Methodcreate_bipartite_maxentangled(d)
Return maximally entangled pure state of a bipartite system of dimension $d^2$.
BellDiagonalQudits.create_comppar_unitary
— Methodcreate_comppar_unitary(λ, d)
Return d
dimensional prameterized unitary matrix from parameter matrix λ
.
BellDiagonalQudits.create_dimelement_sublattices
— Methodcreate_dimelement_sublattices(d)
Return all sublattices with d
elements represented as vector of tuples in the $d^2$ elements discrete phase space induced by Weyl operators.
BellDiagonalQudits.create_halfspheric_witnesses
— Methodcreate_halfspheric_witnesses(standardBasis::StandardBasis, n)
Return array of n
uniformly distributed random EntanglementWitness
on unit sphere represented in Bell basis standardBasis
.
BellDiagonalQudits.create_index_sublattice_state
— Methodcreate_index_sublattice_state(standardBasis::StandardBasis, subLattice)
Return collection of standardBasis
elements contributing to the state corresponding to the sublattice
, coordinates in Bell basis and density matrix in computational basis.
BellDiagonalQudits.create_kernel_hpolytope
— Methodcreate_kernel_hpolytope(vertexCoordinates)
Return LazySets.HPolytope representation of polytope defined by vertexCoordinates
.
BellDiagonalQudits.create_kernel_vertexstates
— Methodcreate_kernel_vertexstates(d, standardBasis::StandardBasis)
Return array containing collections of corresponding standardBasis
indices, coordinates and density matrices for all d
element sublattices in discrete phase space.
BellDiagonalQudits.create_random_witnesses
— Methodcreate_random_witnesses(standardBasis::StandardBasis, n)
Return array of n
uniformly distributed random EntanglementWitness
represented in Bell basis standardBasis
.
BellDiagonalQudits.create_red_parmatrix_from_parvector
— Methodcreate_red_parmatrix_from_parvector(x, d)
Return parameter matrix for pure state parameterization from parameter vector x
of length $2(d-1)$.
BellDiagonalQudits.create_weyloperator_basis
— Methodcreate_weyloperator_basis(d)
Return vector of length $d^2$, containing the Weyl operator basis for the $(d,d)$ dimensionalmatrix space.
BellDiagonalQudits.direct_optimization
— Functiondirect_optimization(f, negf, method, d, iterations, constrainedOpt=false)
Return total (minimum, minimizer) and (maximum, maximizer) of iterations
optimization runs of function f
and its negative negf
over the set of separale states using Optim.jl optimization mehtod method
.
Optim.jl is used for optimazation based on parameterization.jl
, so f
and negf
are defined for $2(d-1)$ parameters. Supported methods include NelderMead
, LBFGS
and NewtonTrustRegion
.
BellDiagonalQudits.generic_vectorproduct
— Methodgeneric_vectorproduct(A,B)
For any vectors of equal length, return $\sum_i A[i]B[i]$, the sum of all products of elements with the same index.
BellDiagonalQudits.get_bounded_ew
— Functionget_bounded_ew(d, wit::EntanglementWitness, iterations, method=Optim.NelderMead, useConstrainedOpt=false)
Return BoundedEW in d
dimensions based on EntanglementWitness wit
and iterations
optimization runs of lower and upper bound for separable states.
BellDiagonalQudits.get_comppar_unitary_from_parvector
— Methodget_comppar_unitary_from_parvector(x, d)
Return parameterized unitatry matrix U of dimension d
and rank 1 from parameter vector x
with $2(d-1)$ elements.
Using the first basis state of the computational basis with density matrix $e_1$, any pure state $\rho$ can be generated as $\rho = U e_1 U^\dagger$.
BellDiagonalQudits.get_concurrence_qp
— Methodget_concurrence_qp(coords, d, dictionaries)
Return quasi-pure approximation of the concurrence for a Bell diagonal state represented by coordinates coords
with respect to a StandardBasis
and corresponding dictionaries
in d
dimensions.
BellDiagonalQudits.get_direct_functions_for_wit_traceoptimization
— Methodget_direct_functions_for_wit_traceoptimization(wit::EntanglementWitness, d)
Return the function and its negative that calculates $tr \rho$ wit.coords
, the trace of the given witness wit
multiplied by a parameterized seperable state $\rho$ in d
dimensions.
BellDiagonalQudits.get_intertwiner
— Methodget_intertwiner(d, k, l)
Return the tensor product $W_{k,l} \otimes \mathbb{1}_d$.
BellDiagonalQudits.get_permutation_from_momentuminversion
— Methodget_permutation_from_momentuminversion(stdBasis::StandardBasis, d)
Return Permutations.Permutation
of momentum inversion for $d^2$ dimensional vector of coordinates in Bell basis standardBasis
.
BellDiagonalQudits.get_permutation_from_quarterrotation
— Methodget_permutation_from_quarterrotation(stdBasis::StandardBasis, d)
Return Permutations.Permutation
of qurater rotation for $d^2$ dimensional vector of coordinates in Bell basis standardBasis
.
BellDiagonalQudits.get_permutation_from_translation
— Methodget_permutation_from_translation(translation::Tuple{Int,Int}, stdBasis::StandardBasis, d)
Return Permutations.Permutation
of translation for $d^2$ dimensional vector of coordinates in Bell basis standardBasis
.
BellDiagonalQudits.get_permutation_from_verticalshear
— Methodget_permutation_from_verticalshear(stdBasis::StandardBasis, d)
Return Permutations.Permutation
of vertical shear for
d^2
dimensional vector of coordinates in Bell basis
standardBasis`.
BellDiagonalQudits.get_properdivisors
— Methodget_properdivisors(k:Int)
Return vector of proper divisors of k
.
BellDiagonalQudits.get_witness_extrema
— Functionget_witness_extrema(d, wit::EntanglementWitness, iterations, method, useConstrainedOpt=false)
Return optimization (see optimization.jl) results for lower and upper bound of d
dimensional EntanglementWitness wit
using iterations
runs and Optim.jl optimization method method
.
BellDiagonalQudits.isppt
— MethodisPPTP(ρ, d, precision)
Return true
if the partial transposition of the Hermitian matrix based on the upper triangular of ρ
is positive semi-definite in precision
.
BellDiagonalQudits.ispsd
— Methodispsd(M, precision)
Return true
if the smallest eingenvalue of matrix M
rounded to precision precision
is not negative.
BellDiagonalQudits.kernel_check
— Methodkernel_check(coordState::CoordState, kernelPolytope::Union{HPolytope{Float64,Array{Float64,1}},VPolytope{Float64,Array{Float64,1}}})
Return true
if the Euclidean coordinates of the coordState
are contained in the
kernelPolytope` represented in V- or H-representation.
BellDiagonalQudits.map_indices_to_normcoords
— Methodmap_indices_to_normcoords(indices, D)
Return D
element normalized coordinate vector with equal nonzero values at given indices
.
BellDiagonalQudits.mub_check
— Methodmub_check(coordState::CoordState, d, stdBasis::StandardBasis, mubSet::Vector{Vector{Vector{ComplexF64}}})
Return true
if the sum of mutual predictibilities for a mubSet
(see mub.jl
) of dimension d
exceeds $2$ for a coordState
and given standardBasis
.
BellDiagonalQudits.numeric_ew_check
— Functionnumeric_ew_check(coordState::CoordState, boundedEWs::Array{BoundedCoordEW}, relUncertainity::Float64)
Return true
if any entanglement witness of boundedEWs
detects the density matrix ρ
as entangled.
An entanglement witness $E$ of boundedEWs
detects ρ
, if the scalar product $\rho$.coords
$\cdot E$.coords
is not in [lowerBound
, upperBound
]. If a relUncertainity
is given, the violation relative to upperBound-lowerBound
needs to exceed relUncertainity
` to detect entanglement.
BellDiagonalQudits.ppt_check
— Functionppt_check(coordState::CoordState, standardBasis::StandardBasis, precision=10)
Return true
if the
coordStatedefined via the
standardBasishas positive partial transposition in the given
precision`.
BellDiagonalQudits.realignment_check
— Functionrealignment_check(coordState::CoordState, standardBasis::StandardBasis, precision=10)
Return true
if the realigned
coordStatedefined via the
standardBasishas trace norm
> 1
in the given
precision`.
BellDiagonalQudits.rounddigits
— Methodrounddigits(A, precision)
Return A
with all elemets rounded up to precision
digits.
BellDiagonalQudits.spinrep_check
— Functionspinrep_check(coordState::CoordState, stdBasis::StandardBasis, bipartiteWeylBasis::Vector{Array{Complex{Float64},2}}, precision=10)
Return true
and detects a coordState
for a standardBasis
as separbale, if its coefficiencts in the bipartiteWeylBasis
have 1-norm smaller than $2$ in given precision
.
BellDiagonalQudits.weyloperator
— Methodweyloperator(d, k, l)
Return the $(d,d)$- dimensional matrix representation of Weyl operator $W_{k,l}$.
BellDiagonalQudits.weyltrf
— Methodweyltrf(d, ρ, k, l)
Apply the $(k,l)$-th Weyl transformation of dimension d
to the density matrix ρ
. Return $W_{k,l} \rho W_{k,l}^\dagger$.
BellDiagonalQudits.δ
— Methodδ(n,m)
Return 1 if n
==m
BellDiagonalQudits.δ_mod
— Methodδ_mod(n,m,x)
Return 1 if n
and m
are congruent modulo x
.