Skip to content

Commit

Permalink
Merge pull request #103 from ytdHuang/fix/docstrings
Browse files Browse the repository at this point in the history
Fix typo in docstrings
  • Loading branch information
albertomercurio authored May 18, 2024
2 parents ba88ab1 + 48979fb commit a4e2711
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit a4e2711

Please sign in to comment.