dyson.representations.enums#

Enumerations for representations.

Classes

Component(*values)

Enumeration for the component of the dynamic representation.

Ordering(*values)

Enumeration for the time ordering of the dynamic representation.

Reduction(*values)

Enumeration for the reduction of the dynamic representation.

RepresentationEnum(new_class_name, /, names, *)

Base enumeration for representations.

class dyson.representations.enums.RepresentationEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Base enumeration for representations.

raise_invalid_representation() None[source]#

Raise an error for invalid representation.

class dyson.representations.enums.Reduction(*values)[source]#

Bases: RepresentationEnum

Enumeration for the reduction of the dynamic representation.

The valid reductions are:

  • none: No reduction, i.e. the full 2D array.

  • diag: Reduction to the diagonal, i.e. a 1D array of diagonal elements.

  • trace: Reduction to the trace, i.e. a scalar value.

NONE = 'none'#
DIAG = 'diag'#
TRACE = 'trace'#
property ndim: int#

Get the number of dimensions of the array for this reduction.

class dyson.representations.enums.Component(*values)[source]#

Bases: RepresentationEnum

Enumeration for the component of the dynamic representation.

The valid components are:

  • full: The full (real-valued or complex-valued) representation.

  • real: The real part of the representation.

  • imag: The imaginary part of the representation, represented as a real-valued array.

FULL = 'full'#
REAL = 'real'#
IMAG = 'imag'#
property ncomp: int#

Get the number of components for this component type.

class dyson.representations.enums.Ordering(*values)[source]#

Bases: RepresentationEnum

Enumeration for the time ordering of the dynamic representation.

The valid orderings are:

  • ordered: Time-ordered representation.

  • advanced: Advanced representation, i.e. affects the past (non-causal).

  • retarded: Retarded representation, i.e. affects the future (causal).

ORDERED = 'ordered'#
ADVANCED = 'advanced'#
RETARDED = 'retarded'#