Skip to content

Commit 05b3ecc

Browse files
committed
fix errors from new version of QuantumToolbox.jl
1 parent 5266065 commit 05b3ecc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

QuantumToolbox.jl/time_evolution/kerr.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Kerr nonlinearities"
33
author: Li-Xun Cai
4-
date: 2025-02-08 # last update (keep this comment as a reminder)
4+
date: 2025-05-17 # last update (keep this comment as a reminder)
55

66
engine: julia
77
---
@@ -126,10 +126,10 @@ Since we are considering unitary dynamics, i.e., no dissipation, the dynamics ar
126126

127127
Note that if the keyword argument `e_ops` is not supplied to [`mesolve`](https://qutip.org/QuantumToolbox.jl/stable/resources/api#QuantumToolbox.sesolve), the returned `result` contains the state at each time point at field `states`. Consult the [user guide to `TimeEvolutionSol`](https://qutip.org/QuantumToolbox.jl/stable/users_guide/time_evolution/solution) for more details.
128128
```{julia}
129-
ψ0 = coherent(N, 2.0)
129+
ρ0 = coherent_dm(N, 2.0)
130130
tlist = 0:0.01:(2*π / χ)
131131
132-
result = mesolve(H, ψ0, tlist)
132+
result = mesolve(H, ρ0, tlist)
133133
```
134134

135135
We first check the expectation value dynamics of the number operator `n` with the two visualization functions we defined previously.

QuantumToolbox.jl/time_evolution/lowrank.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Low rank master equation
33
author: Luca Gravina
4-
date: 2025-04-14 # last update (keep this comment as a reminder)
4+
date: 2025-05-17 # last update (keep this comment as a reminder)
55

66
engine: julia
77
---
@@ -90,7 +90,7 @@ M = latt.N + 1; # Number of states in the LR basis
9090
Since we will take as initial state for our dynamics the pure state with all spins pointing up, the initial low-rank basis must include at least this state.
9191

9292
```{julia}
93-
ϕ = Vector{QuantumObject{KetQuantumObject,Dimensions{M - 1,NTuple{M - 1,Space}},Vector{ComplexF64}}}(undef, M)
93+
ϕ = Vector{QuantumObject{Ket,Dimensions{M - 1,NTuple{M - 1,Space}},Vector{ComplexF64}}}(undef, M)
9494
ϕ[1] = kron(fill(basis(2, 1), N_modes)...)
9595
```
9696

@@ -182,7 +182,7 @@ function f_entropy(p, z, B)
182182
183183
mul!(C, z, sqrt(B))
184184
mul!(σ, C', C)
185-
return entropy_vn(Qobj(Hermitian(σ), type=Operator), base=2)
185+
return entropy_vn(Qobj(Hermitian(σ), type=Operator()), base=2)
186186
end;
187187
```
188188

0 commit comments

Comments
 (0)