Skip to content

Commit

Permalink
Merge pull request #83 from ytdHuang/compat/QT
Browse files Browse the repository at this point in the history
Compat with `QuantumToolbox v0.13`
  • Loading branch information
ytdHuang authored Sep 8, 2024
2 parents 322f8f0 + bdf9f90 commit aef03cf
Show file tree
Hide file tree
Showing 21 changed files with 172 additions and 165 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/Runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
matrix:
# for core tests (latest and oldest supported versions)
julia-version:
- '1.9' # oldest
- '1' # latest
- '1.10' # oldest
# - '1' # latest
os:
- ubuntu-latest
- windows-latest
Expand All @@ -50,14 +50,14 @@ jobs:

include:
# for core tests on macOS
- julia-version: '1.9' # oldest
os: 'macOS-latest'
arch: 'arm64'
group: 'Core'
- julia-version: '1' # latest
- julia-version: '1.10' # oldest
os: 'macOS-latest'
arch: 'arm64'
group: 'Core'
# - julia-version: '1' # latest
# os: 'macOS-latest'
# arch: 'arm64'
# group: 'Core'

# for core tests (intermediate versions)
#- julia-version: '1.x'
Expand Down
18 changes: 12 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name = "HierarchicalEOM"
uuid = "a62dbcb7-80f5-4d31-9a88-8b19fd92b128"
authors = ["Yi-Te Huang <[email protected]>"]
version = "2.0.0"
version = "2.0.1"

[deps]
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
FastExpm = "7868e603-8603-432e-a1a1-694bd70b01f2"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
QuantumToolbox = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"

[weakdeps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -30,15 +33,18 @@ FastExpm = "1.1"
JLD2 = "0.4.31 - 0.4"
LinearAlgebra = "<0.0.1, 1"
LinearSolve = "2.4.2 - 2"
OrdinaryDiffEq = "6.53.4 - 6"
OrdinaryDiffEqCore = "1"
OrdinaryDiffEqLowOrderRK = "1"
Pkg = "<0.0.1, 1"
ProgressMeter = "1.7"
QuantumToolbox = "0.12"
QuantumToolbox = "0.13"
Reexport = "1"
SciMLOperators = "0.3.5"
SciMLBase = "2"
SciMLOperators = "0.3"
SparseArrays = "<0.0.1, 1"
StaticArraysCore = "1"
Test = "<0.0.1, 1"
julia = "1.9"
julia = "1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@
![](./docs/src/assets/heom_ecosystem.jpeg)

## Installation

> **_NOTE:_** `QuantumToolbox.jl` requires `Julia 1.10+`.
To install `HierarchicalEOM.jl`, run the following commands inside Julia's interactive session (also known as REPL):
```julia
using Pkg
Pkg.add("HierarchicalEOM")
```
Alternatively, this can also be done in Julia's [Pkg REPL](https://julialang.github.io/Pkg.jl/v1/getting-started/) by pressing the key `]` in the REPL to use the package mode, and then type the following command:
```julia-REPL
(1.9) pkg> add HierarchicalEOM
(1.10) pkg> add HierarchicalEOM
```
More information about `Julia`'s package manager can be found at [`Pkg.jl`](https://julialang.github.io/Pkg.jl/v1/).
`HierarchicalEOM.jl` now requires Julia 1.9 or higher. Installing it on an older version of Julia will result in many errors.

To load the package and check the version information, use the command:
```julia
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Literate = "2"
OrdinaryDiffEq = "6"
Pardiso = "0.5"
Plots = "1"
QuantumToolbox = "0"
QuantumToolbox = "0.13"
94 changes: 41 additions & 53 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,101 +19,89 @@ const MathEngine = MathJax3(
"tags" => "ams",
"packages" => ["base", "ams", "autoload", "physics"],
),
)
),
)

# clean and rebuild the output markdown directory for examples
doc_output_path = abspath(joinpath(@__DIR__, "src", "examples"))
if isdir(doc_output_path)
rm(doc_output_path, recursive=true)
rm(doc_output_path, recursive = true)
end
mkdir(doc_output_path)

# Generate page: Quick Start
QS_source_file = abspath(joinpath(@__DIR__, "..", "examples", "quick_start.jl"))
QS_source_file = abspath(joinpath(@__DIR__, "..", "examples", "quick_start.jl"))
Literate.markdown(QS_source_file, doc_output_path)

# Generate example pages
EXAMPLES = [
"cavityQED",
"dynamical_decoupling",
"SIAM",
"electronic_current"
]
EX_source_files = [abspath(joinpath(@__DIR__, "..", "examples", "$(ex_name).jl")) for ex_name in EXAMPLES]
EXAMPLES = ["cavityQED", "dynamical_decoupling", "SIAM", "electronic_current"]
EX_source_files = [abspath(joinpath(@__DIR__, "..", "examples", "$(ex_name).jl")) for ex_name in EXAMPLES]
EX_output_files = ["examples/$(ex_name).md" for ex_name in EXAMPLES]
for file in EX_source_files
Literate.markdown(file, doc_output_path)
end

# Generate benchmark pages
BENCHMARKS = [
"benchmark_ODE_solvers",
"benchmark_LS_solvers"
]
BM_source_files = [abspath(joinpath(@__DIR__, "..", "examples", "$(bm_name).jl")) for bm_name in BENCHMARKS]
BENCHMARKS = ["benchmark_ODE_solvers", "benchmark_LS_solvers"]
BM_source_files = [abspath(joinpath(@__DIR__, "..", "examples", "$(bm_name).jl")) for bm_name in BENCHMARKS]
BM_output_files = ["examples/$(bm_name).md" for bm_name in BENCHMARKS]
for file in BM_source_files
Literate.markdown(file, doc_output_path)
end

const PAGES = Any[
"Home" => Any[
"Introduction" => "index.md",
"Installation" => "install.md",
"Quick Start" => "examples/quick_start.md",
"Cite HierarchicalEOM.jl" => "cite.md"
"Home"=>Any[
"Introduction"=>"index.md",
"Installation"=>"install.md",
"Quick Start"=>"examples/quick_start.md",
"Cite HierarchicalEOM.jl"=>"cite.md",
],
"Manual" => Any[
"Bosonic Bath" => Any[
"Introduction" => "bath_boson/bosonic_bath_intro.md",
"Drude-Lorentz Spectral Density" => "bath_boson/Boson_Drude_Lorentz.md"
],
"Bosonic Bath (RWA)" => Any[
"Introduction" => "bath_boson_RWA/bosonic_bath_RWA_intro.md"
"Manual"=>Any[
"Bosonic Bath"=>Any[
"Introduction"=>"bath_boson/bosonic_bath_intro.md",
"Drude-Lorentz Spectral Density"=>"bath_boson/Boson_Drude_Lorentz.md",
],
"Fermionic Bath" => Any[
"Introduction" => "bath_fermion/fermionic_bath_intro.md",
"Lorentz Spectral Density" => "bath_fermion/Fermion_Lorentz.md"
"Bosonic Bath (RWA)"=>Any["Introduction"=>"bath_boson_RWA/bosonic_bath_RWA_intro.md"],
"Fermionic Bath"=>Any[
"Introduction"=>"bath_fermion/fermionic_bath_intro.md",
"Lorentz Spectral Density"=>"bath_fermion/Fermion_Lorentz.md",
],
"Auxiliary Density Operators" => "ADOs.md",
"HEOMLS Matrices" => Any[
"Introduction" => "heom_matrix/HEOMLS_intro.md",
"HEOMLS for Schrödinger Equation" => "heom_matrix/schrodinger_eq.md",
"HEOMLS for Bosonic Bath" => "heom_matrix/M_Boson.md",
"HEOMLS for Fermionic Bath" => "heom_matrix/M_Fermion.md",
"HEOMLS for Bosonic and Fermionic Bath" => "heom_matrix/M_Boson_Fermion.md",
"HEOMLS for Master Equation" => "heom_matrix/master_eq.md",
"Auxiliary Density Operators"=>"ADOs.md",
"HEOMLS Matrices"=>Any[
"Introduction"=>"heom_matrix/HEOMLS_intro.md",
"HEOMLS for Schrödinger Equation"=>"heom_matrix/schrodinger_eq.md",
"HEOMLS for Bosonic Bath"=>"heom_matrix/M_Boson.md",
"HEOMLS for Fermionic Bath"=>"heom_matrix/M_Fermion.md",
"HEOMLS for Bosonic and Fermionic Bath"=>"heom_matrix/M_Boson_Fermion.md",
"HEOMLS for Master Equation"=>"heom_matrix/master_eq.md",
],
"Parity Support" => "Parity.md",
"Hierarchy Dictionary" => "hierarchy_dictionary.md",
"Time Evolution" => "time_evolution.md",
"Stationary State" => "stationary_state.md",
"Spectrum" => "spectrum.md",
"Examples" => EX_output_files,
"Benchmark Solvers" => BM_output_files,
"Extensions" => Any[
"CUDA.jl" => "extensions/CUDA.md"
]
"Parity Support"=>"Parity.md",
"Hierarchy Dictionary"=>"hierarchy_dictionary.md",
"Time Evolution"=>"time_evolution.md",
"Stationary State"=>"stationary_state.md",
"Spectrum"=>"spectrum.md",
"Examples"=>EX_output_files,
"Benchmark Solvers"=>BM_output_files,
"Extensions"=>Any["CUDA.jl"=>"extensions/CUDA.md"],
],
"Library API" => "libraryAPI.md"
"Library API"=>"libraryAPI.md",
]

makedocs(;
modules = [HierarchicalEOM],
authors = "Yi-Te Huang",
repo = Remotes.GitHub("qutip", "HierarchicalEOM.jl"),
sitename = "Documentation | HierarchicalEOM.jl",
pages = PAGES,
pages = PAGES,
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
canonical = "https://qutip.github.io/HierarchicalEOM.jl",
edit_link = "main",
mathengine = MathEngine,
ansicolor = true,
ansicolor = true,
size_threshold_ignore = ["libraryAPI.md"],
),
draft = DRAFT
draft = DRAFT,
)

deploydocs(; repo="github.com/qutip/HierarchicalEOM.jl", devbranch = "main")
deploydocs(; repo = "github.com/qutip/HierarchicalEOM.jl", devbranch = "main")
6 changes: 3 additions & 3 deletions docs/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Pkg.add("HierarchicalEOM")
```
Alternatively, this can also be done in Julia's [Pkg REPL](https://julialang.github.io/Pkg.jl/v1/getting-started/) by pressing the key `]` in the REPL to use the package mode, and then type the following command:
```julia-REPL
(1.9) pkg> add HierarchicalEOM
(1.10) pkg> add HierarchicalEOM
```
More information about `Julia`'s package manager can be found at [`Pkg.jl`](https://julialang.github.io/Pkg.jl/v1/).
!!! note "Julia 1.9"
`HierarchicalEOM.jl` requires Julia 1.9 or higher (we dropped Julia 1.8 since ver.1.12.1)
!!! note "Julia 1.10"
`HierarchicalEOM.jl` requires Julia 1.10 or higher (we dropped Julia 1.9 since ver.2.0.1)

To load the package and check the version information, use the command:
```julia
Expand Down
2 changes: 1 addition & 1 deletion docs/src/libraryAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ODD
HEOMSuperOp
HEOMSuperOp(op, opParity::AbstractParity, refHEOMLS::AbstractHEOMLSMatrix, mul_basis::AbstractString="L")
HEOMSuperOp(op, opParity::AbstractParity, refADOs::ADOs, mul_basis::AbstractString="L")
HEOMSuperOp(op, opParity::AbstractParity, dims::Vector{Int}, N::Int, mul_basis::AbstractString)
HEOMSuperOp(op, opParity::AbstractParity, dims::SVector, N::Int, mul_basis::AbstractString)
M_S
M_S(Hsys::QuantumObject, parity::AbstractParity=EVEN; verbose::Bool=true)
M_Boson
Expand Down
4 changes: 2 additions & 2 deletions src/ADOs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end
"""
struct ADOs
data::SparseVector{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
N::Int
parity::AbstractParity
end
Expand All @@ -42,7 +42,7 @@ function ADOs(V::AbstractVector, N::Int, parity::AbstractParity = EVEN)
d = size(V, 1)
dim = (d / N)
if isinteger(dim)
return ADOs(sparsevec(V), [Int(dim)], N, parity)
return ADOs(sparsevec(V), SVector{1,Int}(Int(dim)), N, parity)
else
error("The dimension of vector is not consistent with the ADOs number \"N\".")
end
Expand Down
18 changes: 9 additions & 9 deletions src/Bath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ end
struct BosonBath <: AbstractBath
bath::Vector{AbstractBosonBath}
op::QuantumObject
dims::Vector{Int}
dims::SVector
Nterm::Int
δ::Number
end
Expand Down Expand Up @@ -364,7 +364,7 @@ A bosonic bath for the real part of bath correlation function ``C^{u=\textrm{R}}
"""
struct bosonReal <: AbstractBosonBath
Comm::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
Nterm::Int
Expand Down Expand Up @@ -406,7 +406,7 @@ A bosonic bath for the imaginary part of bath correlation function ``C^{u=\textr
struct bosonImag <: AbstractBosonBath
Comm::SparseMatrixCSC{ComplexF64,Int64}
anComm::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
Nterm::Int
Expand Down Expand Up @@ -451,7 +451,7 @@ A bosonic bath which the real part and imaginary part of the bath correlation fu
struct bosonRealImag <: AbstractBosonBath
Comm::SparseMatrixCSC{ComplexF64,Int64}
anComm::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η_real::AbstractVector
η_imag::AbstractVector
γ::AbstractVector
Expand Down Expand Up @@ -545,7 +545,7 @@ struct bosonAbsorb <: AbstractBosonBath
spre::SparseMatrixCSC{ComplexF64,Int64}
spost::SparseMatrixCSC{ComplexF64,Int64}
CommD::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
η_emit::AbstractVector
Expand Down Expand Up @@ -606,7 +606,7 @@ struct bosonEmit <: AbstractBosonBath
spre::SparseMatrixCSC{ComplexF64,Int64}
spost::SparseMatrixCSC{ComplexF64,Int64}
CommD::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
η_absorb::AbstractVector
Expand Down Expand Up @@ -675,7 +675,7 @@ end
struct FermionBath <: AbstractBath
bath::Vector{AbstractFermionBath}
op::QuantumObject
dims::Vector{Int}
dims::SVector
Nterm::Int
δ::Number
end
Expand Down Expand Up @@ -740,7 +740,7 @@ struct fermionAbsorb <: AbstractFermionBath
spost::SparseMatrixCSC{ComplexF64,Int64}
spreD::SparseMatrixCSC{ComplexF64,Int64}
spostD::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
η_emit::AbstractVector
Expand Down Expand Up @@ -804,7 +804,7 @@ struct fermionEmit <: AbstractFermionBath
spost::SparseMatrixCSC{ComplexF64,Int64}
spreD::SparseMatrixCSC{ComplexF64,Int64}
spostD::SparseMatrixCSC{ComplexF64,Int64}
dims::Vector{Int}
dims::SVector
η::AbstractVector
γ::AbstractVector
η_absorb::AbstractVector
Expand Down
Loading

0 comments on commit aef03cf

Please sign in to comment.