Skip to content

Commit ff73a5a

Browse files
authored
fix typos in documentation (#336)
1 parent 0f2c4a1 commit ff73a5a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/src/getting_started/type_stability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ nothing # hide
144144

145145
Thus, we highly recommend using `Vector` only when we are sure that it contains elements of the same type, and only when we don't need to know its size at compile time. On the other hand, `Tuple`s are less flexible but more efficient in terms of performance. A third option is to use the `SVector` type from the [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl) package. This is similar to `Vector`, where the elements should have the same type, but it is fixed-size and immutable. One may ask when it is necessary to know the array size at compile time. A practical example is the case of [`ptrace`](@ref), where it internally reshapes the quantum state into a tensor whose dimensions depend on the number of subsystems. We will see this in more detail in the next section.
146146

147-
## The [`QuantumObject`](@ref) internal structure
147+
## The `QuantumObject` internal structure
148148

149149
Before making a practical example, let's see the internal structure of the [`QuantumObject`](@ref) type. As an example, we consider the case of three qubits, and we study the internal structure of the ``\hat{\sigma}_x^{(2)}`` operator:
150150

docs/src/users_guide/time_evolution/time_dependent.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ H_t = QobjEvo(sigmax(), coef)
2222
```
2323

2424
!!! warning "The inputs of coefficient function"
25-
Please note that although we didn't use the argument `p` in the definition of `coef`, we still need to put a dummy input `p` in the declaration of `coef`. We will describe how to use the parameter `p` in the section [Using parameters](@ref doc-TE:Using-parameters).
25+
Please note that although we didn't use the argument `p` in the definition of `coef`, we still need to put a dummy input `p` (in front of `t`) in the declaration of `coef`. We will describe how to use the parameter `p` in the section [Using parameters](@ref doc-TE:Using-parameters).
2626

2727
The [`QobjEvo`](@ref) can also be generated by specifying many pairs of time-independent [`Qobj`](@ref) and time-dependent coefficient function. For instance, we will look at a case with the total Hamiltonian ``\hat{H}(t)`` can be separate into time-independent part (``\hat{H}_0``) and a summation of many time-dependent operators, which takes the form:
2828

@@ -131,8 +131,8 @@ e_ops = [
131131
]
132132
133133
# solve dynamics
134-
exp_me = mesolve(H_t, ψ0, tlist, c_ops, e_ops = e_ops; progress_bar = Val(false)).expect
135-
exp_mc = mcsolve(H_t, ψ0, tlist, c_ops, e_ops = e_ops; progress_bar = Val(false)).expect
134+
exp_me = mesolve(H_t, ψ0, tlist, c_ops; e_ops = e_ops, progress_bar = Val(false)).expect
135+
exp_mc = mcsolve(H_t, ψ0, tlist, c_ops; e_ops = e_ops, ntraj = 100, progress_bar = Val(false)).expect
136136
137137
# plot by CairoMakie.jl
138138
fig = Figure(size = (500, 350))
@@ -149,7 +149,7 @@ axislegend(ax, position = :rc)
149149
fig
150150
```
151151

152-
The result from [`mesolve`](@ref) is identical to that shown in the examples, the [`mcsolve`](@ref) however will be noticeably off, suggesting we should increase the number of trajectories `ntraj` for this example.
152+
The result from [`mesolve`](@ref) is identical to that shown in the examples, the [`mcsolve`](@ref) however will be noticeably off, suggesting we should increase the number of trajectories `ntraj = 100` for this example.
153153

154154
In addition, we can also consider the decay of a simple Harmonic oscillator with time-varying decay rate ``\gamma_1(t)``
155155

@@ -190,7 +190,7 @@ fig
190190
coef(p, t) = sin(π * t)
191191
Ht = QobjEvo(sigmaz(), coef)
192192
193-
Ht(0.25)
193+
Ht(0.25) # t = 0.25
194194
```
195195

196196
[`QuantumObjectEvolution`](@ref) shares a lot of properties with the [`QuantumObject`](@ref):
@@ -214,7 +214,7 @@ size(Ht)
214214
```
215215

216216
```@example QobjEvo
217-
shape(Ht) # synonym of size(H)
217+
shape(Ht) # synonym of size(Ht)
218218
```
219219

220220
```@example QobjEvo
@@ -234,7 +234,7 @@ println(isoperbra(Ht)) # operator-bra
234234
println(issuper(Ht)) # super operator
235235
println(isconstant(Ht)) # time-independent or not
236236
println(ishermitian(Ht)) # Hermitian
237-
println(isherm(Ht)) # synonym of ishermitian(a)
237+
println(isherm(Ht)) # synonym of ishermitian(Ht)
238238
println(issymmetric(Ht)) # symmetric
239239
println(isposdef(Ht)) # positive definite (and Hermitian)
240240
```

0 commit comments

Comments
 (0)