Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/src/users_guide/QuantumObject/QuantumObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ println(isoper(a)) # operator
println(isoperket(a)) # operator-ket
println(isoperbra(a)) # operator-bra
println(issuper(a)) # super operator
println(isconstant(a)) # time-independent or not
println(ishermitian(a)) # Hermitian
println(isherm(a)) # synonym of ishermitian(a)
println(issymmetric(a)) # symmetric
Expand Down
2 changes: 1 addition & 1 deletion docs/src/users_guide/steadystate.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ exp_mc = real(sol_mc.expect[1, :])
sol_me = mesolve(H, ψ0, tlist, c_ops, e_ops=e_ops, progress_bar=false)
exp_me = real(sol_me.expect[1, :])

# plot the results
# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1],
title = L"Decay of Fock state $|10\rangle$ in a thermal environment with $\langle n\rangle=2$",
Expand Down
3 changes: 3 additions & 0 deletions docs/src/users_guide/time_evolution/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
- [Monte-Carlo Solver](@ref doc-TE:Monte-Carlo-Solver)
- [Stochastic Solver](@ref doc-TE:Stochastic-Solver)
- [Solving Problems with Time-dependent Hamiltonians](@ref doc-TE:Solving-Problems-with-Time-dependent-Hamiltonians)
- [Generate QobjEvo](@ref doc-TE:Generate-QobjEvo)
- [QobjEvo fields (attributes)](@ref doc-TE:QobjEvo-fields-(attributes))
- [Using parameters](@ref doc-TE:Using-parameters)

# [Introduction](@id doc-TE:Introduction)

Expand Down
10 changes: 6 additions & 4 deletions docs/src/users_guide/time_evolution/mesolve.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

```@setup mesolve
using QuantumToolbox

using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())
```

## [Von Neumann equation](@id doc-TE:Von-Neumann-equation)
Expand Down Expand Up @@ -123,13 +126,11 @@ sol = mesolve(H, ψ0, tlist, c_ops, e_ops = [sigmaz(), sigmay()])
We can therefore plot the expectation values:

```@example mesolve
using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())

times = sol.times
expt_z = real(sol.expect[1,:])
expt_y = real(sol.expect[2,:])

# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1], xlabel = "Time", ylabel = "Expectation values")
lines!(ax, times, expt_z, label = L"\langle\hat{\sigma}_z\rangle", linestyle = :solid)
Expand Down Expand Up @@ -166,7 +167,7 @@ e_ops = [a' * a]
sol = mesolve(H, ψ0, tlist, c_ops, e_ops=e_ops)
Num = real(sol.expect[1, :])

# plot the results
# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1],
title = L"Decay of Fock state $|10\rangle$ in a thermal environment with $\langle n\rangle=2$",
Expand Down Expand Up @@ -213,6 +214,7 @@ times = sol.times
N_atom = real(sol.expect[1,:])
N_cavity = real(sol.expect[2,:])

# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1], xlabel = "Time", ylabel = "Expectation values")
lines!(ax, times, N_atom, label = "atom excitation probability", linestyle = :solid)
Expand Down
7 changes: 4 additions & 3 deletions docs/src/users_guide/time_evolution/sesolve.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ The Schrödinger equation, which governs the time-evolution of closed quantum sy

```@setup sesolve
using QuantumToolbox

using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())
```

For example, the time evolution of a quantum spin-``\frac{1}{2}`` system (initialized in spin-``\uparrow``) with tunneling rate ``0.1`` is calculated, and the expectation values of the Pauli-Z operator ``\hat{\sigma}_z`` is also evaluated, with the following code
Expand Down Expand Up @@ -68,12 +71,10 @@ print(size(expt))
We can therefore plot the expectation values:

```@example sesolve
using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())

expt_z = real(expt[1,:])
expt_y = real(expt[2,:])

# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1], xlabel = "Time", ylabel = "Expectation values")
lines!(ax, times, expt_z, label = L"\langle\hat{\sigma}_z\rangle", linestyle = :solid)
Expand Down
7 changes: 4 additions & 3 deletions docs/src/users_guide/time_evolution/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

```@setup TE-solution
using QuantumToolbox

using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())
```

## [Solution](@id doc-TE:Solution)
Expand Down Expand Up @@ -61,9 +64,7 @@ nothing # hide
we can plot the resulting expectation values:

```@example TE-solution
using CairoMakie
CairoMakie.enable_only_mime!(MIME"image/svg+xml"())

# plot by CairoMakie.jl
fig = Figure(size = (500, 350))
ax = Axis(fig[1, 1], xlabel = L"t")
lines!(ax, times, expt1, label = L"\langle 0 | \rho(t) | 0 \rangle")
Expand Down
Loading
Loading