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``.
135
138
136
139
Supports the following inputs:
137
140
- `A` is in the type of [`Operator`](@ref), with `i` and `j` are both [`Ket`](@ref).
138
141
- `A` is in the type of [`SuperOperator`](@ref), with `i` and `j` are both [`OperatorKet`](@ref)
142
+
143
+
!!! note
144
+
`matrix_element(i, A, j)` is a synonym of `dot(i, A, j)`.
139
145
"""
140
146
function LinearAlgebra.dot(
141
147
i::QuantumObject{DT1,KetQuantumObject},
@@ -195,10 +201,12 @@ LinearAlgebra.transpose(
195
201
@docraw"""
196
202
A'
197
203
adjoint(A::AbstractQuantumObject)
204
+
dag(A::AbstractQuantumObject)
198
205
199
206
Lazy adjoint (conjugate transposition) of the [`AbstractQuantumObject`](@ref)
200
207
201
-
Note that `A'` is a synonym for `adjoint(A)`
208
+
!!! note
209
+
`A'` and `dag(A)` are synonyms of `adjoint(A)`.
202
210
"""
203
211
LinearAlgebra.adjoint(
204
212
A::AbstractQuantumObject{DT,OpType},
@@ -310,13 +318,17 @@ end
310
318
311
319
@docraw"""
312
320
normalize(A::QuantumObject, p::Real)
321
+
unit(A::QuantumObject, p::Real)
313
322
314
323
Return normalized [`QuantumObject`](@ref) so that its `p`-norm equals to unity, i.e. `norm(A, p) == 1`.
315
324
316
325
Support for the following types of [`QuantumObject`](@ref):
317
326
- If `A` is [`Ket`](@ref) or [`Bra`](@ref), default `p = 2`
318
327
- If `A` is [`Operator`](@ref), default `p = 1`
319
328
329
+
!!! note
330
+
`unit` is a synonym of `normalize`.
331
+
320
332
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