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: src/qobj/arithmetic_and_attributes.jl
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,9 @@ julia> tr(a' * a)
240
240
LinearAlgebra.tr(
241
241
A::QuantumObject{<:AbstractArray{T},OpType},
242
242
) where {T,OpType<:Union{OperatorQuantumObject,SuperOperatorQuantumObject}} =tr(A.data)
243
-
LinearAlgebra.tr(A::QuantumObject{<:Union{<:Hermitian{TF}, Symmetric{TR}},OpType}) where {TF<:BlasFloat,TR<:Real,OpType<:OperatorQuantumObject} =real(tr(A.data))
Copy file name to clipboardExpand all lines: src/qobj/operators.jl
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,8 @@ The `distribution` specifies which of the method used to obtain the unitary matr
31
31
!!! warning "Beware of type-stability!"
32
32
If you want to keep type stability, it is recommended to use `rand_unitary(dimensions, Val(distribution))` instead of `rand_unitary(dimensions, distribution)`. Also, put `dimensions` as `Tuple` or `SVector`. See [this link](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-value-type) and the [related Section](@ref doc:Type-Stability) about type stability for more details.
Copy file name to clipboardExpand all lines: src/qobj/states.jl
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,7 @@ It is also possible to specify the list of dimensions `dims` if different subsys
33
33
!!! warning "Beware of type-stability!"
34
34
If you want to keep type stability, it is recommended to use `fock(N, j, dims=dims, sparse=Val(sparse))` instead of `fock(N, j, dims=dims, sparse=sparse)`. Consider also to use `dims` as a `Tuple` or `SVector` instead of `Vector`. See [this link](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-value-type) and the [related Section](@ref doc:Type-Stability) about type stability for more details.
35
35
"""
36
-
functionfock(
37
-
N::Int,
38
-
j::Int=0;
39
-
dims::Union{Int,AbstractVector{Int},Tuple}= N,
40
-
sparse::Union{Bool,Val}=Val(false),
41
-
)
36
+
functionfock(N::Int, j::Int=0; dims::Union{Int,AbstractVector{Int},Tuple}= N, sparse::Union{Bool,Val}=Val(false))
0 commit comments