Skip to content

Commit 5227e96

Browse files
authored
[Doc] fix typo (#458)
1 parent 201e066 commit 5227e96

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/src/users_guide/time_evolution/mesolve.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ In `QuantumToolbox`, given a Hamiltonian, we can calculate the unitary (non-diss
3131

3232
```@example mesolve
3333
H = 0.5 * sigmax()
34-
state0 = basis(2, 0) # state vector
35-
state0 = ket2dm(basis(2, 0)) # density matrix
34+
state0 = basis(2, 0) # state vector
3635
tlist = LinRange(0.0, 10.0, 20)
3736
3837
sol = mesolve(H, state0, tlist, e_ops = [sigmaz()])
3938
```
4039

41-
!!! note "Type of initial state"
42-
The initial state `state0` here can be given as a state vector ``|\psi(0)\rangle`` (in the type of [`Ket`](@ref)) or a density matrix ``\hat{\rho}(0)`` (in the type of [`Operator`](@ref)). If it is given as a [`Ket`](@ref), it will be transformed to density matrix ``\hat{\rho}(0) = |\psi(0)\rangle\langle\psi(0)|`` internally in [`mesolve`](@ref).
40+
!!! note "Use sesolve for improved efficiency"
41+
Here, if the Hamiltonian `H` is given as an [`Operator`](@ref), and the initial state `state0` is given as a state vector ``|\psi(0)\rangle`` (in the type of [`Ket`](@ref)), it will automatically call [`sesolve`](@ref) for improved efficiency.
4342

44-
The function returns [`TimeEvolutionSol`](@ref), as described in the previous section [Time Evolution Solutions](@ref doc-TE:Time-Evolution-Solutions). The stored `states` will always be in the type of [`Operator`](@ref) (density matrix).
43+
The function returns [`TimeEvolutionSol`](@ref), as described in the previous section [Time Evolution Solutions](@ref doc-TE:Time-Evolution-Solutions).
4544

4645
```@example mesolve
4746
sol.states
@@ -53,6 +52,7 @@ One can also specify `e_ops` and `saveat` separately:
5352

5453
```@example mesolve
5554
tlist = [0, 5, 10]
55+
state0 = ket2dm(basis(2, 0)) # density matrix
5656
sol = mesolve(H, state0, tlist, e_ops = [sigmay()], saveat = tlist)
5757
```
5858

@@ -64,6 +64,8 @@ sol.expect
6464
sol.states
6565
```
6666

67+
Note that when the initial state `state0` is given as a density matrix ``|\psi(0)\rangle\langle\psi(0)|`` (in the type of [`Operator`](@ref)), the stored `states` will also be in the type of [`Operator`](@ref) (density matrix).
68+
6769
## [The Lindblad master equation](@id doc-TE:The-Lindblad-master-equation)
6870

6971
The standard approach for deriving the equations of motion for a system interacting with its environment is to expand the scope of the system to include the environment. The combined quantum system is then closed, and its evolution is also governed by the von Neumann equation

0 commit comments

Comments
 (0)