Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stochastic Schrödinger equation #210

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
4a1dbd5
ssesolve problem
lgravina1997 Aug 28, 2024
42f4a21
Merge remote-tracking branch 'upstream/main' into SSE
lgravina1997 Aug 28, 2024
0515244
fix operator_sum
lgravina1997 Aug 28, 2024
eef4ce9
fixes
lgravina1997 Aug 28, 2024
7b43c7e
improved diffusion and added comments
lgravina1997 Aug 29, 2024
06cd067
ensemble problem
lgravina1997 Aug 29, 2024
3e344ca
Fix instabilities
albertomercurio Aug 29, 2024
90ad6a1
Improve WienerProcesses
albertomercurio Aug 29, 2024
e95ea5d
Fix type instabilities
albertomercurio Aug 30, 2024
34327c0
docs
lgravina1997 Aug 30, 2024
139c017
api
lgravina1997 Aug 31, 2024
5730f8c
update project
lgravina1997 Aug 31, 2024
a15e236
add tests
lgravina1997 Aug 31, 2024
5588ef2
fix TimeEvolutionSSESol
lgravina1997 Sep 1, 2024
c31c665
Fix white space
albertomercurio Sep 27, 2024
81885b4
[Docs] Basic Operations on Quantum Objects (#145)
ytdHuang Aug 31, 2024
fc5bb6b
Add Unitary Fund Badge
albertomercurio Sep 2, 2024
cbae37c
Improve ProgressBar thread safety (#212)
albertomercurio Sep 2, 2024
27263d2
Set Version v0.12.1
albertomercurio Sep 2, 2024
a0f6324
Update buildkite token (#214)
ytdHuang Sep 5, 2024
8039910
Normalize states for `mcsolve` solution (#213)
albertomercurio Sep 5, 2024
57e6e55
Improve c_ops handling (#216)
albertomercurio Sep 7, 2024
1f487d6
Change the type of `dims` for `QuantumObject` to `SVector` for type s…
albertomercurio Sep 8, 2024
70f5962
Drop `Julia v1.9` (#218)
ytdHuang Sep 8, 2024
8bf642c
fix typo for `versioninfo` (#220)
ytdHuang Sep 9, 2024
87495c0
Fix type instabilities for almost all functions (#221)
albertomercurio Sep 9, 2024
de271d5
bump version to `0.13.1`
ytdHuang Sep 10, 2024
6afd966
Add CUDA.allowscalar(false)
albertomercurio Sep 10, 2024
c2381fc
Avoid scalar indexing in runtests and fix buildkite pipeline (#222)
ytdHuang Sep 11, 2024
41a194c
update README
ytdHuang Sep 15, 2024
095eba4
extended methods for `expect` and `variance`
ytdHuang Sep 15, 2024
ae20ad7
add new section to docs
ytdHuang Sep 15, 2024
25140a6
format files
ytdHuang Sep 15, 2024
e895dc1
change section title in docs
ytdHuang Sep 15, 2024
ad6c2b0
extended methods for `tensor` and `kron`
ytdHuang Sep 15, 2024
a54a8f8
add new section to docs
ytdHuang Sep 15, 2024
b283ef5
add `hat` to all docs and make `fcreate` and `fdestroy` compat with `…
ytdHuang Sep 17, 2024
ac0e7c0
Fix `ptrace` (#225)
ytdHuang Sep 17, 2024
d7bc352
Change version to v0.14.0
albertomercurio Sep 17, 2024
30f9167
fix type conversion of `tlist` in time evolution
ytdHuang Sep 19, 2024
4625d35
fix typo
ytdHuang Sep 19, 2024
99dcb09
format files
ytdHuang Sep 19, 2024
18524a6
introduce inner function `_convert_u0`
ytdHuang Sep 19, 2024
78bfcbd
fix element type for `steadystate`
ytdHuang Sep 19, 2024
42543a7
add comments
ytdHuang Sep 19, 2024
c199e46
minor change
ytdHuang Sep 19, 2024
72f3974
re-organize runtests directory (#228)
ytdHuang Sep 19, 2024
108bdf9
handle type of `u0` with `sparse_to_dense`
ytdHuang Sep 19, 2024
e03b9d9
fix typo
ytdHuang Sep 19, 2024
1bae876
fix `rand_unitary` (#230)
ytdHuang Sep 22, 2024
1d0437a
fix CI config (#232)
ytdHuang Sep 22, 2024
08551b7
Add pipeline to run core and code quality tests under `Julia nightly`…
ytdHuang Sep 24, 2024
bc0074b
Introduce `Makefile` to make development more convenient (#234)
ytdHuang Sep 24, 2024
0827792
Automatically convert TimeDependentOperatorSum to liouvillian
albertomercurio Sep 26, 2024
e94dc3a
Change version to v0.14.1
albertomercurio Sep 27, 2024
de1babc
add command `all` to Makefile (#236)
ytdHuang Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .buildkite/CUDA_Ext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
steps:
- label: "CUDA Julia {{matrix.version}}"
matrix:
setup:
version:
- "1.10" # oldest
#- "1" # latest
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.version}}"
- JuliaCI/julia-test#v1:
test_args: "--quickfail"
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- ext
agents:
queue: "juliagpu"
cuda: "*"
env:
GROUP: "CUDA_Ext"
SECRET_CODECOV_TOKEN: "ZfhQu/IcRLqNyZ//ZNs5sjBPaV76IHfU5gui52Qn+Rp8tOurukqgScuyDt+3HQ4R0hJYBw1/Nqg6jmBsvWSc9NEUx8kGsUJFHfN3no0+b+PFxA8oJkWc9EpyIsjht5ZIjlsFWR3f0DpPqMEle/QyWOPcal63CChXR8oAoR+Fz1Bh8GkokLlnC8F9Ugp9xBlu401GCbyZhvLTZnNIgK5yy9q8HBJnBg1cPOhI81J6JvYpEmcIofEzFV/qkfpTUPclu43WNoFX2DZPzbxilf3fsAd5/+nRkRfkNML8KiN4mnmjHxPPbuY8F5zC/PS5ybXtDpfvaMQc01WApXCkZk0ZAQ==;U2FsdGVkX1+eDT7dqCME5+Ox5i8GvWRTQbwiP/VYjapThDbxXFDeSSIC6Opmon+M8go22Bun3bat6Fzie65ang=="
timeout_in_minutes: 60
if: |
// Don't run Buildkite if the commit message includes the text [skip ci], [ci skip], or [no ci]
// Don't run Buildkite for PR draft
// Only run Buildkite when new commits and PR are made to main branch
build.message !~ /\[skip ci\]/ &&
build.message !~ /\[ci skip\]/ &&
build.message !~ /\[no ci\]/ &&
!build.pull_request.draft &&
(build.branch =~ /main/ || build.pull_request.base_branch =~ /main/)
33 changes: 12 additions & 21 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# see: https://github.com/staticfloat/forerunner-buildkite-plugin
steps:
- label: "QuantumToolboxCUDAExt"
- label: ":runner: Dynamically launch pipelines"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-test#v1:
test_args: "--quickfail"
- JuliaCI/julia-coverage#v1:
dirs:
- src
- ext
- staticfloat/forerunner: # CUDA.jl tests
watch:
- ".buildkite/pipeline.yml"
- ".buildkite/CUDA_Ext.yml"
- "src/**"
- "ext/QuantumToolboxCUDAExt.jl"
- "test/runtests.jl"
- "test/ext-test/cuda_ext.jl"
- "Project.toml"
target: ".buildkite/CUDA_Ext.yml"
agents:
queue: "juliagpu"
cuda: "*"
env:
GROUP: "CUDA_Ext"
SECRET_CODECOV_TOKEN: # "encrypted codecov token"
timeout_in_minutes: 60
if: |
// Don't run Buildkite if the commit message includes the text [skip tests]
// Don't run Buildkite for PR draft
// Only run Buildkite when new commits and PR are made to main branch
build.message !~ /\[skip tests\]/ &&
!build.pull_request.draft &&
(build.branch =~ /main/ || build.pull_request.base_branch =~ /main/)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ body:
attributes:
label: Your Environment
description: Please use `QuantumToolbox.about()` or `QuantumToolbox.versioninfo()` to get the information about your environment and paste it here (automatically formatted)
placeholder: "QuantumToolbox Ver. ***\nLinearSolve Ver. ***\nOrdinaryDiffEq Ver. ***\nJulia Version: ***\nOS : ***\nWORD_SIZE: ***\nLIBM : ***\nLLVM : ***\nBLAS : ***"
placeholder: "Julia Ver. ***\nQuantumToolbox Ver. ***\nLinearSolve Ver. ***\nOrdinaryDiffEqCore Ver. ***\nOS : ***\nWORD_SIZE: ***\nLIBM : ***\nLLVM : ***\nBLAS : ***"
render: shell
validations:
required: true
Expand Down
10 changes: 5 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ Thank you for contributing to `QuantumToolbox.jl`! Please make sure you have fin

- [ ] Please read [Contributor Covenant Code of Conduct](https://github.com/qutip/QuantumToolbox.jl/blob/main/CODE_OF_CONDUCT.md)
- [ ] Any code changes were done in a way that does not break public API
- [ ] Appropriate tests were added.
- [ ] Any code changes should be formatted by running: `julia -e 'using JuliaFormatter; format(".")'`
- [ ] All documentation (in `docs/` folder) related to code changes were updated.
- [ ] Appropriate tests were added and tested locally by running: `make test`.
- [ ] Any code changes should be `julia` formatted by running: `make format`.
- [ ] All documents (in `docs/` folder) related to code changes were updated and able to build locally by running `make docs`.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a [Draft Pull Request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to let the others know this on-going work.

## Description
Describe the proposed change here.

## Related issues or PRs
Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #1234
Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #[id]

## Additional context
## Additional context
61 changes: 61 additions & 0 deletions .github/workflows/CI-Julia-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Runtests (Julia nightly)

on:
push:
branches:
- 'main'
paths:
- '.github/workflows/CI-Julia-nightly.yml'
- 'src/**'
- 'ext/**'
- 'test/runtests.jl'
- 'test/core-test/**'
- 'Project.toml'
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/CI-Julia-nightly.yml'
- 'src/**'
- 'ext/**'
- 'test/runtests.jl'
- 'test/core-test/**'
- 'Project.toml'
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
test:
name: ${{ matrix.os }} - ${{ matrix.arch }} ( ${{ matrix.group }} )
runs-on: ${{ matrix.os }}
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
actions: write
contents: read
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
version:
- 'nightly'
os:
- 'ubuntu-latest'
arch:
- 'x64'
group:
- 'Core'
- 'Code-Quality'

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
GROUP: ${{ matrix.group }}
62 changes: 27 additions & 35 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
- '.github/workflows/CI.yml'
- 'src/**'
- 'ext/**'
- 'test/**'
- 'test/runtests.jl'
- 'test/core-test/**'
- 'Project.toml'
pull_request:
branches:
Expand All @@ -17,7 +18,8 @@ on:
- '.github/workflows/CI.yml'
- 'src/**'
- 'ext/**'
- 'test/**'
- 'test/runtests.jl'
- 'test/core-test/**'
- 'Project.toml'
types:
- opened
Expand All @@ -27,8 +29,8 @@ on:

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} ( ${{ matrix.group }} )
runs-on: ${{ matrix.os }}
name: Julia ${{ matrix.version }} - ${{ matrix.node.os }} - ${{ matrix.node.arch }} ( ${{ matrix.group }} )
runs-on: ${{ matrix.node.os }}
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
actions: write
contents: read
Expand All @@ -38,49 +40,39 @@ jobs:
matrix:
# for core tests (latest and oldest supported versions)
version:
- '1.7' # oldest
- '1' # latest
os:
- ubuntu-latest
- windows-latest
arch:
- x64
group:
- 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
arch: 'x64'
group: 'Core'
- version: '1' # latest
os: 'macOS-latest' # M-series chip
arch: 'arm64'
group: 'Core'

# for core tests (intermediate versions)
- version: '1.8'
os: 'ubuntu-latest'
- '1.10' # oldest
# - '1' # latest
node:
- os: 'ubuntu-latest'
arch: 'x64'
group: 'Core'
- version: '1.9'
os: 'ubuntu-latest'
- os: 'windows-latest'
arch: 'x64'
group: 'Core'
- os: 'macOS-latest'
arch: 'arm64'
group:
- 'Core'

include:
# for code quality tests
- version: '1'
os: 'ubuntu-latest'
arch: 'x64'
node:
os: 'ubuntu-latest'
arch: 'x64'
group: 'Code-Quality'

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

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
arch: ${{ matrix.node.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
write(stdout, output)
write(stdout, "-----\n")
write(stdout, "Please format them by running the following command:\n")
write(stdout, "julia -e \"using JuliaFormatter; format(\\\".\\\")\"")
write(stdout, "make format")
exit(1)
end'
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
JULIA:=julia

default: help

docs:
${JULIA} --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
${JULIA} --project=docs docs/make.jl

format:
${JULIA} -e 'using JuliaFormatter; format(".")'

test:
${JULIA} --project -e 'using Pkg; Pkg.resolve(); Pkg.test()'

all: format test docs

help:
@echo "The following make commands are available:"
@echo " - make docs: instantiate and build the documentation"
@echo " - make format: format codes with JuliaFormatter"
@echo " - make test: run the tests"
@echo " - make all: run every commands above"

.PHONY: default docs format test all help
24 changes: 18 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name = "QuantumToolbox"
uuid = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab"
authors = ["Alberto Mercurio", "Luca Gravina", "Yi-Te Huang"]
version = "0.12.0"
version = "0.14.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503"
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"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"

[weakdeps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -28,21 +34,27 @@ QuantumToolboxCUDAExt = "CUDA"
[compat]
ArrayInterface = "6, 7"
CUDA = "5"
DiffEqBase = "6"
DiffEqCallbacks = "2 - 3.1, 3.8"
DiffEqNoiseProcess = "5"
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"
StochasticDiffEq = "6"
StaticArraysCore = "1"
Test = "<0.0.1, 1"
julia = "1.7"
julia = "1.10"

[extras]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
Loading