amc.error module

Error classes for the AMC package.

exception amc.error.Error

Bases: Exception

Base class for all AMC exceptions.

exception amc.error.GraphNotOrientableError(offending_pairs)

Bases: amc.error.Error

Exception signaling that the Yutsis graph is not orientable.

Parameters
offending_pairsset of amc.yutsis.ThreeJM pairs

Set of pairs that could not be properly oriented. The second member of the pair could not be oriented to fulfill its constraints. The first member that provided the constraint that, if fulfilled, violates a constraint from another or the same 3jm symbol.

exception amc.error.GraphNotReducibleError

Bases: amc.error.Error

Exception signaling that the Yutsis graph could not be completely reduced.

exception amc.error.ReductionError(term, lhs, term_number=None)

Bases: amc.error.Error

Exception signaling an error during the angular-momentum reduction.

Parameters
lhsamc.ast.Variable

Left-hand side of the corresponding equation.

termamc.ast.AST

Term that caused the error.

term_numberint

Index the term inside its equation (0-based).