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
136
136
137
Supports the following inputs:
137
138
- `A` is in the type of [`Operator`](@ref), with `i` and `j` are both [`Ket`](@ref).
138
139
- `A` is in the type of [`SuperOperator`](@ref), with `i` and `j` are both [`OperatorKet`](@ref)
140
+
141
+
Note that `matrix_element(i, A, j)` is a synonym of `dot(i, A, j)`.
139
142
"""
140
143
function LinearAlgebra.dot(
141
144
i::QuantumObject{DT1,KetQuantumObject},
@@ -195,10 +198,11 @@ LinearAlgebra.transpose(
195
198
@docraw"""
196
199
A'
197
200
adjoint(A::AbstractQuantumObject)
201
+
dag(A::AbstractQuantumObject)
198
202
199
203
Lazy adjoint (conjugate transposition) of the [`AbstractQuantumObject`](@ref)
200
204
201
-
Note that `A'` is a synonym for `adjoint(A)`
205
+
Note that `A'` and `dag(A)` are synonyms of `adjoint(A)`.
202
206
"""
203
207
LinearAlgebra.adjoint(
204
208
A::AbstractQuantumObject{DT,OpType},
@@ -310,13 +314,16 @@ end
310
314
311
315
@docraw"""
312
316
normalize(A::QuantumObject, p::Real)
317
+
unit(A::QuantumObject, p::Real)
313
318
314
319
Return normalized [`QuantumObject`](@ref) so that its `p`-norm equals to unity, i.e. `norm(A, p) == 1`.
315
320
316
321
Support for the following types of [`QuantumObject`](@ref):
317
322
- If `A` is [`Ket`](@ref) or [`Bra`](@ref), default `p = 2`
318
323
- If `A` is [`Operator`](@ref), default `p = 1`
319
324
325
+
Note that `unit` is a synonym of `normalize`.
326
+
320
327
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.
150
+
151
+
Note that `QobjEvo` is a synonym of `QuantumObjectEvolution`
- `op_func_list::Union{Tuple,AbstractQuantumObject}`: A tuple of tuples or operators.
175
+
- `α::Union{Nothing,Number}=nothing`: A scalar to pre-multiply the operators.
176
+
177
+
!!! warning "Beware of type-stability!"
178
+
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.
179
+
180
+
# Notes
181
+
- 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.
182
+
- `QobjEvo` is a synonym of `QuantumObjectEvolution`
183
+
184
+
# Examples
185
+
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`.
286
+
- `QobjEvo` is a synonym of `QuantumObjectEvolution`.
0 commit comments