Skip to content

Commit

Permalink
Drop Julia v1.9 (qutip#218)
Browse files Browse the repository at this point in the history
* drop `Julia v1.9`

* fix benchmark

* fix links for ODE solver in docstrings
  • Loading branch information
ytdHuang authored Sep 8, 2024
1 parent 4d852a1 commit f556c33
Show file tree
Hide file tree
Showing 24 changed files with 185 additions and 299 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/CI.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)
version:
- '1.7' # oldest
- '1' # latest
- '1.10' # oldest
# - '1' # latest
os:
- ubuntu-latest
- windows-latest
Expand All @@ -49,25 +49,21 @@ jobs:
- Core

include:
# for core tests on macOS
- version: '1.7' # oldest (julia v1.7 does not support M-series chip)
os: 'macOS-13' # Intel chip
# for core tests on macOS (M-series chip)
- version: '1.10' # oldest
os: 'macOS-latest'
arch: 'x64'
group: 'Core'
- version: '1' # latest
os: 'macOS-latest' # M-series chip
arch: 'arm64'
group: 'Core'
# - version: '1' # latest
# os: 'macOS-latest'
# arch: 'arm64'
# group: 'Core'

# for core tests (intermediate versions)
- version: '1.8'
os: 'ubuntu-latest'
arch: 'x64'
group: 'Core'
- version: '1.9'
os: 'ubuntu-latest'
arch: 'x64'
group: 'Core'
# - version: '1.x'
# os: 'ubuntu-latest'
# arch: 'x64'
# group: 'Core'

# for code quality tests
- version: '1'
Expand Down
14 changes: 11 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ version = "0.13.0"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Expand All @@ -29,22 +33,26 @@ QuantumToolboxCUDAExt = "CUDA"
[compat]
ArrayInterface = "6, 7"
CUDA = "5"
DiffEqBase = "6"
DiffEqCallbacks = "2 - 3.1, 3.8"
FFTW = "1.5"
Graphs = "1.7"
IncompleteLU = "0.2"
LinearAlgebra = "<0.0.1, 1"
LinearMaps = "3"
LinearSolve = "2"
OrdinaryDiffEq = "6"
OrdinaryDiffEqCore = "1"
OrdinaryDiffEqTsit5 = "1"
Pkg = "<0.0.1, 1"
Random = "<0.0.1, 1"
Reexport = "1"
SciMLBase = "2"
SciMLOperators = "0.3"
SparseArrays = "<0.0.1, 1"
SpecialFunctions = "2"
StaticArraysCore = "1"
Test = "<0.0.1, 1"
julia = "1.7"
julia = "1.10"

[extras]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ QuantumToolbox.jl is equipped with a robust set of features:

## Installation

> **_NOTE:_** `QuantumToolbox.jl` requires `Julia 1.7+`.
> **_NOTE:_** `QuantumToolbox.jl` requires `Julia 1.10+`.
To install `QuantumToolbox.jl`, run the following commands inside Julia's interactive session (also known as REPL):
```julia
Expand All @@ -77,7 +77,7 @@ Pkg.add("QuantumToolbox")
```
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.7) pkg> add QuantumToolbox
(1.10) pkg> add QuantumToolbox
```
More information about `Julia`'s package manager can be found at [`Pkg.jl`](https://julialang.github.io/Pkg.jl/v1/).

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
QuantumToolbox = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab"
2 changes: 2 additions & 0 deletions benchmarks/runbenchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using BenchmarkTools
using QuantumToolbox
using OrdinaryDiffEq
using LinearSolve

BLAS.set_num_threads(1)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ QuantumToolbox.jl is equipped with a robust set of features:
## [Installation](@id doc:Installation)

!!! note "Requirements"
`QuantumToolbox.jl` requires `Julia 1.7+`.
`QuantumToolbox.jl` requires `Julia 1.10+`.

To install `QuantumToolbox.jl`, run the following commands inside Julia's interactive session (also known as REPL):
```julia
Expand All @@ -30,7 +30,7 @@ Pkg.add("QuantumToolbox")
```
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.7) pkg> add QuantumToolbox
(1.10) pkg> add QuantumToolbox
```
More information about `Julia`'s package manager can be found at [`Pkg.jl`](https://julialang.github.io/Pkg.jl/v1/).

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/lowrank.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Define the options for the low-rank evolution

```@example lowrank
opt =
LRMesolveOptions(alg = Tsit5(), err_max = 1e-3, p0 = 0.0, atol_inv = 1e-6, adj_condition = "variational", Δt = 0.0);
LRMesolveOptions(err_max = 1e-3, p0 = 0.0, atol_inv = 1e-6, adj_condition = "variational", Δt = 0.0);
@time lrsol = lr_mesolve(H, z, B, tl, c_ops; e_ops = e_ops, f_ops = (f_purity, f_entropy, f_trace), opt = opt);
```
Expand Down
41 changes: 26 additions & 15 deletions src/QuantumToolbox.jl
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
module QuantumToolbox

# Re-export:
# 1. basic functions in LinearAlgebra and SparseArrays
# 2. the solvers in ODE and LinearSolve
# 1. StaticArraysCore.SVector for the type of dims
# 2. basic functions in LinearAlgebra and SparseArrays
import Reexport: @reexport
@reexport import StaticArraysCore: SVector
@reexport using LinearAlgebra
@reexport using SparseArrays
@reexport using OrdinaryDiffEq
@reexport using LinearSolve

# other functions in LinearAlgebra
import LinearAlgebra: BlasReal, BlasInt, BlasFloat, BlasComplex, checksquare
import LinearAlgebra.BLAS: @blasfunc
if VERSION < v"1.10"
import LinearAlgebra: chkstride1
import LinearAlgebra.BLAS: libblastrampoline
import LinearAlgebra.LAPACK: chklapackerror
import Base: require_one_based_indexing
else
import LinearAlgebra.LAPACK: hseqr!
end
import LinearAlgebra.LAPACK: hseqr!

# SciML packages (for OrdinaryDiffEq and LinearSolve)
import SciMLBase:
solve,
solve!,
init,
reinit!,
remake,
u_modified!,
ODEProblem,
EnsembleProblem,
EnsembleThreads,
FullSpecialize,
CallbackSet,
ContinuousCallback,
DiscreteCallback
import SciMLOperators: MatrixOperator
import LinearSolve: LinearSolve, LinearProblem, SciMLLinearSolveAlgorithm, KrylovJL_MINRES, KrylovJL_GMRES
import DiffEqBase: get_tstops
import DiffEqCallbacks: PeriodicCallback, PresetTimeCallback, TerminateSteadyState
import OrdinaryDiffEqCore: OrdinaryDiffEqCore, OrdinaryDiffEqAlgorithm
import OrdinaryDiffEqTsit5: Tsit5

# other dependencies (in alphabetical order)
import ArrayInterface: allowed_getindex, allowed_setindex!
import DiffEqCallbacks: DiscreteCallback, PeriodicCallback, PresetTimeCallback, TerminateSteadyState
import FFTW: fft, fftshift
import Graphs: connected_components, DiGraph
import IncompleteLU: ilu
import LinearMaps: LinearMap
import OrdinaryDiffEq: OrdinaryDiffEqAlgorithm
import Pkg
import Random
import SpecialFunctions: loggamma
@reexport import StaticArraysCore: SVector
import StaticArraysCore: MVector

# Setting the number of threads to 1 allows
Expand Down
Loading

0 comments on commit f556c33

Please sign in to comment.