Skip to content

Commit aee73e6

Browse files
authored
fix latex in docstrings (#323)
1 parent 3bb97e6 commit aee73e6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/correlations.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ExponentialSeries(; tol = 1e-14, calc_steadystate = false) = ExponentialSeries(t
2323
c_ops::Union{Nothing,AbstractVector,Tuple}=nothing;
2424
kwargs...)
2525
26-
Returns the two-times correlation function of three operators ``\hat{A}``, ``\hat{B}`` and ``\hat{C}``: ``\expval{\hat{A}(t) \hat{B}(t + \tau) \hat{C}(t)}``
26+
Returns the two-times correlation function of three operators ``\hat{A}``, ``\hat{B}`` and ``\hat{C}``: ``\left\langle \hat{A}(t) \hat{B}(t + \tau) \hat{C}(t) \right\rangle``
2727
2828
for a given initial state ``\ket{\psi_0}``.
2929
"""
@@ -69,9 +69,9 @@ end
6969
kwargs...)
7070
7171
Returns the two-times correlation function of two operators ``\hat{A}`` and ``\hat{B}``
72-
at different times: ``\expval{\hat{A}(t + \tau) \hat{B}(t)}``.
72+
at different times: ``\left\langle \hat{A}(t + \tau) \hat{B}(t) \right\rangle``.
7373
74-
When `reverse=true`, the correlation function is calculated as ``\expval{\hat{A}(t) \hat{B}(t + \tau)}``.
74+
When `reverse=true`, the correlation function is calculated as ``\left\langle \hat{A}(t) \hat{B}(t + \tau) \right\rangle``.
7575
"""
7676
function correlation_2op_2t(
7777
H::QuantumObject{<:AbstractArray{T1},HOpType},
@@ -111,9 +111,9 @@ end
111111
reverse::Bool=false,
112112
kwargs...)
113113
114-
Returns the one-time correlation function of two operators ``\hat{A}`` and ``\hat{B}`` at different times ``\expval{\hat{A}(\tau) \hat{B}(0)}``.
114+
Returns the one-time correlation function of two operators ``\hat{A}`` and ``\hat{B}`` at different times ``\left\langle \hat{A}(\tau) \hat{B}(0) \right\rangle``.
115115
116-
When `reverse=true`, the correlation function is calculated as ``\expval{\hat{A}(0) \hat{B}(\tau)}``.
116+
When `reverse=true`, the correlation function is calculated as ``\left\langle \hat{A}(0) \hat{B}(\tau) \right\rangle``.
117117
"""
118118
function correlation_2op_1t(
119119
H::QuantumObject{<:AbstractArray{T1},HOpType},
@@ -149,7 +149,7 @@ end
149149
Returns the emission spectrum
150150
151151
```math
152-
S(\omega) = \int_{-\infty}^\infty \expval{\hat{A}(\tau) \hat{B}(0)} e^{-i \omega \tau} d \tau
152+
S(\omega) = \int_{-\infty}^\infty \left\langle \hat{A}(\tau) \hat{B}(0)} e^{-i \omega \tau \right\rangle d \tau
153153
```
154154
"""
155155
function spectrum(

src/metrics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export entropy_vn, entanglement, tracedist, fidelity
88
entropy_vn(ρ::QuantumObject; base::Int=0, tol::Real=1e-15)
99
1010
Calculates the [Von Neumann entropy](https://en.wikipedia.org/wiki/Von_Neumann_entropy)
11-
``S = - \Tr \left[ \hat{\rho} \log \left( \hat{\rho} \right) \right]`` where ``\hat{\rho}``
11+
``S = - \textrm{Tr} \left[ \hat{\rho} \log \left( \hat{\rho} \right) \right]`` where ``\hat{\rho}``
1212
is the density matrix of the system.
1313
1414
The `base` parameter specifies the base of the logarithm to use, and when using the default value 0,

src/qobj/functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export vec2mat, mat2vec
1010
@doc raw"""
1111
ket2dm(ψ::QuantumObject)
1212
13-
Transform the ket state ``\ket{\psi}`` into a pure density matrix ``\hat{\rho} = \dyad{\psi}``.
13+
Transform the ket state ``\ket{\psi}`` into a pure density matrix ``\hat{\rho} = |\psi\rangle\langle\psi|``.
1414
"""
1515
ket2dm::QuantumObject{<:AbstractArray{T},KetQuantumObject}) where {T} = ψ * ψ'
1616

src/qobj/operators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ sigmay() = rmul!(jmat(0.5, Val(:y)), 2)
408408
@doc raw"""
409409
sigmaz()
410410
411-
Pauli operator ``\hat{\sigma}_z = \comm{\hat{\sigma}_+}{\hat{\sigma}_-}``.
411+
Pauli operator ``\hat{\sigma}_z = \left[ \hat{\sigma}_+ , \hat{\sigma}_- \right]``.
412412
413413
See also [`jmat`](@ref).
414414
"""
@@ -487,7 +487,7 @@ end
487487
@doc raw"""
488488
projection(N::Int, i::Int, j::Int)
489489
490-
Generates the projection operator ``\hat{O} = \dyad{i}{j}`` with Hilbert space dimension `N`.
490+
Generates the projection operator ``\hat{O} = |i \rangle\langle j|`` with Hilbert space dimension `N`.
491491
"""
492492
projection(N::Int, i::Int, j::Int) = QuantumObject(sparse([i + 1], [j + 1], [1.0 + 0.0im], N, N), type = Operator)
493493

0 commit comments

Comments
 (0)