Library
BellDiagonalQudits.AnalysedCoordStateBellDiagonalQudits.AnalysisSpecificationBellDiagonalQudits.BoundedCoordEWBellDiagonalQudits.BoundedEWBellDiagonalQudits.ClassConflictExceptionBellDiagonalQudits.CoordStateBellDiagonalQudits.DensityStateBellDiagonalQudits.EntanglementWitnessBellDiagonalQudits.StandardBasisBellDiagonalQudits.ADGJ_routineBellDiagonalQudits.BBPSSW_routineBellDiagonalQudits.DEJMPS_routineBellDiagonalQudits.FIMAX_routineBellDiagonalQudits.FT_OPBellDiagonalQudits.GXOR_OP_ADDBellDiagonalQudits.GXOR_OP_SUBBellDiagonalQudits.P1_P2_routineBellDiagonalQudits.P1_routineBellDiagonalQudits.P2_routineBellDiagonalQudits.XIMAX_routineBellDiagonalQudits.add_errorkeysBellDiagonalQudits.altbell_creatingoperatorBellDiagonalQudits.analyse_coordstateBellDiagonalQudits.belldiagonal_projectionBellDiagonalQudits.calculate_mub_correlationBellDiagonalQudits.canonic_eigenbasis_weylprimeBellDiagonalQudits.classify_analyzed_states!BellDiagonalQudits.classify_entanglementBellDiagonalQudits.coherent_informationBellDiagonalQudits.concurrence_qp_checkBellDiagonalQudits.concurrence_qp_gendiagonal_checkBellDiagonalQudits.createProjectorOperatorBellDiagonalQudits.create_alt_indexbasisBellDiagonalQudits.create_altbellstateBellDiagonalQudits.create_basis_state_operatorsBellDiagonalQudits.create_bipartite_maxentangledBellDiagonalQudits.create_bipartite_weyloperator_basisBellDiagonalQudits.create_canonic_encondingBellDiagonalQudits.create_comppar_unitaryBellDiagonalQudits.create_densitystateBellDiagonalQudits.create_dictionary_from_basisBellDiagonalQudits.create_dimelement_sublatticesBellDiagonalQudits.create_halfspheric_witnessesBellDiagonalQudits.create_index_sublattice_stateBellDiagonalQudits.create_kernel_hpolytopeBellDiagonalQudits.create_kernel_polytopeBellDiagonalQudits.create_kernel_vertexstatesBellDiagonalQudits.create_random_bounded_ewsBellDiagonalQudits.create_random_coordstatesBellDiagonalQudits.create_random_witnessesBellDiagonalQudits.create_red_parmatrix_from_parvectorBellDiagonalQudits.create_standard_indexbasisBellDiagonalQudits.create_standard_mubBellDiagonalQudits.create_weyloperator_basisBellDiagonalQudits.dephasing_channelBellDiagonalQudits.depolarize_coordsBellDiagonalQudits.direct_optimizationBellDiagonalQudits.efficiencyBellDiagonalQudits.extend_vpolytope_by_densitystatesBellDiagonalQudits.gFIMAX_routineBellDiagonalQudits.general_bipartite_stab_routineBellDiagonalQudits.generate_symmetriesBellDiagonalQudits.generic_vectorproductBellDiagonalQudits.get_abelian_subgroup_generatorsBellDiagonalQudits.get_bipartite_stabkrausops_from_encodingBellDiagonalQudits.get_bounded_coordewBellDiagonalQudits.get_bounded_ewBellDiagonalQudits.get_codespace_errorops_for_measBellDiagonalQudits.get_comppar_unitary_from_parvectorBellDiagonalQudits.get_concurrence_qpBellDiagonalQudits.get_concurrence_qp_gendiagonalBellDiagonalQudits.get_coset_partitionBellDiagonalQudits.get_cosets_prob_sBellDiagonalQudits.get_direct_functions_for_wit_traceoptimizationBellDiagonalQudits.get_erroraction_from_encodingBellDiagonalQudits.get_erroroperator_from_errorelementBellDiagonalQudits.get_intertwinerBellDiagonalQudits.get_max_fidelity_stabilizer_cosetBellDiagonalQudits.get_maxfidelityBellDiagonalQudits.get_maxfidelity_tupleBellDiagonalQudits.get_permutation_from_momentuminversionBellDiagonalQudits.get_permutation_from_quarterrotationBellDiagonalQudits.get_permutation_from_translationBellDiagonalQudits.get_permutation_from_verticalshearBellDiagonalQudits.get_prob_for_EBellDiagonalQudits.get_prob_for_errorkeysBellDiagonalQudits.get_properdivisorsBellDiagonalQudits.get_s_dict_for_generatorsBellDiagonalQudits.get_s_errorkeysBellDiagonalQudits.get_s_for_generatorBellDiagonalQudits.get_s_normalized_coset_probsBellDiagonalQudits.get_s_prob_dictBellDiagonalQudits.get_stdbasis_probabilitiesBellDiagonalQudits.get_symcoordsBellDiagonalQudits.get_witness_extremaBellDiagonalQudits.hypothesis_testing_mutual_informationBellDiagonalQudits.hypothesis_testing_relative_entropyBellDiagonalQudits.ispptBellDiagonalQudits.ispsdBellDiagonalQudits.iterative_ADGJ_protocolBellDiagonalQudits.iterative_BBPSSW_protocolBellDiagonalQudits.iterative_DEJMPS_protocolBellDiagonalQudits.iterative_FIMAX_protocolBellDiagonalQudits.iterative_P1_P2_protocolBellDiagonalQudits.iterative_XIMAX_protocolBellDiagonalQudits.iterative_gFIMAX_protocolBellDiagonalQudits.iterative_specific_stabilizer_protocolBellDiagonalQudits.kernel_checkBellDiagonalQudits.local_dephasing_channelBellDiagonalQudits.map_indices_to_normcoordsBellDiagonalQudits.max_mutual_informationBellDiagonalQudits.max_relative_entropy_sdpBellDiagonalQudits.max_relative_entropy_sdp_dualBellDiagonalQudits.modbraBellDiagonalQudits.modketBellDiagonalQudits.mub_checkBellDiagonalQudits.mutual_informationBellDiagonalQudits.numeric_ew_checkBellDiagonalQudits.pauliweyl_channelBellDiagonalQudits.ppt_checkBellDiagonalQudits.purify_density_matrixBellDiagonalQudits.realignment_checkBellDiagonalQudits.root_fidelity_sdp_dualBellDiagonalQudits.root_fidelity_sdp_primalBellDiagonalQudits.rounddigitsBellDiagonalQudits.smooth_conditional_max_entropyBellDiagonalQudits.smooth_conditional_min_entropy_dualBellDiagonalQudits.smooth_conditional_min_entropy_primalBellDiagonalQudits.smooth_max_mutual_information_approximationBellDiagonalQudits.smooth_max_mutual_information_routine_1_dualBellDiagonalQudits.smooth_max_mutual_information_routine_1_primalBellDiagonalQudits.smooth_max_mutual_information_routine_2BellDiagonalQudits.smooth_max_relative_entropy_dualBellDiagonalQudits.smooth_max_relative_entropy_primalBellDiagonalQudits.smooth_private_informationBellDiagonalQudits.spinrep_checkBellDiagonalQudits.stabilizer_routineBellDiagonalQudits.sym_analyse_coordstateBellDiagonalQudits.uniform_bell_samplerBellDiagonalQudits.weyloperatorBellDiagonalQudits.weyltrfBellDiagonalQudits.weyltwirl_channel_adjBellDiagonalQudits.weyltwirl_channel_conjBellDiagonalQudits.weyltwirl_channel_transBellDiagonalQudits.δBellDiagonalQudits.δ_mod
Public
BellDiagonalQudits.AnalysedCoordState — TypeRepresenting an entanglement analyzed Bell diagonal state.
- coordState: The analyzed
CoordState - kernel:
trueif kernel check successful, elsefalse.missingif entanglement check not applied. - spinrep:
trueif spinrep check successful, elsefalse.missingif entanglement check not applied. - ppt:
trueif ppt check successful, elsefalse.missingif entanglement check not applied. - realign:
trueif realignment check successful, elsefalse.missingif entanglement check not applied. - concurrence:
trueif concurrence check successful, elsefalse.missingif entanglement check not applied. - mub:
trueif mub check successful, elsefalse.missingif entanglement check not applied. - numericEW:
trueif numericEW check successful, elsefalse.missingif 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
AnalysedCoordStatefor 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.ADGJ_routine — MethodADGJ_routine(ρ, n, d, stdbasis)Applies one iteration of ADGJ routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.BBPSSW_routine — MethodBBPSSW_routine(ρ, n, d, stdbasis)Applies one iteration of BBPSSW routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.DEJMPS_routine — MethodDEJMPS_routine(ρ, n, d, stdbasis)Applies one iteration of DEJMPS routine to the n-copy input state 'rho in d=2 dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.FIMAX_routine — MethodFIMAX_routine(ρ, n, d, stdbasis)Applies one iteration of FIMAX routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.P1_P2_routine — MethodP1_P2_routine(ρ, n, d, stdbasis)Applies one iteration of P1_P2 routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.XIMAX_routine — FunctionXIMAX_routine(ρ, n, d, optFunction, precision=10)Identify the stabilizer generator and syndrome that maximize a custom objective provided by optFunction for the state ρ.
Arguments
ρ: Input density matrix of dimension (d^2 ,d^2).n: Number of copies of the input state (fixed to 2).d: Dimension of the single-particle Hilbert space (2 or 3).optFunction: A functionf(ρ, n, d)that returns a scalar value to be maximized.precision: Rounding precision for the probability check.
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.coherent_information — Methodcoherent_information(ρ_AB, dims, subTrOut::Int)Calculate the coherent information in bits.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple or vector of subsystem dimensions.subTrOut: The index of the subsystem to trace out (1 for subsystem A, 2 for B).
Returns
- The coherent information value in bits (log base 2).
BellDiagonalQudits.concurrence_qp_gendiagonal_check — Functionconcurrence_qp_gendiagonal_check(coordState, d, basisStates, precision=10)Return true if the quasi-pure concurrence (see concurrence.jl) is positive for a coordState and given basis states basisStates in the given precision.
BellDiagonalQudits.create_alt_indexbasis — Methodcreate_alt_indexbasis(d, l, α, precision)Return alternative indexed Bell basis for d dimensions as StandardBasis rounded to precision digits. Elements of secondary index l are replaced by alternative Bell state defined by d-element vector of phases α.
BellDiagonalQudits.create_altbellstate — Functioncreate_altbellstate(state(d,k,l,α, returnDensity)Return an alternative Bell state in the computational basis. Return denisty matrix unless returnDensity=false, in which case return state vector.
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 DensityStatecontaining the density matrix in computational basis based oncoordStatecoordinates in BellstandardBasis`.
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.efficiency — Methodefficiency(distillable, iterations, successProbs, n)Returns efficiency of n-copy distillation protocol with iterations iterations of success probabilities successProbs.
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.gFIMAX_routine — MethodgFIMAX_routine(ρ, n, d, stdbasis)Identify the stabilizer generator and syndrome that maximize the output fidelity for state ρ.
Arguments
ρ: Input density matrix (dimension (d^2,d^2).n: Number of copies (fixed to 2).d: Dimension of the single-particle Hilbert space (2 or 3).stdbasis: AStandardBasisobject used for fidelity calculations.
Returns a NamedTuple containing the corrected optimal state, the maximum fidelity, the variables used (generator, syndromes, and Weyl indices), and the outcome probability.
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)::BoundedCoordEWMap 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.hypothesis_testing_mutual_information — Methodhypothesis_testing_mutual_information(ρ, dims, ε)Calculate the hypothesis testing mutual information.
Arguments
ρ: Bipartite density matrix $\rho_{AB}$.dims: A tuple or vector(d_A, d_B)specifying the dimensions of systems A and B.ε: The smoothing/error parameter (Type-I error tolerance), $0 \le \varepsilon < 1$.
Returns
- The hypothesis testing mutual information in bits (log base 2).
BellDiagonalQudits.iterative_ADGJ_protocol — Functioniterative_ADGJ_protocol(ρ, targetFid, n, d, stdBasis, maxIts)Applies iterations of the ADGJ routine to the n-copy input state ρ in d dimensions. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
BellDiagonalQudits.iterative_BBPSSW_protocol — Functioniterative_BBPSSW_protocol(ρ, targetFid, n, d, stdBasis, maxIts)Applies iterations of the BBPSSW routine to the n-copy input state ρ in d dimensions. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
BellDiagonalQudits.iterative_DEJMPS_protocol — Functioniterative_DEJMPS_protocol(ρ, targetFid, n, d, stdBasis, maxIts)Applies iterations of the DEJMPS routine to the n-copy input state ρ in d=2 dimensions. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
BellDiagonalQudits.iterative_FIMAX_protocol — Functioniterative_FIMAX_protocol(ρ, targetFid, n, d, stdBasis, maxIts)Applies iterations of the FIMAX routine to the n-copy input state ρ in d dimensions. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
BellDiagonalQudits.iterative_P1_P2_protocol — Functioniterative_P1_P2_protocol(ρ, targetFid, n, d, stdBasis, maxIts)Applies iterations of the P1_P2 routine to the n-copy input state ρ in d dimensions. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
BellDiagonalQudits.iterative_XIMAX_protocol — Functioniterative_XIMAX_protocol(ρ, optFunction, optTarget, n, d, maxIts=100, returnAdditionalObjects=false)Repeatedly apply the XIMAX_routine to state ρ using a custom optFunction until optTarget is reached.
Arguments
ρ: Initial density matrix.optFunction: Functionf(ρ, n, d)used to calculate the optimization metric.optTarget: The target value of the metric to stop the iteration.n: Number of copies used (fixed at 2).d: Dimension of the single-particle Hilbert space.maxIts: Maximum number of iterations.returnAdditionalObjects: Iftrue, returns state and variable history.
Returns a tuple with the success boolean distillable and the iteration history.
BellDiagonalQudits.iterative_gFIMAX_protocol — Functioniterative_gFIMAX_protocol(ρ, optTarget, n, d, stdbasis, maxIts=100, returnAdditionalObjects=false)Repeatedly apply the gFIMAX_routine to state ρ to reach a target fidelity optTarget.
Arguments
ρ: Initial bipartite density matrix of dimension (d^2,d^2).optTarget: The target fidelity value to stop the iteration.n: Number of copies used in each step (fixed at 2).d: Dimension of the single-particle Hilbert space.stdbasis: TheStandardBasisobject for fidelity calculations.maxIts: Maximum number of iterations allowed.returnAdditionalObjects: Iftrue, returns the history of states and variables.
Returns a tuple starting with a boolean distillable, followed by iteration history and results.
BellDiagonalQudits.max_mutual_information — Methodmax_mutual_information(ρ_AB, dims)Calculate the Max-Mutual Information.
Arguments
ρ_AB: The bipartite density matrix.dims: Tuple or Vector(d_A, d_B)containing the dimensions of the subsystems.
Returns the mutual information in bits.
BellDiagonalQudits.mutual_information — Methodmutual_information(ρ_AB, dims)Calculate the Von Neumann mutual information in bits.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple or vector of subsystem dimensions(d_A, d_B).
Returns
- The mutual information value in bits (log base 2).
BellDiagonalQudits.smooth_conditional_max_entropy — Functionsmooth_conditional_max_entropy(ρ_AB, dims, ε, returnVariables=false)Calculate the smooth conditional max-entropy via min-entropy duality.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple(d_A, d_B)of subsystem dimensions.ε: Smoothing parameter.returnVariables: Iftrue, returns the variables from the underlying SDP.
BellDiagonalQudits.smooth_max_mutual_information_approximation — Functionsmooth_max_mutual_information_approximation(ρ_AB, dims, ε, maxIts, approxOrder, precision=10, returnVariables=true)Approximate the smooth max-mutual information using the iterative algorithm from Popp et al.
Arguments
ρ_AB: Bipartite density matrix.dims: Subsystem dimensions(d_A, d_B).ε: Smoothing parameter.maxIts: Maximum number of see-saw iterations.approxOrder: Convergence threshold factor.precision: Rounding precision for SDP results.
Returns a tuple containing the final entropy (in bits), convergence status, and history of λ and μ.
BellDiagonalQudits.smooth_private_information — Functionsmooth_private_information(ρ, d, ε, ϵ, maxIts=50, approxOrder=5, precision=10)Calculate the smoothprivateinformation of ρ.
The routine performs the following:
- Purifies ρ to a state ψ_ABE.
- Applies a local dephasing channel to system A, representing a measurement in the computational basis.
- Computes the hypothesis testing mutual information between Alice and Bob (ζ_AB).
- Computes the smooth max-mutual information between Alice and Eve (ζ_AE).
- Returns the difference: IH^ε(A:B) - Imax^ϵ(A:E).
Arguments
ρ: Input density matrix (system A).d: Dimension of subsystem A and B (assumes dA = dB = d).ε: Error parameter for the hypothesis testing mutual information (Bob).ϵ: Smoothing parameter for the max-mutual information (Eve).
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.FT_OP — MethodFT_OP(d)Returns the d-dimensional Fourier gate.
BellDiagonalQudits.GXOR_OP_ADD — MethodGXOR_OP_ADD(d)Returns the d-dimensional generalization of the GXOR gate acting as |i>k|j> => |i>|i+j>.
BellDiagonalQudits.GXOR_OP_SUB — MethodGXOR_OP_SUB(d)Returns the d-dimensional generalization of the GXOR gate acting as |i>k|j> => |i>|i-j>.
BellDiagonalQudits.P1_routine — MethodP1_routine(ρ, n, d, stdbasis)Applies one iteration of P1 routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.P2_routine — MethodP2_routine(ρ, n, d, stdbasis)Applies one iteration of P2 routine to the n-copy input state 'rho in d dimensions. Returns the output state and the probabilies of success with respect to the stdbasis.
BellDiagonalQudits.add_errorkeys — Methodadd_errorkeys(x,y,d,n)Adds two error elements mod d.
BellDiagonalQudits.altbell_creatingoperator — Methodaltbell_creatingoperator(d, k, l, α)Return the $(d,d)$- dimensional matrix representation of an alternative operator that is used to create Bell states $V_{k,l}$. $V_{k,l} ⊗ Id Ω_00$ creates $1/√d * ∑ω^(ks)*α_(s,l) ket{s-l} ⊗ ket{s}$
BellDiagonalQudits.belldiagonal_projection — Functionbelldiagonal_projection(stdbasis, ρ)Projects any density matrix to the set of Bell-diagonal densitystates of corresponding dimension as defined by the stdbasis.
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.canonic_eigenbasis_weylprime — Methodcanonic_eigenbasis_weylprime(d, E)Create array of eigenvectors-eigenvalue tuples for Weyl operator indexed by tuple E in dimension d.
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.createProjectorOperator — MethodcreateProjectorOperator(d)Return concurrence related operator in arbitrary dimension d.
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_canonic_enconding — Methodcreate_canonic_enconding(g, d)Return unitary matrix as encoding for generating stabilizer element g in demensiond.
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.dephasing_channel — Methoddephasing_channel(d)Construct the completely dephasing channel in the computational basis.
This channel removes all off-diagonal elements (coherences) of a density matrix relative to the standard basis. The Kraus operators are the projectors $P_i = |i\rangle\langle i|$ for $i \in \{1, \dots, d\}$.
Arguments
d::Int: The dimension of the Hilbert space.
Returns
KrausOperators: A collection of $d$ rank-1 projection operators.
BellDiagonalQudits.depolarize_coords — Methoddepolarize_coords(coords)Return depolarized elements of a coord probability vector. Leaves the first element invariant. Remaining elements are replaced by their average value.
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.general_bipartite_stab_routine — Functiongeneral_bipartite_stab_routine(ρ_in, gVec, xVec, yVec, U, n, d, precision=10, warn=false)Perform a bipartite stabilization routine on two copies of the state ρ_in.
Arguments
ρ_in: The input density matrix of dimension (d^2, d^2).gVec, xVec, yVec: Vectors defining the stabilizer group and observed syndromes.U: The encoding unitary.n: The number of copies of the input state (assumed n=2).d: The dimension of the single-particle Hilbert space.precision: Number of digits for rounding the probability check.warn: Boolean to toggle warnings for zero-probability outcomes.
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_abelian_subgroup_generators — Methodget_abelian_subgroup_generators(d, n)Return all generators of abelian subgroups for the n-copy weyl-Heisenberg group in d dimensions.
BellDiagonalQudits.get_bipartite_stabkrausops_from_encoding — Methodget_bipartite_stabkrausops_from_encoding(U, d, n, p)Return the bipartite stabilization Kraus operators derived from an encoding unitary U.
Arguments
U: The encoding unitary matrix.d: The dimension of the single-particle Hilbert space.n: The number of copies of the input state.p: The order of the stabilizer group.
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_codespace_errorops_for_meas — Methodget_codespace_errorops_for_meas(U, gVec, aVec, bVec)For given encoding U of a stabilizer with generating elements gVec and measurement outcomes aVec and bVec, return Dict of error elements (keys) and error action operators (values).
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_concurrence_qp_gendiagonal — Methodget_concurrence_qp_gendiagonal(coords, d, basisStates)Return quasi-pure approximation of the concurrence for a d-dimensional Bell diagonal state represented by coordinates coords with respect to a set of basisStates.
BellDiagonalQudits.get_coset_partition — Methodget_coset_partition(gVec, n, d)Return coset partition of error elements defined by stabilizer generating elements gVec of n-copies in d dimensions.
BellDiagonalQudits.get_cosets_prob_s — Methodget_cosets_prob_s(ρ, gVec, n, d, stdbasis)Return vector of tuples containing the cosets defined by stabilizer generating elements gVec for n-copies ind dimensions together with its s-value and probabilies in the stdbasis.
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_erroraction_from_encoding — Methodget_erroraction_from_encoding(U, W, bVec, sVec, d )Create error action operator for an error W in encoding U for measurment outcomes bVec and sVec in dimension d.
BellDiagonalQudits.get_erroroperator_from_errorelement — Methodget_erroroperator_from_errorelement(E, d)Return error operator in computational basis from error element E in dimension d.
BellDiagonalQudits.get_intertwiner — Methodget_intertwiner(d, k, l)Return the tensor product $W_{k,l} \otimes \mathbb{1}_d$.
BellDiagonalQudits.get_max_fidelity_stabilizer_coset — Methodget_max_fidelity_stabilizer_coset(ρ, n, d, stdbasis)Returns stabilizer generator, coset of maximal normalized probability and corresponding s-value, coset probabily and s-value probabily for n-copy input state ρ in d dimensions with respect to stdbasis.
BellDiagonalQudits.get_maxfidelity — Methodget_maxfidelity(ρ_in, stdbasis)Return the maximum fidelity value found for state ρ_in across the given stdbasis.
BellDiagonalQudits.get_maxfidelity_tuple — Methodget_maxfidelity_tuple(ρ, stdbasis)Return a NamedTuple containing the index and fidelity of the basis state most similar to ρ.
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.Permutationof vertical shear ford^2dimensional vector of coordinates in Bell basisstandardBasis`.
BellDiagonalQudits.get_prob_for_E — Methodget_prob_for_E(ρ, E, stdBasis)Return probability of measurment of stdBasis corresponding to error element E in state ρ.
BellDiagonalQudits.get_prob_for_errorkeys — Methodget_prob_for_errorkeys(ρ, errorKeys, n, stdBasis)Get total error probability for n-copy errorKeys defined by stdBasis in rho.
BellDiagonalQudits.get_properdivisors — Methodget_properdivisors(k:Int)Return vector of proper divisors of k.
BellDiagonalQudits.get_s_dict_for_generators — Methodget_s_dict_for_generators(gVec, n, d)Create Dict containing the s-values for each error element (keys) for stabilizer generating elements gVec for n-copies in dimension d.
BellDiagonalQudits.get_s_errorkeys — Methodget_s_errorkeys(gVec, sVec, n, d)Return all errors with sValue for n-cope stabilizer generators gVec in d dimenions.
BellDiagonalQudits.get_s_for_generator — Methodget_s_for_generator(g, E)Return s-value of error element Efor stabilzer generatorgin dimensiond`.
BellDiagonalQudits.get_s_normalized_coset_probs — Methodget_s_normalized_coset_probs(ρ, gVec, n, d, stdbasis)Return array of tuples containing the cosets and s-values defined by generating n-copy stabilizer elements gVec and the coset probabilitiies, normalized coset probabilites and the s-value probabilies for the stdbasis in d dimensions.
BellDiagonalQudits.get_s_prob_dict — Methodget_s_prob_dict(ρ, gVec, n, d, stdbasis)Return Dict of stdbasis probabilities (values) for each s-value (keys) in n-copy state rho of subsystem dimension d.
BellDiagonalQudits.get_stdbasis_probabilities — Functionget_stdbasis_probabilities(ρ, stdBasis, precision)Return probability of measuring a Bell stdBasis state for ρ in precision.
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.hypothesis_testing_relative_entropy — Methodhypothesis_testing_relative_entropy(ρ, σ, ε)Calculate the hypothesis testing relative entropy.
This implementation uses the dual SDP formulation for better numerical stability.
Arguments
ρ: The state corresponding to the null hypothesis.σ: The state corresponding to the alternative hypothesis.ε: The maximum allowed Type-I error (significance level).
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.iterative_specific_stabilizer_protocol — Functioniterative_specific_stabilizer_protocol(ρ, targetFid, gVec, aVec, bVec, U, n, d, stdBasis, maxIts)Applies iterations of the stabilizer routine to the n-copy input state 'rho in d dimensions for stabilizer generating elements gVec, encoding U and measurement outcomes aVec andbVec. Iterates until targetFid or maximal number of iterations maxIts is reached. Returns distillable=true if targetFid could be reached and fidelities and success probabilies with respect to the stdbasis for each iteration.
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 coordStateare contained in thekernelPolytope` represented in V- or H-representation.
BellDiagonalQudits.local_dephasing_channel — Methodlocal_dephasing_channel(dims, system)Construct a quantum channel that applies complete dephasing to a specific subsystem.
For a multipartite system with dimensions dims, this function generates Kraus operators that decohere the subsystem at index system. The resulting Kraus operators are of the form I ⊗ ... ⊗ |i⟩⟨i| ⊗ ... ⊗ I.
Arguments
dims: A collection (tuple or vector) of dimensions for each subsystem.system::Int: The index of the subsystem to be dephased.
Returns
KrausOperators: A set of Kraus operators acting on the full Hilbert space.
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.max_relative_entropy_sdp — Functionmax_relative_entropy_sdp(ρ, σ, returnVariables=false)Calculate the max-relative entropy.
Arguments
ρ,σ: Density matrices of the same dimension.returnVariables: Iftrue, also returns the optimal scaling factorλ.
BellDiagonalQudits.max_relative_entropy_sdp_dual — Functionmax_relative_entropy_sdp_dual(ρ, σ, returnVariables=false)Calculate the max-relative entropy using the dual SDP formulation.
Arguments
ρ,σ: Density matrices of the same dimension.returnVariables: Iftrue, also returns the optimal witness operatorM.
BellDiagonalQudits.modbra — Methodmodbra(k,d)Return the kth bra vector modulo d.
BellDiagonalQudits.modket — Methodmodket(k,d)Return the kth ket vector modulo d.
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.pauliweyl_channel — Functionpauliweyl_channel(d, precision=10)Construct a quantum channel in the Kraus representation using the generalized Bell basis.
The channel is defined by a set of d^2 Kraus operators which are the projectors onto the Bell basis states (Pauli-Weyl operators applied to a maximally entangled state).
Arguments
d::Int: The dimension of the Hilbert space.precision::Int: Numerical precision for the internal operator construction.
Returns
KrausOperators: An object containing the collection of Bell basis projectors.
BellDiagonalQudits.ppt_check — Functionppt_check(coordState::CoordState, standardBasis::StandardBasis, precision=10)Return trueif thecoordStatedefined via thestandardBasishas positive partial transposition in the givenprecision`.
BellDiagonalQudits.purify_density_matrix — Functionpurify_density_matrix(ρ, precision=10)Return the purified state vector Ψ in a doubled Hilbert space such that tr_2(|Ψ⟩⟨Ψ|) = ρ.
BellDiagonalQudits.realignment_check — Functionrealignment_check(coordState::CoordState, standardBasis::StandardBasis, precision=10)Return trueif the realignedcoordStatedefined via thestandardBasishas trace norm> 1in the givenprecision`.
BellDiagonalQudits.root_fidelity_sdp_dual — Functionroot_fidelity_sdp_dual(ρ, σ, returnVariables=false)Calculate the root fidelity √F(ρ, σ) using the dual SDP formulation.
Arguments
ρ,σ: Density matrices of the same dimension.returnVariables: Iftrue, also returns the dual variablesYandZ.
BellDiagonalQudits.root_fidelity_sdp_primal — Functionroot_fidelity_sdp_primal(ρ, σ, returnVariables=false)Calculate the root fidelity √F(ρ, σ) = tr|√ρ√σ| using a primal SDP formulation.
Arguments
ρ,σ: Density matrices of the same dimension.returnVariables: Iftrue, also returns the optimal alignment matrixX.
BellDiagonalQudits.rounddigits — Methodrounddigits(A, precision)Return A with all elemets rounded up to precision digits.
BellDiagonalQudits.smooth_conditional_min_entropy_dual — Functionsmooth_conditional_min_entropy_dual(ρ_AB, dims, ε, returnVariables=false)Calculate the smooth conditional min-entropy using the dual SDP.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple(d_A, d_B)of subsystem dimensions.ε: Smoothing parameter (purified distance).returnVariables: Iftrue, returns the optimal smoothed state and alignment matrix.
BellDiagonalQudits.smooth_conditional_min_entropy_primal — Functionsmooth_conditional_min_entropy_primal(ρ_AB, dims, ε, returnVariables=false)Calculate the smooth conditional min-entropy using the primal SDP.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple(d_A, d_B)of subsystem dimensions.ε: Smoothing parameter.returnVariables: Iftrue, returns the optimal SDP variables(W, v, Z, u).
BellDiagonalQudits.smooth_max_mutual_information_routine_1_dual — Functionsmooth_max_mutual_information_routine_1_dual(ρ_AB, dims, ε, λ, precision=10, returnVariables=true, eps=1e-4, maxIters=100_000)Execute "Routine 1" (Dual) from Popp et al. to verify the feasibility of λ for I_max^ε.
This provides a dual certificate for the optimization. If the minimum objective value is non-negative, then λ is a valid upper bound for 2^I_max^ε.
Arguments
ρ_AB: Bipartite density matrix.dims: Tuple (dA, dB).λ: The candidate value for 2^I_max^ε.
BellDiagonalQudits.smooth_max_mutual_information_routine_1_primal — Functionsmooth_max_mutual_information_routine_1_primal(ρ_AB, dims, ε, λ, precision=10, returnVariables=true, eps=1e-4, maxIters=100_000)Execute "Routine 1" (Primal) from Popp et al. for smooth max-mutual information.
This SDP optimizes the smoothed state ρ' in the ε-ball of ρ_AB to maximize the feasibility parameter μ for a fixed λ.
Arguments
ρ_AB: Bipartite density matrix.dims: Dimensions (dA, dB).ε: Smoothing parameter (purified distance).λ: Fixed scaling factor for the marginal product ρA ⊗ ρ'B.eps: Convergence tolerance for the SCS solver.maxIters: Maximum solver iterations.
Returns (μ, (ρ', X)) where μ > 0 implies λ is an upper bound for 2^I_max^ε.
BellDiagonalQudits.smooth_max_mutual_information_routine_2 — Functionsmooth_max_mutual_information_routine_2(ρ_AB, dims, vrho_AB, precision=10)Update the scaling factor λ for a fixed smoothed state vrho_AB.
This solves the SDP: min λ s.t. vrhoAB ≤ λ(ρA ⊗ vrhoB), where ρA is the marginal of the original state and vrho_B is the marginal of the smoothed state.
Arguments
ρ_AB: The original bipartite density matrix.dims: Tuple (dA, dB).vrho_AB: The smoothed density matrix found in Routine 1.precision: Rounding precision for the returned λ.
BellDiagonalQudits.smooth_max_relative_entropy_dual — Functionsmooth_max_relative_entropy_dual(ρ, σ, ε, returnVariables=false)Calculate the smooth max-relative entropy using the dual SDP.
Arguments
ρ,σ: Density matrices of the same dimension.ε: Smoothing parameter (fidelity-based).returnVariables: Iftrue, returns the optimal smoothed staterho_ABand alignment matrixX.
BellDiagonalQudits.smooth_max_relative_entropy_primal — Functionsmooth_max_relative_entropy_primal(ρ, σ, ε, returnVariables=false)Calculate the smooth max-relative entropy using the primal SDP.
Arguments
ρ,σ: Density matrices of the same dimension.ε: Smoothing parameter (fidelity-based).returnVariables: Iftrue, returns the optimal SDP variables(W, v, Z, u).
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.stabilizer_routine — Methodstabilizer_routine((ρ, gVec, aVec, bVec, Uenc, n, d, stdbasis)Return output state and probability of success for one iteration of the stabilizer distillation routine.
The routine is defined by the input state ρ, the stabilizer generating element gVec, the measurement outcomes aVec and bVec, the encoding operator Uenc, the number of copies n, the dimension of the subsystems d and the standard Bell bases stdbasis.
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.weyltwirl_channel_adj — Functionweyltwirl_channel_adj(d, precision=10)Construct the bipartite Weyl-adjoint twirling channel in Kraus representation.
Generates $d^2$ Kraus operators of the form $K_{k,l} = \frac{1}{d} W_{k,l} \otimes W_{k,l}^\dagger$. This channel averages the input over bipartite Weyl unitaries where the second subsystem undergoes the adjoint transformation, often used for state symmetrization and identifying invariant subspaces.
Arguments
d: Subsystem dimension.precision: Rounding precision for the resulting matrices.
BellDiagonalQudits.weyltwirl_channel_conj — Functionweyltwirl_channel_conj(d, precision=10)Construct the bipartite Weyl-conjugate twirling channel in Kraus representation.
Generates $d^2$ Kraus operators of the form $K_{k,l} = \frac{1}{d} W_{k,l} \otimes \overline{W}_{k,l}$, where $W_{k,l}$ are the generalized Pauli (Weyl) operators. This channel is typically used to symmetrize bipartite states into the isotropic state manifold.
Arguments
d: Subsystem dimension.precision: Rounding precision for the resulting matrices.
BellDiagonalQudits.weyltwirl_channel_trans — Functionweyltwirl_channel_trans(d, precision=10)Construct the bipartite Weyl-transpose twirling channel in Kraus representation.
Generates $d^2$ Kraus operators of the form $K_{k,l} = \frac{1}{d} W_{k,l} \otimes W_{k,l}^T$. While the conjugate twirl ($W \otimes \overline{W}$) targets isotropic states, this transpose twirl targets the space of Werner states, which are invariant under local unitary transformations of the form $U \otimes U$.
Arguments
d: Subsystem dimension.precision: Rounding precision for the resulting matrices.
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.