Skip to content

Commit

Permalink
Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendesignolle committed Jan 14, 2025
1 parent 8b23bb9 commit 3adc18b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export pauli
gellmann([T=ComplexF64,], d::Integer = 3)
Constructs the set `G` of generalized Gell-Mann matrices in dimension `d` such that
`G[1] = I` and `Tr(G[i]*G[j]) = 2 δ_ij`.
`G = I` and `Tr(GᵢGⱼ) = 2 δᵢⱼ`.
Reference: [Generalizations of Pauli matrices](https://en.wikipedia.org/wiki/Generalizations_of_Pauli_matrices)
"""
Expand Down
13 changes: 6 additions & 7 deletions src/entanglement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ end
Upper bound on the random robustness of `ρ` such that it has a Schmidt number `s`.
If a state ``ρ`` with local dimensions ``d_A`` and ``d_B`` has Schmidt number ``s``, then there is
a PSD matrix ``ω`` in the extended space ``AA′B′B``, where ``A`` and ``B^′`` have dimension ``s``,
such that ``ω / s`` is separable against ``AA′|B′B`` and ``Π† ω Π = ρ``, where ``Π = 1_A ⊗ s ψ^+ ⊗ 1_B``,
a PSD matrix ``ω`` in the extended space ``AA'B'B``, where ``A'`` and ``B'`` have dimension ``s``,
such that ``ω / s`` is separable against ``AA'|B'B`` and ``Π^† ω Π = ρ``, where ``Π = 1_A ⊗ s ψ^+ ⊗ 1_B``,
and ``ψ^+`` is a non-normalized maximally entangled state. Separabiity is tested with the DPS hierarchy,
with `n` controlling the how many copies of the ``BB`` subsystem are used.
with `n` controlling the how many copies of the ``B'B`` subsystem are used.
References:
Hulpke, Bruss, Lewenstein, Sanpera [arXiv:quant-ph/0401118](https://arxiv.org/abs/quant-ph/0401118)\
Weilenmann, Dive, Trillo, Aguilar, Navascués [arXiv:1912.10056](https://arxiv.org/abs/1912.10056)
- Hulpke, Bruss, Lewenstein, Sanpera [arXiv:quant-ph/0401118](https://arxiv.org/abs/quant-ph/0401118)
- Weilenmann, Dive, Trillo, Aguilar, Navascués [arXiv:1912.10056](https://arxiv.org/abs/1912.10056)
"""
function schmidt_number(
ρ::AbstractMatrix{T},
Expand Down Expand Up @@ -240,8 +240,7 @@ export random_robustness
Constrains state `ρ` of dimensions `dims` in JuMP model `model` to respect the DPS constraints of level `n`.
References:
Doherty, Parrilo, Spedalieri [arXiv:quant-ph/0308032](https://arxiv.org/abs/quant-ph/0308032)
Reference: Doherty, Parrilo, Spedalieri, [arXiv:quant-ph/0308032](https://arxiv.org/abs/quant-ph/0308032)
"""
function _dps_constraints!(
model::JuMP.GenericModel{T},
Expand Down
2 changes: 1 addition & 1 deletion src/multilinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ end
permute_systems(X::AbstractMatrix, perm::Vector, dims::Matrix)
Permutes the order of the subsystems of the matrix `X`, which is composed by subsystems of dimensions `dims`, according to the permutation `perm`.
`dims` should be a n x 2 matrix where `dims[i, 1]` is the number of rows of subsystem i, and `dims[i,2]` is its number of columns.
`dims` should be a n x 2 matrix where `dims[i, 1]` is the number of rows of subsystem i, and `dims[i, 2]` is its number of columns.
"""
function permute_systems(X::AbstractMatrix, perm::AbstractVector{<:Integer}, dims::Matrix{<:Integer})
perm == 1:length(perm) && return X
Expand Down
6 changes: 3 additions & 3 deletions src/nonlocal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ export tensor_probability
"""
tensor_correlation(p::AbstractArray{T, N2}, behaviour::Bool = false; marg::Bool = true)
Converts a 2x...x2xmx...xm probability array into
- a mx...xm correlation array (no marginals)
- a (m+1)x...x(m+1) correlation array (marginals).
Converts a 2 x ... x 2 x m x ... x m probability array into
- an m x ... x m correlation array (no marginals)
- an (m+1) x ... x (m+1) correlation array (marginals).
If `behaviour` is `true` do the transformation for behaviours. Doesn't assume normalization.
Also accepts the arguments of `tensor_probability` (state and measurements) for convenience.
Expand Down
4 changes: 2 additions & 2 deletions src/states.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export state_bell
"""
state_phiplus_ket([T=ComplexF64,] d::Integer = 2)
Produces the ket of the maximally entangled state Φ⁺ of local dimension `d`.
Produces the ket of the maximally entangled state ϕ⁺ of local dimension `d`.
"""
function state_phiplus_ket(::Type{T}, d::Integer = 2; kwargs...) where {T<:Number}
return state_ghz_ket(T, d, 2; kwargs...)
Expand All @@ -82,7 +82,7 @@ export state_phiplus_ket
"""
state_phiplus([T=ComplexF64,] d::Integer = 2; v::Real = 1)
Produces the maximally entangled state Φ⁺ of local dimension `d` with visibility `v`.
Produces the maximally entangled state ϕ⁺ of local dimension `d` with visibility `v`.
"""
function state_phiplus(::Type{T}, d::Integer = 2; v::Real = 1) where {T<:Number}
rho = ketbra(state_phiplus_ket(T, d; coeff = one(T)))
Expand Down

0 comments on commit 3adc18b

Please sign in to comment.