Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in docstrings #103

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/eigsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ end

@doc raw"""
function eigsolve(A::QuantumObject; v0::Union{Nothing,AbstractVector}=nothing,
sigma::Union{Nothing, Real}=nothing, k::Int = min(4, size(A, 1)),
krylovdim::Int = min(10, size(A, 1)), tol::Real = 1e-8, maxiter::Int = 200,
sigma::Union{Nothing, Real}=nothing, k::Int = 1,
krylovdim::Int = max(20, 2*k+1), tol::Real = 1e-8, maxiter::Int = 200,
solver::Union{Nothing, LinearSolve.SciMLLinearSolveAlgorithm} = nothing, kwargs...)

Solve for the eigenvalues and eigenvectors of a matrix `A` using the Arnoldi method.
Expand Down
4 changes: 2 additions & 2 deletions src/general_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ end
tracedist(ρ::QuantumObject, σ::QuantumObject)

Calculates the [trace distance](https://en.wikipedia.org/wiki/Trace_distance) between two [`QuantumObject`](@ref):
``T(\rho, \sigma) = frac{1}{2} \lVert \rho - \sigma \rVert_1``
``T(\rho, \sigma) = \frac{1}{2} \lVert \rho - \sigma \rVert_1``

Note that `A` and `B` must be either [`Ket`](@ref) or [`Operator`](@ref).
Note that `ρ` and `σ` must be either [`Ket`](@ref) or [`Operator`](@ref).
"""
tracedist(ρ::QuantumObject{<:AbstractArray{T1},ObjType1}, σ::QuantumObject{<:AbstractArray{T2},ObjType2}) where {T1,T2,ObjType1<:Union{KetQuantumObject,OperatorQuantumObject},ObjType2<:Union{KetQuantumObject,OperatorQuantumObject}} = norm(ket2dm(ρ) - ket2dm(σ), 1) / 2

Expand Down
2 changes: 1 addition & 1 deletion src/negativity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export negativity, partial_transpose

Compute the [negativity](https://en.wikipedia.org/wiki/Negativity_(quantum_mechanics)) ``N(\rho) = \frac{\Vert \rho^{\Gamma}\Vert_1 - 1}{2}``
where ``\rho^{\Gamma}`` is the partial transpose of ``\rho`` with respect to the subsystem,
and ``\Vert X \Vert_1=\Tr\sqrt{X^\dagger X}`` is the trace norm.
and ``\Vert X \Vert_1=\textrm{Tr}\sqrt{X^\dagger X}`` is the trace norm.

# Arguments
- `ρ::QuantumObject`: The density matrix (`ρ.type` must be [`OperatorQuantumObject`](@ref)).
Expand Down
Loading