Skip to content

Commit

Permalink
Fix typos in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucLD committed May 24, 2024
1 parent fad8c2f commit 8bda301
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 52 deletions.
15 changes: 5 additions & 10 deletions ChainOhmT/gauss.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
using LinearAlgebra

""" GAUSS Gauss quadrature rule.
"""
gauss(N,ab)
Given a weight function w encoded by the nx2 array ab of the
first n recurrence coefficients for the associated orthogonal
polynomials, the first column of ab containing the n alpha-
coefficients and the second column the n beta-coefficients,
the call xw = GAUSS(n,ab) generates the nodes and weights xw of
the n-point Gauss quadrature rule for the weight function w.
The nodes, in increasing order, are stored in the first
column, the n corresponding weights in the second column, of
the nx2 array xw.
Gauss quadrature rule for `N` sites on an interval `ab`. Given a weight function w encoded by the `N`x2 array `ab` of the first `N` recurrence coefficients for the associated orthogonal
polynomials, the first column of `ab` containing the `N` alpha-coefficients and the second column the `N` beta-coefficients, the call xw = gauss(N,ab) generates the nodes and weights xw of the `N`-point Gauss quadrature rule for the weight function w.
The nodes, in increasing order, are stored in the first column, the n corresponding weights in the second column, of the `N`x2 array xw.
"""
function gauss(N,ab)
N0 = size(ab,1)
Expand Down
16 changes: 4 additions & 12 deletions ChainOhmT/lanczos.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
""" LANCZOS Lanczos algorithm.
"""
lanczos(N,xw)
Given the discrete inner product whose nodes are contained
in the first column, and whose weights are contained in the
second column, of the nx2 array xw, the call ab=LANCZOS(n,xw)
generates the first n recurrence coefficients ab of the
corresponding discrete orthogonal polynomials. The n alpha-
coefficients are stored in the first column, the n beta-
coefficients in the second column, of the nx2 array ab.
Given the discrete inner product whose nodes are contained in the first column, and whose weights are contained in the second column, of the `N`x2 array `xw`, the call ab=lanczos(N,xw) generates the first `N` recurrence coefficients ab of the corresponding discrete orthogonal polynomials. The `N` alpha-coefficients are stored in the first column, the `N` beta-coefficients in the second column, of the `N`x2 array ab.
The script is adapted from the routine RKPW in
W.B. Gragg and W.J. Harrod, ``The numerically stable
reconstruction of Jacobi matrices from spectral data'',
Numer. Math. 44 (1984), 317-335.
The script is adapted from the routine RKPW in W.B. Gragg and W.J. Harrod, ``The numerically stable reconstruction of Jacobi matrices from spectral data'', Numer. Math. 44 (1984), 317-335.
"""
function lanczos(N,xw) #return ab
Ncap = size(xw,1)
Expand Down
11 changes: 3 additions & 8 deletions ChainOhmT/stieltjes.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
""" STIELTJES Discretized Stieltjes procedure.
"""
stieltjes(N,xw)
Given the discrete inner product whose nodes are contained
in the first column, and whose weights are contained in the
second column, of the nx2 array xw, the call ab=STIELTJES(n,xw)
generates the first n recurrence coefficients ab of the
corresponding discrete orthogonal polynomials. The n alpha-
coefficients are stored in the first column, the n beta-
coefficients in the second column, of the nx2 array ab.
Discretized Stieltjes procedure. Given the discrete inner product whose nodes are contained in the first column, and whose weights are contained in the second column, of the `N`x2 array `xw`, the call ab=stieltjes(N,xw) generates the first `N` recurrence coefficients ab of the corresponding discrete orthogonal polynomials. The `N` alpha- coefficients are stored in the first column, the `N` beta-coefficients in the second column, of the `N`x2 array ab.
"""
function stieltjes(N,xw) #return ab
#tiny = 10*realmin
Expand Down
2 changes: 1 addition & 1 deletion src/fundamentals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ end
"""
dynamap(ps1,ps2,ps3,ps4)
Calulate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.
Calculate complete dynamical map to time step at which ps1, ps2, ps3 and ps4 are specified.
"""
function dynamap(ps1,ps2,ps3,ps4)
Expand Down
34 changes: 15 additions & 19 deletions src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ The spin is on site ``N_l + 1`` of the MPS, surrounded by the left chain modes a
This Hamiltonain is unitarily equivalent (before the truncation to `N` sites) to the spin-boson Hamiltonian defined by
``
H = \\frac{ω_0}{2}σ_z + Δσ_x + σ_x\\int_0^∞ dω\\sqrt{\\frac{J(ω)}{π}}(b_ω^\\dagger+b_ω) + \\int_0^∞ dω ωb_ω^\\dagger b_ωi + σ_x\\int_0^∞ dω\\sqrt{\\frac{J^l(ω)}{π}}(d_ω^\\dagger+d_ω) + \\int_0^∞ dω ωd_ω^\\dagger d_ω
H = \\frac{ω_0}{2}σ_z + Δσ_x + σ_x\\int_0^∞ dω\\sqrt{J(ω)}(b_ω^\\dagger+b_ω) + \\int_0^∞ dω ωb_ω^\\dagger b_ωi + σ_x\\int_0^∞ dω\\sqrt{J^l(ω)}(d_ω^\\dagger+d_ω) + \\int_0^∞ dω ωd_ω^\\dagger d_ω
``.
The chain parameters, supplied by `chainparams`=``[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]``, can be chosen to represent any arbitrary spectral density ``J(ω)`` at any temperature. The two chains can have a different spectral density.
Expand Down Expand Up @@ -582,7 +582,7 @@ The spin is on site 1 of the MPS and the bath modes are to the right.
This Hamiltonain is unitarily equivalent (before the truncation to `N` sites) to the spin-boson Hamiltonian defined by
``
H = \\frac{ω_0}{2}σ_z + σ_z\\int_0^∞ dω\\sqrt{\\frac{J(ω)}{π}}(b_ω^\\dagger+b_ω) + \\int_0^∞ dω ωb_ω^\\dagger b_ω
H = \\frac{ω_0}{2}σ_z + σ_z\\int_0^∞ dω\\sqrt{J(ω)}(b_ω^\\dagger+b_ω) + \\int_0^∞ dω ωb_ω^\\dagger b_ω
``.
The chain parameters, supplied by `chainparams`=``[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]``, can be chosen to represent any arbitrary spectral density ``J(ω)`` at any temperature.
Expand Down Expand Up @@ -708,12 +708,12 @@ end
"""
puredephasingmpo(ΔE, dchain, Nchain, chainparams; tree=false)
Generate MPO for a pure dephasing model, defined by the Hamiltonian
``H = \\frac{ΔE}{2} σ_z + \\frac{σ_z}{2} c_0 (b_0^\\dagger + b_0) + \\sum_{i=0}^{N-1} t_i (b_{i+1}^\\dagger b_i +h.c.) + \\sum_{i=0}^{N-1} ϵ_i b_i^\\dagger b_i ``
Generate MPO for a pure dephasing model, defined by the Hamiltonian
``H = \\frac{ΔE}{2} σ_z + \\frac{σ_z}{2} c_0 (b_0^\\dagger + b_0) + \\sum_{i=0}^{N-1} t_i (b_{i+1}^\\dagger b_i +h.c.) + \\sum_{i=0}^{N-1} ϵ_i b_i^\\dagger b_i ``
The spin is on site 1 of the MPS and the bath modes are to the right.
The spin is on site 1 of the MPS and the bath modes are to the right.
### Arguments
### Arguments
* `ΔE::Real`: energy splitting of the spin
* `dchain::Int`: physical dimension of the chain sites truncated Hilbert spaces
* `Nchain::Int`: number of sites in the chain
Expand All @@ -737,22 +737,18 @@ end
"""
tightbinding_mpo(N, ϵd, chainparams1, chainparams2)
Generate MPO for a tight-binding chain of N fermionic sites with a single impurity site (fermionic as well)
of energy ϵd at the center. The impurity is coupled to two leads, each described by a set of chain parameters.
The interactions are nearest-neighbour, with the first N/2-1 sites corresponding to the first lead,
the Nth site corresponding to the impurity, and the rest of the sites corresponding to the second
lead.
Generate MPO for a tight-binding chain of N fermionic sites with a single impurity site (fermionic as well)
of energy ϵd at the center. The impurity is coupled to two leads, each described by a set of chain parameters.
The interactions are nearest-neighbour, with the first N/2-1 sites corresponding to the first lead, the Nth site corresponding to the impurity, and the rest of the sites corresponding to the second lead.
# Arguments
# Arguments
* `N::Int`: number of sites in the chain
* `ϵd::Real`: energy of the impurity site at the center, as Ed - μ, where μ is the chemical potential
* chainparams1::Array{Real,1}: chain parameters for the first lead
* chainparams2::Array{Real,1}: chain parameters for the second lead
The chain parameters are given in the standard form: `chainparams` ``=[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]``.
The chain parameters are given in the standard form: `chainparams` ``=[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]``.
"""
function tightbinding_mpo(N, ϵd, chainparams1, chainparams2)

Expand Down Expand Up @@ -996,7 +992,7 @@ end
Generate a MPO for a one-dimensional bosonic bath spatially correlated to a multi-component system
``
H_B + H_int = \\int_{-∞}^{+∞} dk ω_k b_k^\\dagger b_k + ∑_j \\int_{-∞}^{+∞}dk \\sqrt{J(k)}(A_j b_k e^{i k R_j} + h.c.)
H_B + H_{int} = \\int_{-∞}^{+∞} dk ω_k b_k^\\dagger b_k + ∑_j \\int_{-∞}^{+∞}dk \\sqrt{J(k)}(A_j b_k e^{i k R_j} + h.c.)
``.
The interactions between the system and the chain-mapped bath are long range, i.e. each site interacts with all the chain modes. The spectral density is assumed to be Ohmic ``J(ω) = 2αωc(ω/ωc)^s``.
Expand Down Expand Up @@ -1341,10 +1337,10 @@ end
Generate a MPO for a system described in space with a reaction coordinate (RC) tensor. The RC tensor is coupled to a bosonic bath, taking into account the induced reorganization energy.
``
H_S + H_RC + H_int^{S-RC} = \\omega^0_{e} |e\\rangle \\langle e| + \\omega^0_{k} |k\\rangle \\langle k| + \\Delta (|e\\rangle \\langle k| + |k\\rangle \\langle e|) + \\omega_{RC} (d^{\\dagger}d + \\frac{1}{2}) + g_{e} |e\\rangle \\langle e|( d + d^{\\dagger})+ g_{k} |k \\rangle \\langle k|( d + d^{\\dagger})
H_S + H_{RC} + H_{int}^{S-RC} = \\omega^0_{e} |e\\rangle \\langle e| + \\omega^0_{k} |k\\rangle \\langle k| + \\Delta (|e\\rangle \\langle k| + |k\\rangle \\langle e|) + \\omega_{RC} (d^{\\dagger}d + \\frac{1}{2}) + g_{e} |e\\rangle \\langle e|( d + d^{\\dagger})+ g_{k} |k \\rangle \\langle k|( d + d^{\\dagger})
``
``
H_B + H_int^{RC-B} = \\int_{-∞}^{+∞} dk ω_k b_k^\\dagger b_k - (d + d^{\\dagger})\\int_0^∞ dω\\sqrt{J(ω)}(b_ω^\\dagger+b_ω) + \\lambda_{reorg}(d + d^{\\dagger})^2
H_B + H_{int}^{RC-B} = \\int_{-∞}^{+∞} dk ω_k b_k^\\dagger b_k - (d + d^{\\dagger})\\int_0^∞ dω\\sqrt{J(ω)}(b_ω^\\dagger+b_ω) + \\lambda_{reorg}(d + d^{\\dagger})^2
``.
``
\\lambda_{reorg} = \\int \\frac{J(\\omega)}{\\omega}d\\omega
Expand Down Expand Up @@ -1392,4 +1388,4 @@ function protontransfermpo(ω0e,ω0k,x0e,x0k, Δ, dRC, d, N, chainparams, RCpara
chain = hbathchain(N, d, chainparams; coupletox=true)

return Any[M,MRC,chain...]
end
end
4 changes: 2 additions & 2 deletions src/mpsBasics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ apply1siteoperator!(A, O, site::Int) = apply1siteoperator!(A, O, [site])
"""
applympo!(A, H)
Apply an MPO H on the MPS A. H must have the same number of site than A. The resulting MPS A is the MPS modified by the mpo H.
Apply an MPO H on the MPS A. H must have the same number of site than A. The resulting MPS A is the MPS modified by the MPO H.
"""
function applympo!(A, H)
Expand Down Expand Up @@ -729,7 +729,7 @@ end
"""
displacedchainmps(A::Vector{Any}, N::Int, Nm::Int, γ::Any)
Given a mps A, return a mps B where the `Nm`-long chain is displaced by `γ` without displacing the `N`-long system.
Given a MPS A, return a MPS B where the `Nm`-long chain is displaced by `γ` without displacing the `N`-long system.
"""
function displacedchainmps(A::Vector{Any}, N::Int, Nm::Int, γ::Any)

Expand Down

0 comments on commit 8bda301

Please sign in to comment.