paulie.classifier.classification.Classification#

class paulie.classifier.classification.Classification#

Bases: object

Algebra classification class.

add(morph)#

Add a canonical graph inside the full algebra.

Parameters:

morph (Morph) – A canonical graph inside the full algebra.

Returns:

None

contains_algebra(algebra)#

Check if an algebra has a corresponding canonical subgraph within this algebra.

Parameters:

algebra (str) – Name of algebra.

Returns:

True if algebra has a corresponding canonical subgraph within this algebra.

Return type:

bool

gen_generators()#

Generate the generators of this algebra.

Yields:

List of generators.

get_algebra()#

Get the full algebra as a direct sum over the algebras of each canonical subgraph.

Returns:

The full algebra.

Return type:

str

get_algebra_basis()#

Constructs and returns the basis matrices for the algebras present in the classification.

Aggregates algebra properties (type, size, and multiplicity) from the morphological classification and generates a combined basis representation.

Returns:

A 3D array of shape (dim, n, n) containing the concatenated basis matrices for all identified subalgebras.

Return type:

np.ndarray

Raises:
  • ValueError – If the identified algebra size is invalid for basis generation.

  • TypeError – If the classification properties are not properly initialized.

get_dependents()#

Get a list of dependent strings of Pauli algebra.

Returns:

List of dependent strings of Pauli algebra.

Return type:

list[PauliString]

get_dla_dim()#

Get the dimension of the classified dynamical Lie algebra.

Returns:

Dimension of the classified dynamical Lie algebra.

Return type:

int

get_independents()#

Get a list of independent strings of Pauli algebra.

Returns:

List of dependent strings of Pauli algebra.

Return type:

list[PauliString]

get_isomorphism(algebra)#

Get an isomorphic algebra.

Parameters:

algebra (str) – Name of algebra.

Returns:

Isomorphic algebra, or None if no isomorphism is known.

Return type:

str | None

get_isomorphisms()#

Get dictionary of special isomorphisms between Lie algebras.

Returns:

Dictionary of special isomorphisms between Lie algebras.

Return type:

dict[str,str]

get_morphs()#

Get the canonical subgraphs of the full algebra.

Returns:

Set of canonical subgraphs of the full algebra.

Return type:

set[Morph]

get_orthogonal_size()#

Get the \(m\) for which this algebra is (isomorphic to) \(so(m)\).

\(so(m)\) has dimension \(m(m-1)/2\), so \(m\) is fixed by the dimension; the verdict is then is_algebra(), which canonicalises both sides through the low-rank isomorphisms. An algebra reported as 2*so(3) is therefore recognised as so(4).

Returns:

The size \(m\), or None if the algebra has no \(so(m)\) presentation.

Return type:

int | None

get_simple_component()#

Get the unique simple summand of the algebra.

Returns:

The summand, e.g. "so(8)".

Return type:

str

Raises:

ClassificationException – If the algebra is not simple.

get_subalgebras(algebra=None)#

Get the subalgebras of an algebra.

Parameters:

algebra (str, optional) – Name of algebra. Defaults to None, in which case the subalgebras of this algebra are returned.

Returns:

List of subalgebras.

Return type:

list[str]

get_vertices()#

Get the list of Pauli strings in this algebra.

Returns:

List of Pauli strings in this algebra.

Return type:

list[PauliString]

is_algebra(algebra)#

Check if an algebra is equal to this algebra.

Parameters:

algebra (str) – Name of algebra.

Returns:

True if the algebra matches this algebra.

Return type:

bool

is_simple()#

Check whether the algebra is a single simple factor.

Returns:

True if the algebra has one summand with multiplicity one.

Return type:

bool