Class qsymmetry#

Class Documentation#

class qsymmetry#

Public Functions

inline qsymmetry()#

Default constructor initializes base symmetry identifier.

Creates an empty symmetry object with only the base “qsymmetry” label. Additional symmetries should be added via add_symmetry().

inline void add_symmetry(const std::string &_id)#

Add a quantum number symmetry to the system.

Registers a new conserved quantum number/symmetry for this system. Examples: “charge”, “spin”, “particle_number”, “parity”

Note

Multiple identical symmetries can be added; no uniqueness checking

Note

Order of addition is preserved for later reference

Parameters:

_id – String identifier for the symmetry (should be descriptive)

inline size_t get_symmetry_size() const#

Get the total number of symmetries (excluding base).

Note

Does not include the base “qsymmetry” identifier

Returns:

Number of symmetries that have been added via add_symmetry()

inline void print_symmetry() const#

Print all symmetries to console output.

Displays a formatted list of all symmetries including the base identifier. Useful for debugging and verifying symmetry setup.

Note

Output format: “Symmetry of this model:” followed by indented list