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
Returns the [`SuperOperator`](@ref) form of `A` acting on the left of the density matrix operator: ``\mathcal{O} \left(\hat{A}\right) \left[ \hat{\rho} \right] = \hat{A} \hat{\rho}``.
81
80
@@ -86,15 +85,12 @@ Since the density matrix is vectorized in [`OperatorKet`](@ref) form: ``|\hat{\r
86
85
```
87
86
(see the section in documentation: [Superoperators and Vectorized Operators](@ref doc:Superoperators-and-Vectorized-Operators) for more details)
88
87
89
-
The optional argument `Id_cache` can be used to pass a precomputed identity matrix. This can be useful when the same function is applied multiple times with a known Hilbert space dimension.
Returns the [`SuperOperator`](@ref) form of `B` acting on the right of the density matrix operator: ``\mathcal{O} \left(\hat{B}\right) \left[ \hat{\rho} \right] = \hat{\rho} \hat{B}``.
100
96
@@ -105,12 +101,9 @@ Since the density matrix is vectorized in [`OperatorKet`](@ref) form: ``|\hat{\r
105
101
```
106
102
(see the section in documentation: [Superoperators and Vectorized Operators](@ref doc:Superoperators-and-Vectorized-Operators) for more details)
107
103
108
-
The optional argument `Id_cache` can be used to pass a precomputed identity matrix. This can be useful when the same function is applied multiple times with a known Hilbert space dimension.
The optional argument `Id_cache` can be used to pass a precomputed identity matrix. This can be useful when the same function is applied multiple times with a known Hilbert space dimension.
145
-
146
137
See also [`spre`](@ref), [`spost`](@ref), and [`sprepost`](@ref).
The optional argument `Id_cache` can be used to pass a precomputed identity matrix. This can be useful when the same function is applied multiple times with a known Hilbert space dimension.
183
-
184
172
See also [`spre`](@ref), [`spost`](@ref), and [`lindblad_dissipator`](@ref).
185
173
186
174
!!! warning "Beware of type-stability!"
187
175
If you want to keep type stability, it is recommended to use `assume_hermitian = Val(true)` instead of `assume_hermitian = true`. 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/spin_lattice.jl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -53,11 +53,11 @@ function multisite_operator(dims::Union{AbstractVector,Tuple}, pairs::Pair{<:Int
53
53
54
54
_dims[sites] == [get_dimensions_to(op)[1].size for op in ops] ||throw(ArgumentError("The dimensions of the operators do not match the dimensions of the lattice."))
55
55
56
-
data =kron(I(prod(_dims[1:(sites[1]-1)])), ops[1].data)
56
+
data =kron(Eye(prod(_dims[1:(sites[1]-1)])), ops[1].data)
57
57
for i in2:length(sites)
58
-
data =kron(data, I(prod(_dims[(sites[i-1]+1):(sites[i]-1)])), ops[i].data)
58
+
data =kron(data, Eye(prod(_dims[(sites[i-1]+1):(sites[i]-1)])), ops[i].data)
59
59
end
60
-
data =kron(data, I(prod(_dims[(sites[end]+1):end])))
60
+
data =kron(data, Eye(prod(_dims[(sites[end]+1):end])))
61
61
62
62
returnQuantumObject(data; type =Operator(), dims = dims)
0 commit comments