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
functionCompoundDimensions(to::Union{AbstractVector{T},NTuple{N1,T}}, from::Union{AbstractVector{T},NTuple{N2,T}}) where {T<:Integer,N1,N2}
38
33
_non_static_array_warning("dims", to)
39
34
_non_static_array_warning("dims", from)
40
35
41
36
L1 =length(to)
42
37
L2 =length(from)
43
-
((L1 > 0) && (L1 == L2)) || throw(DomainError((to, from), "The arguments `to` and `from` must be in the same length and have at least one element."))
38
+
((L1 >0) && (L1 == L2)) ||throw(DomainError((L1, L2), "The length of the arguments `to` and `from` must be in the same length and have at least one element."))
Copy file name to clipboardExpand all lines: src/qobj/functions.jl
+44-16Lines changed: 44 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -178,25 +178,53 @@ julia> a.dims, O.dims
178
178
([20], [20, 20])
179
179
```
180
180
"""
181
-
function LinearAlgebra.kron(
182
-
A::AbstractQuantumObject{DT1,AOpType},
183
-
B::AbstractQuantumObject{DT2,BOpType},
184
-
) where {DT1,DT2,AOpType<:Union{KetQuantumObject,BraQuantumObject,OperatorQuantumObject},BOpType<:Union{KetQuantumObject,BraQuantumObject,OperatorQuantumObject}}
181
+
function LinearAlgebra.kron(# for same OpType. Note that `<:DimType` means same DimType but can have different length N : DimType{N}
182
+
A::AbstractQuantumObject{DT1,OpType,<:DimType},
183
+
B::AbstractQuantumObject{DT2,OpType,<:DimType},
184
+
) where {DT1,DT2,OpType<:Union{KetQuantumObject,BraQuantumObject,OperatorQuantumObject},DimType<:AbstractDimensions}
Julia struct representing any time-dependent quantum object. The `data` field is a `AbstractSciMLOperator` object that represents the time-dependent quantum object. It can be seen as
0 commit comments