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
Compute the generalized dot product `dot(i, A*j)` between a [`AbstractQuantumObject`](@ref) and two [`QuantumObject`](@ref) (`i` and `j`), namely ``\langle i | \hat{A} | j \rangle``.
137
140
138
141
Supports the following inputs:
139
142
- `A` is in the type of [`Operator`](@ref), with `i` and `j` are both [`Ket`](@ref).
140
143
- `A` is in the type of [`SuperOperator`](@ref), with `i` and `j` are both [`OperatorKet`](@ref)
144
+
145
+
!!! note
146
+
`matrix_element(i, A, j)` is a synonym of `dot(i, A, j)`.
141
147
"""
142
148
function LinearAlgebra.dot(
143
149
i::QuantumObject{DT1,KetQuantumObject},
@@ -197,10 +203,12 @@ LinearAlgebra.transpose(
197
203
@docraw"""
198
204
A'
199
205
adjoint(A::AbstractQuantumObject)
206
+
dag(A::AbstractQuantumObject)
200
207
201
208
Lazy adjoint (conjugate transposition) of the [`AbstractQuantumObject`](@ref)
202
209
203
-
Note that `A'` is a synonym for `adjoint(A)`
210
+
!!! note
211
+
`A'` and `dag(A)` are synonyms of `adjoint(A)`.
204
212
"""
205
213
LinearAlgebra.adjoint(
206
214
A::AbstractQuantumObject{DT,OpType},
@@ -312,13 +320,17 @@ end
312
320
313
321
@docraw"""
314
322
normalize(A::QuantumObject, p::Real)
323
+
unit(A::QuantumObject, p::Real)
315
324
316
325
Return normalized [`QuantumObject`](@ref) so that its `p`-norm equals to unity, i.e. `norm(A, p) == 1`.
317
326
318
327
Support for the following types of [`QuantumObject`](@ref):
319
328
- If `A` is [`Ket`](@ref) or [`Bra`](@ref), default `p = 2`
320
329
- If `A` is [`Operator`](@ref), default `p = 1`
321
330
331
+
!!! note
332
+
`unit` is a synonym of `normalize`.
333
+
322
334
Also, see [`norm`](@ref) about its definition for different types of [`QuantumObject`](@ref).
Generate a [`QuantumObjectEvolution`](@ref) object from a [`SciMLOperator`](https://github.com/SciML/SciMLOperators.jl), in the same way as [`QuantumObject`](@ref) for `AbstractArray` inputs.
154
+
155
+
Note that `QobjEvo` is a synonym of `QuantumObjectEvolution`
- `op_func_list::Union{Tuple,AbstractQuantumObject}`: A tuple of tuples or operators.
179
+
- `α::Union{Nothing,Number}=nothing`: A scalar to pre-multiply the operators.
180
+
181
+
!!! warning "Beware of type-stability!"
182
+
Please note that, unlike QuTiP, this function doesn't support `op_func_list` as `Vector` type. This is related to the type-stability issue. See the Section [The Importance of Type-Stability](@ref doc:Type-Stability) for more details.
183
+
184
+
Note that if `α` is provided, all the operators in `op_func_list` will be pre-multiplied by `α`. The `type` parameter is used to specify the type of the [`QuantumObject`](@ref), either `Operator` or `SuperOperator`. The `f` parameter is used to pre-apply a function to the operators before converting them to SciML operators.
185
+
186
+
!!! note
187
+
`QobjEvo` is a synonym of `QuantumObjectEvolution`.
188
+
189
+
# Examples
190
+
This operator can be initialized in the same way as the QuTiP `QobjEvo` object. For example
- The `f` parameter is used to pre-apply a function to the operators before converting them to SciML operators. The `type` parameter is used to specify the type of the [`QuantumObject`](@ref), either `Operator` or `SuperOperator`.
291
+
- `QobjEvo` is a synonym of `QuantumObjectEvolution`.
0 commit comments