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: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
- Change default solver detection in `eigensolve` when using `sigma` keyword argument (shift-inverse algorithm). If the operator is a `SparseMatrixCSC`, the default solver is `UMFPACKFactorization`, otherwise it is automatically chosen by LinearSolve.jl, depending on the type of the operator. ([#580])
11
11
- Add keyword argument `assume_hermitian` to `liouvillian`. This allows users to disable the assumption that the Hamiltonian is Hermitian. ([#581])
12
12
- Use LinearSolve's internal methods for preconditioners in `SteadyStateLinearSolver`. ([#588])
13
+
- Use `FillArrays.jl` for handling superoperators. This makes the code cleaner and potentially more efficient. ([#589])
"The argument `Id_cache` for `spre` is now deprecated, as we now internally use FillArrays.jl, which preserves the same efficiency without requiring this parameter.",
"The argument `Id_cache` for `spost` is now deprecated, as we now internally use FillArrays.jl, which preserves the same efficiency without requiring this parameter.",
"The argument `Id_cache` for `lindblad_dissipator` is now deprecated, as we now internally use FillArrays.jl, which preserves the same efficiency without requiring this parameter.",
163
+
:lindblad_dissipator,
164
+
force =true,
165
+
)
166
+
returnlindblad_dissipator(C)
167
+
end
168
+
169
+
functionliouvillian(
170
+
H::QuantumObject{HOpType},
171
+
c_ops::AbstractVector,
172
+
Id_cache;
173
+
kwargs...,
174
+
) where {HOpType<:Union{Operator,SuperOperator}}
175
+
Base.depwarn(
176
+
"The argument `Id_cache` for `liouvillian` is now deprecated, as we now internally use FillArrays.jl, which preserves the same efficiency without requiring this parameter.",
Copy file name to clipboardExpand all lines: src/qobj/states.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -149,10 +149,10 @@ The `dimensions` can be either the following types:
149
149
If you want to keep type stability, it is recommended to use `maximally_mixed_dm(dimensions)` with `dimensions` as `Tuple` or `SVector` from [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl) to keep type stability. See the [related Section](@ref doc:Type-Stability) about type stability for more details.
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
78
@@ -86,15 +83,12 @@ Since the density matrix is vectorized in [`OperatorKet`](@ref) form: ``|\hat{\r
86
83
```
87
84
(see the section in documentation: [Superoperators and Vectorized Operators](@ref doc:Superoperators-and-Vectorized-Operators) for more details)
88
85
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
94
@@ -105,12 +99,9 @@ Since the density matrix is vectorized in [`OperatorKet`](@ref) form: ``|\hat{\r
105
99
```
106
100
(see the section in documentation: [Superoperators and Vectorized Operators](@ref doc:Superoperators-and-Vectorized-Operators) for more details)
107
101
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
135
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
170
See also [`spre`](@ref), [`spost`](@ref), and [`lindblad_dissipator`](@ref).
185
171
186
172
!!! warning "Beware of type-stability!"
187
173
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