11"""
2- ` OperatorStyle`
2+ abstract type OperatorStyle end
33
44Holy trait used as a dispatch tag for operator representations.
55Concrete subtypes (`MPOStyle` and `HamiltonianStyle`) indicate
6- whether an operator is stored as an MPO or as a Hamiltonian.
7- Use `OperatorStyle` in method signatures to select implementation-
8- specific code paths for different operator types.
6+ whether an operator represents a Hamiltonian operator (sum of terms)
7+ or a transfer matrix (product of factors).
98
109To opt a custom operator type into this dispatch scheme implement:
1110```julia
12- OperatorStyle(::T) where {T<: YourOperatorType}
11+ OperatorStyle(::T) where {T <: YourOperatorType}
1312```
1413"""
1514abstract type OperatorStyle end
@@ -21,17 +20,16 @@ struct HamiltonianStyle <: OperatorStyle end
2120
2221
2322"""
24- ` GeometryStyle`
23+ abstract type GeometryStyle end
2524
2625Holy trait used as a dispatch tag to distinguish between different
2726geometries Concrete subtypes
28- (`FiniteChainStyle`, `InfiniteChainStyle` and `WindowChainStyle`) indicate whether a system is
29- finite, infinite or a finite window in an infinite chain. Use `GeometryStyle` in method signatures to
30- select implementation-specific code paths for different types.
27+ (`FiniteChainStyle`, `InfiniteChainStyle`) indicate whether a system is
28+ a finite or infinite chain.
3129
3230To opt a custom type into this dispatch scheme implement:
3331```julia
34- GeometryStyle(::T) where {T<: YourType}
32+ GeometryStyle(::T) where {T <: YourType}
3533```
3634"""
3735abstract type GeometryStyle end
@@ -40,4 +38,3 @@ GeometryStyle(T::Type) = throw(MethodError(GeometryStyle, T)) # avoid stackoverf
4038
4139struct FiniteChainStyle <: GeometryStyle end
4240struct InfiniteChainStyle <: GeometryStyle end
43- struct WindowChainStyle <: GeometryStyle end
0 commit comments