Public handle to a canonicalized direct-product symmetry specification.
More...
#include <symmetry.hpp>
|
| auto | factor_count () const -> std::size_t |
| | Return the number of direct-product factors.
|
| |
| auto | factors () const -> std::span< detail::SymmetryFactorSpec const > |
| | Return the named factor list.
|
| |
| auto | impl () const -> detail::SymmetryImpl const * |
| | Return the internal canonical symmetry implementation pointer.
|
| |
| auto | operator== (Symmetry const &other) const -> bool=default |
| | Compare two symmetry handles for canonical identity.
|
| |
| | Symmetry ()=default |
| | Construct an invalid symmetry handle.
|
| |
| | Symmetry (detail::SymmetryImpl const *impl) |
| | Construct from a canonical implementation pointer.
|
| |
| | Symmetry (std::string_view spec) |
| | Construct a symmetry from its string specification.
|
| |
| auto | to_string () const -> std::string |
| | Return the canonical string spelling of this symmetry.
|
| |
| auto | valid () const -> bool |
| | Return whether this handle refers to a valid symmetry.
|
| |
|
| static auto | parse (std::string_view spec) -> Symmetry |
| | Parse a string specification such as "N:U(1),Sz:U(1)".
|
| |
Public handle to a canonicalized direct-product symmetry specification.
The intended frontend construction path is string-based, for example "N:U(1),Sz:U(1)". See docs/symmetry/qnum.md.
◆ Symmetry() [1/3]
| uni20::Symmetry::Symmetry |
( |
| ) |
|
|
default |
Construct an invalid symmetry handle.
◆ Symmetry() [2/3]
| uni20::Symmetry::Symmetry |
( |
std::string_view |
spec | ) |
|
|
inlineexplicit |
Construct a symmetry from its string specification.
- Parameters
-
| spec | String specification such as "N:U(1),Sz:U(1)". |
◆ Symmetry() [3/3]
| uni20::Symmetry::Symmetry |
( |
detail::SymmetryImpl const * |
impl | ) |
|
|
inlineexplicit |
Construct from a canonical implementation pointer.
- Parameters
-
| impl | Canonical implementation pointer. |
◆ factor_count()
| auto uni20::Symmetry::factor_count |
( |
| ) |
const -> std::size_t
|
|
inline |
Return the number of direct-product factors.
- Returns
- Number of named factors.
◆ factors()
| auto uni20::Symmetry::factors |
( |
| ) |
const -> std::span<detail::SymmetryFactorSpec const>
|
|
inline |
Return the named factor list.
- Returns
- Read-only view of the factor specifications.
◆ impl()
| auto uni20::Symmetry::impl |
( |
| ) |
const -> detail::SymmetryImpl const*
|
|
inline |
Return the internal canonical symmetry implementation pointer.
- Returns
- Canonical implementation pointer used for equality and dispatch.
◆ operator==()
| auto uni20::Symmetry::operator== |
( |
Symmetry const & |
other | ) |
const -> bool=default |
|
default |
Compare two symmetry handles for canonical identity.
- Parameters
-
| other | Other symmetry handle. |
- Returns
true when both handles refer to the same canonical symmetry.
◆ parse()
| static auto uni20::Symmetry::parse |
( |
std::string_view |
spec | ) |
-> Symmetry |
|
inlinestatic |
Parse a string specification such as "N:U(1),Sz:U(1)".
- Parameters
-
| spec | String specification to parse. |
- Returns
- Canonicalized symmetry handle.
◆ to_string()
| auto uni20::Symmetry::to_string |
( |
| ) |
const -> std::string
|
|
inline |
Return the canonical string spelling of this symmetry.
- Returns
- Canonical string form.
◆ valid()
| auto uni20::Symmetry::valid |
( |
| ) |
const -> bool |
|
inline |
Return whether this handle refers to a valid symmetry.
- Returns
true if this handle refers to canonical symmetry state.
The documentation for this class was generated from the following file: