Internal types

Documented types that are neither exported nor public. They may change in a minor release.

FermionicHilbertSpaces.AbstractBasisState — Type
AbstractBasisState

Supertype of basis-state types such as FockNumber, BosonicState and SpinState. A space may use any type for its states, as in GenericHilbertSpace(:A, [:a, :b]); subtyping AbstractBasisState lets strings name the states (see interpret_state) and lets constrained spaces look up states of other types (they get index 0).

source
FermionicHilbertSpaces.AbstractSubspace — Type
AbstractSubspace{B,P} <: AbstractHilbertSpace{B}

A space spanned by some of the basis states of parent(H)::P. A subtype implements

  • parent(H): the space that H is a subspace of. It is never an AbstractSubspace.
  • subspace_states(H): the basis states of H, in order, each appearing once.
  • subspace_index(H): an index with a state_position method for the states of H, such as default_subspace_index(constraint, parent(H), subspace_states(H)), built once by the constructor.
  • rewrap(H, newparent): the space with the same states and index as H over newparent, which has the same basis states and state_index as parent(H).

It may also implement subspace_key(H), the values compared by == and hash, which defaults to (parent(H), subspace_states(H)), and show_details(io, H), printed after the parent by show.

The states are meant to be basis states of parent(H), but this is not checked. Some spaces store other states over a FermionicSpace parent: hilbert_space(f, labels, states) with FixedNumberFockStates, FreeFermions.BdG spaces with FreeFermions.NambuStates and FreeFermions.SingleParticle spaces with FreeFermions.SingleParticleStates.

A subtype gets dim, basisstates, basisstate, state_index, ==, hash, show, add_tag and TransposedSpace. The functions that describe its modes and apply operators are forwarded to parent(H), so that matrix representations, tensor products, partial traces, subregion and constrain_space work on it.

source
FermionicHilbertSpaces.FullPartialTraceAlg — Type
FullPartialTraceAlg()

Partial-trace algorithm that visits pairs of basis states of the full space, or the stored elements of a sparse input. It is an option for the alg keyword of partial_trace and of the maps partial_trace(H => Hsub) and embed(Hsub => H). It is faster for sparse inputs and for constrained spaces with few states compared to the subsystem and its complement combined.

source
FermionicHilbertSpaces.IndexTable — Type
IndexTable(positions)

A subspace index whose positions[state_index(state, parent)] is the position of state, or 0 for a state of parent outside the subspace.

source
FermionicHilbertSpaces.LazyOperator — Type
LazyOperator{O,S,T,C,P}

A matrix-free (lazy) representation of a symbolic operator on a Hilbert space. Acts directly on vectors and matrices without constructing a sparse matrix.

representation(op, space, :lazy) returns a SciMLOperators.FunctionOperator that wraps a LazyOperator. The bare LazyOperator is available as LazyOperator(op, space, chunking).

source
FermionicHilbertSpaces.LazyRepr — Type
LazyRepr(input=missing)

Format argument of representation that gives a matrix-free SciMLOperators operator wrapping a LazyOperator, the same as :lazy. input is the kind of vector the operator is prepared for: :dense, :sparse, or an array whose type and size are used. With missing, a dense vector is used for small spaces and a sparse one otherwise.

source
FermionicHilbertSpaces.PartialTransposeMap — Type
PartialTransposeMap

Callable partial-transpose superoperator created by partial_transpose(H, Hsub; kwargs...) or partial_transpose(H => Hout, Hsub; kwargs...). Apply it as op(m), op(ψ) (pure state) or op(out, m); get the sparse matrix with sparse(op).

source
FermionicHilbertSpaces.PartitionedSparseRepr — Type
PartitionedSparseRepr(; backend, row_partition=nothing, col_partition=nothing, nparts=4)

Format argument of representation that builds a distributed sparse matrix with PartitionedArrays.jl. backend is applied to the part indices, for example DebugArray or distribute_with_mpi. Without explicit partitions, rows and columns are split uniformly into nparts parts. Requires using PartitionedArrays.

source
FermionicHilbertSpaces.Passthrough — Type

A source factor that goes unchanged into exactly one target slot. The trivial inner mapper is kept only for phase-factor computation; split/combine bypass it entirely.

source
FermionicHilbertSpaces.PieceIndex — Type
PieceIndex{block, slot}

A routing index carried in the type domain. getpiece(blocks, ref) extracts blocks[block][slot] with compile-time-known indices, so heterogeneous tuples can be indexed without type instability.

source
FermionicHilbertSpaces.ProductSpaceMapper — Type
ProductSpaceMapper(source::ProductSpace, targets)

Mapper between source and the partition (or sub-collection) targets.

Fields:

  • leaves : per source factor, an Uncovered, Passthrough or Fractured leaf describing how that factor fractures.
  • factor_routes : per source factor, one PieceIndex{target, group_slot} per piece (in the factor's piece order). Drives combine.
  • target_routes : per target, one PieceIndex{factor, piece_slot} per group (in the target's group order). Drives split.
  • target_spaces : the targets themselves.

factor_routes and target_routes are the two directional views of the same piece table; they are exact inverses of each other by construction.

source
FermionicHilbertSpaces.RootIndexDict — Type
RootIndexDict(positions)

A subspace index whose positions[state_index(state, parent)] is the position of state. It is keyed by the integer index rather than by the state because integers hash and compare faster.

source
FermionicHilbertSpaces.SubsystemPartialTraceAlg — Type
SubsystemPartialTraceAlg()

Partial-trace algorithm that combines every basis state of the subsystem with every basis state of the complement. It is an option for the alg keyword of partial_trace and of the maps partial_trace(H => Hsub) and embed(Hsub => H). It is faster when the subsystem and its complement have few states compared to the full space.

source