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
Represents a general linear map with element type `T` and size `TS`.
7
+
8
+
## Overview
9
+
10
+
A **linear map** is a transformation `L` that satisfies:
11
+
12
+
- **Additivity**:
13
+
```math
14
+
L(u + v) = L(u) + L(v)
15
+
```
16
+
- **Homogeneity**:
17
+
```math
18
+
L(cu) = cL(u)
19
+
```
20
+
21
+
It is typically represented as a matrix with dimensions given by `size`, and this abtract type helps to define this map when the matrix is not explicitly available.
22
+
23
+
## Methods
24
+
25
+
- `Base.eltype(A)`: Returns the element type `T`.
26
+
- `Base.size(A)`: Returns the size `A.size`.
27
+
- `Base.size(A, i)`: Returns the `i`-th dimension.
28
+
29
+
## Example
30
+
31
+
As an example, we now define the linear map used in the [`eigsolve_al`](@ref) function for Arnoldi-Lindblad eigenvalue solver:
function LinearAlgebra.mul!(y::AbstractVector, A::ArnoldiLindbladIntegratorMap, x::AbstractVector)
41
+
reinit!(A.integrator, x)
42
+
solve!(A.integrator)
43
+
return copyto!(y, A.integrator.u)
44
+
end
45
+
```
46
+
47
+
where `integrator` is the ODE integrator for the time-evolution. In this way, we can diagonalize this linear map using the [`eigsolve`](@ref) function.
0 commit comments