Skip to content

Commit 52950ae

Browse files
committed
remove tutorials category in docs
1 parent 6085242 commit 52950ae

File tree

7 files changed

+48
-220
lines changed

7 files changed

+48
-220
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ and [Y.-T. Huang](https://github.com/ytdHuang).
6666
- **Quantum State and Operator Manipulation:** Easily handle quantum states and operators with a rich set of tools, with the same functionalities as `QuTiP`.
6767
- **Dynamical Evolution:** Advanced solvers for time evolution of quantum systems, thanks to the powerful [`DifferentialEquations.jl`](https://github.com/SciML/DifferentialEquations.jl) package.
6868
- **GPU Computing:** Leverage GPU resources for high-performance computing. Simulate quantum dynamics directly on the GPU with the same syntax as the CPU case.
69-
- **Distributed Computing:** Distribute the computation over multiple nodes (e.g., a cluster). For example, you can run hundreds of quantum trajectories in parallel on a cluster, with, again, the same syntax as the simple case. See [this tutorial](https://qutip.org/QuantumToolbox.jl/stable/tutorials/cluster) for more information.
69+
- **Distributed Computing:** Distribute the computation over multiple nodes (e.g., a cluster). For example, you can run hundreds of quantum trajectories in parallel on a cluster, with, again, the same syntax as the simple case. See [here](https://qutip.org/QuantumToolbox.jl/stable/users_guide/cluster) for more information.
7070
- **Easy Extension:** Easily extend the package, taking advantage of the `Julia` language features, like multiple dispatch and metaprogramming.
7171

7272
## Installation

docs/make.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const PAGES = [
3636
"Brief Example" => "getting_started/brief_example.md",
3737
"Key differences from QuTiP" => "getting_started/qutip_differences.md",
3838
"The Importance of Type-Stability" => "getting_started/type_stability.md",
39+
"Example: Create QuantumToolbox.jl Logo" => "getting_started/logo.md",
3940
# "Cite QuantumToolbox.jl" => "getting_started/cite.md",
4041
],
4142
"Users Guide" => [
@@ -54,6 +55,7 @@ const PAGES = [
5455
"Stochastic Solver" => "users_guide/time_evolution/stochastic.md",
5556
"Solving Problems with Time-dependent Hamiltonians" => "users_guide/time_evolution/time_dependent.md",
5657
],
58+
"Intensive parallelization on a Cluster" => "users_guide/cluster.md",
5759
"Hierarchical Equations of Motion" => "users_guide/HEOM.md",
5860
"Solving for Steady-State Solutions" => "users_guide/steadystate.md",
5961
"Two-time correlation functions" => "users_guide/two_time_corr_func.md",
@@ -62,15 +64,6 @@ const PAGES = [
6264
"users_guide/extensions/cairomakie.md",
6365
],
6466
],
65-
"Tutorials" => [
66-
"Time Evolution" => [
67-
"Low Rank Master Equation" => "tutorials/lowrank.md",
68-
],
69-
"Miscellaneous Tutorials" => [
70-
"tutorials/logo.md",
71-
"tutorials/cluster.md",
72-
],
73-
],
7467
"Resources" => [
7568
"API" => "resources/api.md",
7669
"Bibliography" => "resources/bibliography.md",

docs/src/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const navTemp = {
1313

1414
const nav = [
1515
...navTemp.nav,
16+
{ text: 'Tutorials', link: 'https://qutip.org/qutip-julia-tutorials/' },
1617
{ text: 'Benchmarks', link: 'https://qutip.org/QuantumToolbox.jl/benchmarks/' },
1718
{
1819
component: 'VersionPicker'

docs/src/tutorials/logo.md renamed to docs/src/getting_started/logo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# [Create QuantumToolbox.jl logo](@id doc-tutor:Create-QuantumToolbox.jl-logo)
1+
# [Example: Create QuantumToolbox.jl logo](@id doc:Create-QuantumToolbox.jl-logo)
22

33
## Introduction
44

5-
In this tutorial, we will demonstrate how to create the logo for the **QuantumToolbox.jl** package. The logo represents the Wigner function of the triangular cat state, which is a linear superposition of three coherent states. The resulting Wigner function has a triangular shape that resembles the Julia logo. We will also define a custom colormap that varies based on the value of the Wigner function and the spatial coordinates, such that the three blobs corresponding to the coherent states have different colors (matching the colors of the Julia logo).
5+
In this example, we will demonstrate how to create the logo for the **QuantumToolbox.jl** package. The logo represents the Wigner function of the triangular cat state, which is a linear superposition of three coherent states. The resulting Wigner function has a triangular shape that resembles the Julia logo. We will also define a custom colormap that varies based on the value of the Wigner function and the spatial coordinates, such that the three blobs corresponding to the coherent states have different colors (matching the colors of the Julia logo).
66

77
### Triangular Cat State
88

@@ -196,4 +196,4 @@ fig
196196

197197
## Conclusion
198198

199-
This tutorial demonstrates how to generate the [QuantumToolbox.jl](https://github.com/qutip/QuantumToolbox.jl) logo using the package itself and [Makie.jl](https://github.com/MakieOrg/Makie.jl) for visualization. The logo is a visualization of the Wigner function of a triangular cat state, with a custom colormap that highlights the different coherent states with colors matching the Julia logo.
199+
This example demonstrates how to generate the [QuantumToolbox.jl](https://github.com/qutip/QuantumToolbox.jl) logo using the package itself and [Makie.jl](https://github.com/MakieOrg/Makie.jl) for visualization. The logo is a visualization of the Wigner function of a triangular cat state, with a custom colormap that highlights the different coherent states with colors matching the Julia logo.

docs/src/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ hero:
1717
text: Users Guide
1818
link: /users_guide/QuantumObject/QuantumObject
1919
- theme: alt
20-
text: View on Github
21-
link: https://github.com/qutip/QuantumToolbox.jl
20+
text: Tutorials
21+
link: https://qutip.org/qutip-julia-tutorials/
2222
- theme: alt
2323
text: API
2424
link: /resources/api
25+
- theme: alt
26+
text: View on Github
27+
link: https://github.com/qutip/QuantumToolbox.jl
2528
- theme: alt
2629
text: Visit QuTiP.org
2730
link: https://qutip.org/
@@ -39,7 +42,7 @@ features:
3942
- icon: <img width="64" height="64" src="https://img.icons8.com/?size=100&id=1W4Bkj363ov0&format=png&color=000000" />
4043
title: Distributed Computing
4144
details: Distribute the computation over multiple nodes (e.g., a cluster). Simulate hundreds of quantum trajectories in parallel on a cluster, with, again, the same syntax as the simple case.
42-
link: /tutorials/cluster
45+
link: /users_guide/cluster
4346
---
4447
```
4548

docs/src/tutorials/lowrank.md

Lines changed: 0 additions & 177 deletions
This file was deleted.

docs/src/tutorials/cluster.md renamed to docs/src/users_guide/cluster.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
1-
# [Intensive parallelization on a Cluster](@id doc-tutor:Intensive-parallelization-on-a-Cluster)
1+
# [Intensive parallelization on a Cluster](@id doc:Intensive-parallelization-on-a-Cluster)
22

33
## Introduction
44

5-
In this tutorial, we will demonstrate how to seamlessly perform intensive parallelization on a cluster using the **QuantumToolbox.jl** package. Indeed, thanks to the [**Distributed.jl**](https://docs.julialang.org/en/v1/manual/distributed-computing/) and [**ClusterManagers.jl**](https://github.com/JuliaParallel/ClusterManagers.jl) packages, it is possible to parallelize on a cluster with minimal effort. The following examples are applied to a cluster with the [SLURM](https://slurm.schedmd.com/documentation.html) workload manager, but the same principles can be applied to other workload managers, as the [**ClusterManagers.jl**](https://github.com/JuliaParallel/ClusterManagers.jl) package is very versatile.
5+
In this example, we will demonstrate how to seamlessly perform intensive parallelization on a cluster using the **QuantumToolbox.jl** package. Indeed, thanks to the [**Distributed.jl**](https://docs.julialang.org/en/v1/manual/distributed-computing/) and [**ClusterManagers.jl**](https://github.com/JuliaParallel/ClusterManagers.jl) packages, it is possible to parallelize on a cluster with minimal effort. The following examples are applied to a cluster with the [SLURM](https://slurm.schedmd.com/documentation.html) workload manager, but the same principles can be applied to other workload managers, as the [**ClusterManagers.jl**](https://github.com/JuliaParallel/ClusterManagers.jl) package is very versatile.
66

7-
We will consider two examples:
7+
## SLURM batch script
88

9-
1. **Parallelization of a Monte Carlo quantum trajectories**
10-
2. **Parallelization of a Master Equation by sweeping over parameters**
11-
12-
### Monte Carlo Quantum Trajectories
13-
14-
Let's consider a 2-dimensional transverse field Ising model with 4x3 spins. The Hamiltonian is given by
15-
16-
```math
17-
\hat{H} = \frac{J_z}{2} \sum_{\langle i,j \rangle} \hat{\sigma}_i^z \hat{\sigma}_j^z + h_x \sum_i \hat{\sigma}_i^x \, ,
18-
```
19-
20-
where the sums are over nearest neighbors, and the collapse operators are given by
21-
22-
```math
23-
\hat{c}_i = \sqrt{\gamma} \hat{\sigma}_i^- \, .
24-
```
25-
26-
We start by creating a file named `run.batch` with the following content:
9+
To submit a batch script to [SLURM](https://slurm.schedmd.com/documentation.html), we start by creating a file named `run.batch` with the following content:
2710

2811
```bash
2912
#!/bin/bash
30-
#SBATCH --job-name=tutorial
13+
#SBATCH --job-name=example
3114
#SBATCH --output=output.out
3215
#SBATCH --account=your_account
3316
#SBATCH --nodes=10
@@ -44,9 +27,34 @@ export PATH=/home/username/.juliaup/bin:$PATH
4427
julia --project script.jl
4528
```
4629

47-
where we have to replace `your_account` with the name of your account. This script will be used to submit the job to the cluster. Here, we are requesting 10 nodes with 72 threads each (720 parallel jobs). The `--time` flag specifies the maximum time that the job can run. To see all the available options, you can check the [SLURM documentation](https://slurm.schedmd.com/documentation.html). We also export the path to the custom Julia installation, which is necessary to run the script (replace `username` with your username). Finally, we run the script `script.jl` with the command `julia --project script.jl`.
30+
where we have to replace `your_account` with the name of your account. This script will be used to submit the job to the cluster by using the following command in terminal:
31+
32+
```shell
33+
sbatch run.batch
34+
```
35+
36+
Here, we are requesting `10` nodes with `72` threads each (`720` parallel jobs). The `--time` flag specifies the maximum time that the job can run. To see all the available options, you can check the [SLURM documentation](https://slurm.schedmd.com/documentation.html). We also export the path to the custom Julia installation, which is necessary to run the script (replace `username` with your username). Finally, we run the script `script.jl` with the command `julia --project script.jl`.
37+
38+
In the following, we will consider two examples:
39+
40+
1. **Parallelization of a Monte Carlo quantum trajectories**
41+
2. **Parallelization of a Master Equation by sweeping over parameters**
42+
43+
## Monte Carlo Quantum Trajectories
44+
45+
Let's consider a `2`-dimensional transverse field Ising model with `4x3` spins. The Hamiltonian is given by
46+
47+
```math
48+
\hat{H} = \frac{J_z}{2} \sum_{\langle i,j \rangle} \hat{\sigma}_i^z \hat{\sigma}_j^z + h_x \sum_i \hat{\sigma}_i^x \, ,
49+
```
50+
51+
where the sums are over nearest neighbors, and the collapse operators are given by
52+
53+
```math
54+
\hat{c}_i = \sqrt{\gamma} \hat{\sigma}_i^- \, .
55+
```
4856

49-
The `script.jl` contains the following content:
57+
In this case, the `script.jl` contains the following content:
5058

5159
```julia
5260
using Distributed
@@ -121,7 +129,7 @@ With the
121129
println("Hello! You have $(nworkers()) workers with $(remotecall_fetch(Threads.nthreads, 2)) threads each.")
122130
```
123131

124-
command, we test that the distributed network is correctly initialized. The `remotecall_fetch(Threads.nthreads, 2)` command returns the number of threads of the worker with ID 2.
132+
command, we test that the distributed network is correctly initialized. The `remotecall_fetch(Threads.nthreads, 2)` command returns the number of threads of the worker with ID `2`.
125133

126134
We then write the main part of the script, where we define the lattice through the [`Lattice`](@ref) function. We set the parameters and define the Hamiltonian and collapse operators with the [`DissipativeIsing`](@ref) function. We also define the expectation operators `e_ops` and the initial state `ψ0`. Finally, we perform the Monte Carlo quantum trajectories with the [`mcsolve`](@ref) function. The `ensemble_method=EnsembleSplitThreads()` argument is used to parallelize the Monte Carlo quantum trajectories, by splitting the ensemble of trajectories among the workers. For a more detailed explanation of the different ensemble methods, you can check the [official documentation](https://docs.sciml.ai/DiffEqDocs/stable/features/ensemble/) of the [**DifferentialEquations.jl**](https://github.com/SciML/DifferentialEquations.jl/) package. Finally, the `rmprocs(workers())` command is used to remove the workers after the computation is finished.
127135

@@ -140,7 +148,7 @@ FINISH!
140148

141149
where we can see that the computation **lasted only 21 seconds**.
142150

143-
### Master Equation by Sweeping Over Parameters
151+
## Master Equation by Sweeping Over Parameters
144152

145153
In this example, we will consider a driven Jaynes-Cummings model, describing a two-level atom interacting with a driven cavity mode. The Hamiltonian is given by
146154

@@ -154,7 +162,7 @@ and the collapse operators are given by
154162
\hat{c}_1 = \sqrt{\gamma} \hat{a} \, , \quad \hat{c}_2 = \sqrt{\gamma} \hat{\sigma}_- \, .
155163
```
156164

157-
The SLURM file is the same as before, but the `script.jl` file now contains the following content:
165+
The SLURM batch script file is the same as before, but the `script.jl` file now contains the following content:
158166

159167
```julia
160168
using Distributed

0 commit comments

Comments
 (0)