You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/getting_started/type_stability.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ nothing # hide
144
144
145
145
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.
146
146
147
-
## The [`QuantumObject`](@ref) internal structure
147
+
## The `QuantumObject` internal structure
148
148
149
149
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:
Copy file name to clipboardExpand all lines: docs/src/users_guide/time_evolution/time_dependent.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ H_t = QobjEvo(sigmax(), coef)
22
22
```
23
23
24
24
!!! 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).
26
26
27
27
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:
@@ -149,7 +149,7 @@ axislegend(ax, position = :rc)
149
149
fig
150
150
```
151
151
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.
153
153
154
154
In addition, we can also consider the decay of a simple Harmonic oscillator with time-varying decay rate ``\gamma_1(t)``
155
155
@@ -190,7 +190,7 @@ fig
190
190
coef(p, t) = sin(π * t)
191
191
Ht = QobjEvo(sigmaz(), coef)
192
192
193
-
Ht(0.25)
193
+
Ht(0.25) # t = 0.25
194
194
```
195
195
196
196
[`QuantumObjectEvolution`](@ref) shares a lot of properties with the [`QuantumObject`](@ref):
0 commit comments