Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang committed May 18, 2024
1 parent a7d8300 commit 48979fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/general_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ end
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``
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

0 comments on commit 48979fb

Please sign in to comment.