From 6d0fd919059c40c10710f90634fc6ff08cbebdaf Mon Sep 17 00:00:00 2001 From: Sebastian Kraemer Date: Wed, 19 Apr 2017 17:11:21 +0200 Subject: [PATCH] Fix a few errors in docstrings. * Spelling mistakes. * Mistakes in latex formulas. --- src/bases.jl | 6 +++--- src/fock.jl | 2 +- src/manybody.jl | 9 +++------ src/mcwf.jl | 4 ++-- src/nlevel.jl | 2 +- src/operators.jl | 18 +++++++++--------- src/operators_dense.jl | 1 + src/operators_lazyproduct.jl | 8 ++++---- src/operators_lazysum.jl | 5 +++-- src/operators_lazytensor.jl | 8 ++++---- src/spin.jl | 2 +- src/states.jl | 6 +++--- src/superoperators.jl | 7 ++++--- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/bases.jl b/src/bases.jl index 6c8fb9db..be3178f7 100644 --- a/src/bases.jl +++ b/src/bases.jl @@ -16,7 +16,7 @@ The Basis class is meant to specify a basis of the Hilbert space of the studied system. Besides basis specific information all subclasses must implement a shape variable which indicates the dimension of the used Hilbert space. For a spin-1/2 Hilbert space this would be the -vector `Int[2]`. A system composed of 2 spins would then have a +vector `Int[2]`. A system composed of two spins would then have a shape vector `Int[2 2]`. Composite systems can be defined with help of the [`CompositeBasis`](@ref) @@ -247,8 +247,8 @@ ptrace(a, index::Int) = ptrace(a, Int[index]) Change the ordering of the subsystems of the given object. -For a permutation vector [2,1,3] and a given object with basis [b1, b2, b3] -this function results in [b2, b1, b3]. +For a permutation vector `[2,1,3]` and a given object with basis `[b1, b2, b3]` +this function results in `[b2, b1, b3]`. """ function permutesystems(b::CompositeBasis, perm::Vector{Int}) @assert length(b.bases) == length(perm) diff --git a/src/fock.jl b/src/fock.jl index 33b54c79..f7d31a45 100644 --- a/src/fock.jl +++ b/src/fock.jl @@ -80,7 +80,7 @@ end """ coherentstate(b::FockBasis, alpha) -Coherent state `|α⟩` for the specified Fock space. +Coherent state ``|α⟩`` for the specified Fock space. """ function coherentstate(b::FockBasis, alpha::Number, result=Ket(b, Vector{Complex128}(length(b)))) alpha = complex(alpha) diff --git a/src/manybody.jl b/src/manybody.jl index 7f92df64..1a317d7e 100644 --- a/src/manybody.jl +++ b/src/manybody.jl @@ -214,20 +214,17 @@ moment not implemented. The mathematical formalism for the one-body case is described by ```math -X = \\sum_{ij} a_i^† a_j \\left⟨u_i \right| x \\left| u_j \\right⟩ +X = \\sum_{ij} a_i^† a_j ⟨u_i| x | u_j⟩ ``` and for the interaction case by ```math -X = \\sum_{ijkl} a_i^† a_j^† a_k a_l - \\left⟨ u_i \\right| \\left⟨ u_j \\right| - x - \\left| u_k \\right⟩ \\left| u_l \\right⟩ +X = \\sum_{ijkl} a_i^† a_j^† a_k a_l ⟨u_i|⟨u_j| x |u_k⟩|u_l⟩ ``` where ``X`` is the N-particle operator, ``x`` is the one-body operator and -``\\left| u \\right⟩`` are the one-body states associated to the +``|u⟩`` are the one-body states associated to the different modes of the N-particle basis. """ function manybodyoperator{T<:Operator}(basis::ManyBodyBasis, op::T)::T diff --git a/src/mcwf.jl b/src/mcwf.jl index bd285ae9..298b976f 100644 --- a/src/mcwf.jl +++ b/src/mcwf.jl @@ -166,8 +166,8 @@ Integrate the master equation using the MCWF method. There are two implementations for integrating the non-hermitian schroedinger equation: -* ``mcwf_h``: Usual formulation with Hamiltonian + jump operators separately. -* ``mcwf_nh``: Variant with non-hermitian Hamiltonian. +* [`mcwf_h`](@ref): Usual formulation with Hamiltonian + jump operators separately. +* [`mcwf_nh`](@ref): Variant with non-hermitian Hamiltonian. The ``mcwf`` function takes a normal Hamiltonian, calculates the non-hermitian Hamiltonian and then calls mcwf_nh which is slightly faster. diff --git a/src/nlevel.jl b/src/nlevel.jl index 5257b9b7..ff60d611 100644 --- a/src/nlevel.jl +++ b/src/nlevel.jl @@ -28,7 +28,7 @@ end """ transition(b::NLevelBasis, to::Int, from::Int) -Transition operator ``|to>(br_1,br_2)} B_{br_1,br_2} - \\ - A_{br_1,br_2} &= B_{bl_1,bl_2} S_{(bl_1,bl_2)<->(br_1,br_2)} +A_{bl_1,bl_2} = S_{(bl_1,bl_2) ↔ (br_1,br_2)} B_{br_1,br_2} +\\\\ +A_{br_1,br_2} = B_{bl_1,bl_2} S_{(bl_1,bl_2) ↔ (br_1,br_2)} ``` + """ abstract SuperOperator