|
Cytnx v1.0.0
|
the symmetry object More...
#include <Symmetry.hpp>
Public Member Functions | |
| Symmetry | clone () const |
| return a clone instance of current Symmetry object. | |
| int | stype () const |
| return the symmetry type-id of current Symmetry object, see cytnx::SymmetryType:: | |
| int & | n () const |
| return the discrete n of current Symmetry object. | |
| std::string | stype_str () const |
| return the symmetry type name of current Symmetry object in string form, see cytnx::SymmetryType:: | |
| bool | check_qnum (const cytnx_int64 &qnum) |
check the quantum number qnum is within the valid value range of current Symmetry. | |
| bool | check_qnums (const std::vector< cytnx_int64 > &qnums) |
| check all the quantum numbers \qnums are within the valid value range of current Symmetry. | |
| std::vector< cytnx_int64 > | combine_rule (const std::vector< cytnx_int64 > &inL, const std::vector< cytnx_int64 > &inR) |
| apply combine rule of current symmetry to two quantum number lists. | |
| void | combine_rule_ (std::vector< cytnx_int64 > &out, const std::vector< cytnx_int64 > &inL, const std::vector< cytnx_int64 > &inR) |
apply combine rule of current symmetry to two quantum number lists, and store it into parameter out. | |
| cytnx_int64 | combine_rule (const cytnx_int64 &inL, const cytnx_int64 &inR, const bool &is_reverse=false) const |
| apply combine rule of current symmetry to two quantum numbers. | |
| void | combine_rule_ (cytnx_int64 &out, const cytnx_int64 &inL, const cytnx_int64 &inR, const bool &is_reverse=false) |
| apply combine rule of current symmetry to two quantum numbers, and store the combined quntun number into parameter | |
| void | reverse_rule_ (cytnx_int64 &out, const cytnx_int64 &in) |
Apply reverse rule of current symmetry to a given quantum number and store in parameter out. | |
| cytnx_int64 | reverse_rule (const cytnx_int64 &in) const |
| Apply reverse rule of current symmetry to a given quantum number and return the result. | |
| fermionParity | get_fermion_parity (const cytnx_int64 &in_qnum) const |
| fermionic parity for a given quantum number | |
| bool | is_fermionic () const |
| check if the Symmetry is fermionic or not | |
| void | Save (const std::string &fname) const |
| Save the current Symmetry object to a file. | |
| void | Save (const char *fname) const |
| Same as Save(const std::string &fname) const;. | |
| void | print_info () const |
| Print the information of current Symmetry object. | |
| bool | operator== (const Symmetry &rhs) const |
| the equality operator of the Symmetry object. | |
| bool | operator!= (const Symmetry &rhs) const |
| the inequality operator of the Symmetry object. | |
Static Public Member Functions | |
| static Symmetry | U1 () |
| create a U1 symmetry object | |
| static Symmetry | Zn (const int &n) |
| create a Zn discrete symmetry object with \(n\in\mathbb{N}\) | |
| static Symmetry | FermionParity () |
| create a fermionic parity symmetry object | |
| static Symmetry | FermionNumber () |
| create a fermionic occupation number symmetry object | |
| static Symmetry | Load (const std::string &fname) |
| Load a Symmetry object from a file. | |
| static Symmetry | Load (const char *fname) |
| Same as static Symmetry Load(const std::string &fname);. | |
the symmetry object
|
inline |
check the quantum number qnum is within the valid value range of current Symmetry.
| [in] | qnum | a singule quantum number. |
|
inline |
check all the quantum numbers \qnums are within the valid value range of current Symmetry.
| [in] | qnums | the list of quantum numbers |
|
inline |
return a clone instance of current Symmetry object.
1 1 0 1
True True False True
|
inline |
apply combine rule of current symmetry to two quantum numbers.
| [in] | inL | the #1 quantum number. |
| [in] | inR | the #2 quantum number. |
|
inline |
apply combine rule of current symmetry to two quantum number lists.
| [in] | inL | the #1 quantum number list that is to be combined. |
| [in] | inR | the #2 quantum number list that is to be combined. |
|
inline |
apply combine rule of current symmetry to two quantum numbers, and store the combined quntun number into parameter
| out. | ||
| [out] | out | the output quantum number. |
| [in] | inL | the #1 quantum number. |
| [in] | inR | the #2 quantum number. |
|
inline |
apply combine rule of current symmetry to two quantum number lists, and store it into parameter out.
| [out] | out | the output quantum number list. |
| [in] | inL | the #1 quantum number list that is to be combined. |
| [in] | inR | the #2 quantum number list that is to be combined. |
|
inlinestatic |
create a fermionic occupation number symmetry object
\f$(-\infty , \infty)\f$
Q + Q
create a new fermionic occupation number object that serves as a generator. This is a U1 symmetry with parity defined as EVEN for even occupation numbers and ODD for odd occupation numbers. The symmetry object is a property of Bond . It is used to identify the symmetry of the quantum number set, as well as providing the combining rule for the quantum number when Bonds are combined.
|
inlinestatic |
create a fermionic parity symmetry object
\f$[0 , 1]\f$
where 0 corresponds to even parity and 1 to odd parity;
(Q + Q)%2
create a new fermionic parity symmetry object that serves as a generator. The symmetry object is a property of Bond . It is used to identify the symmetry of the quantum number set, as well as providing the combining rule for the quantum number when Bonds are combined.
|
inline |
fermionic parity for a given quantum number
| [in] | in_qnum | quantum number |
|
inline |
|
static |
Same as static Symmetry Load(const std::string &fname);.
|
static |
|
inline |
return the discrete n of current Symmetry object.
| bool cytnx::Symmetry::operator!= | ( | const Symmetry & | rhs | ) | const |
the inequality operator of the Symmetry object.
| bool cytnx::Symmetry::operator== | ( | const Symmetry & | rhs | ) | const |
the equality operator of the Symmetry object.
|
inline |
Print the information of current Symmetry object.
|
inline |
Apply reverse rule of current symmetry to a given quantum number and return the result.
that means, \( o = -i \), where \( o \) is the reverse quantum number, and \( i \) is the input quantum number in.
| [in] | in | the input quantum number. |
|
inline |
Apply reverse rule of current symmetry to a given quantum number and store in parameter out.
that means, \( o = -i \), where \( o \) is the output quantum number out, and \( i \) is the input quantum number in.
| [out] | out | the output quantum number. |
| [in] | in | the input quantum number. |
| void cytnx::Symmetry::Save | ( | const char * | fname | ) | const |
Same as Save(const std::string &fname) const;.
| void cytnx::Symmetry::Save | ( | const std::string & | fname | ) | const |
Save the current Symmetry object to a file.
| [in] | fname | the file name. |
|
inline |
return the symmetry type-id of current Symmetry object, see cytnx::SymmetryType::
|
inline |
return the symmetry type name of current Symmetry object in string form, see cytnx::SymmetryType::
|
inlinestatic |
create a U1 symmetry object
\f$(-\infty , \infty)\f$
Q + Q
create a new U1 symmetry object that serves as a generator. The symmetry object is a property of Bond . It is used to identify the symmetry of the quantum number set, as well as providing the combining rule for the quantum number when Bonds are combined.
Dim = 4 |type: KET> U1:: +0 -4 -2 +3 Dim = 4 |type: KET> U1:: +0 -4 -2 +3 1 Dim = 5 |type: KET> U1:: -1 +1 +2 -2 +0 Dim = 20 |type: KET> U1:: -1 +1 +2 -2 +0 -5 -3 -2 -6 -4 -3 -1 +0 -4 -2 +2 +4 +5 +1 +3
Dim = 4 |type: KET> U1:: +0 -4 -2 +3 Dim = 4 |type: KET> U1:: +0 -4 -2 +3 True Dim = 5 |type: KET> U1:: -1 +1 +2 -2 +0 Dim = 20 |type: KET> U1:: -1 +1 +2 -2 +0 -5 -3 -2 -6 -4 -3 -1 +0 -4 -2 +2 +4 +5 +1 +3 Dim = 4 |type: KET> U1:: +0 -4 -2 +3 Deg>> 1 1 1 1 Dim = 4 |type: KET> U1:: +0 -4 -2 +3 Deg>> 1 1 1 1 True Dim = 5 |type: KET> U1:: -1 +1 +2 -2 +0 Deg>> 1 1 1 1 1 Dim = 20 |type: KET> U1:: -6 -5 -4 -3 -2 -1 +0 +1 +2 +3 +4 +5 Deg>> 1 1 2 2 3 2 2 2 2 1 1 1
|
inlinestatic |
create a Zn discrete symmetry object with \(n\in\mathbb{N}\)
\f$[0 , n)\f$
(Q + Q)%n
create a new Zn discrete symmetry object with integer \( n \) that serves as a generator. The symmetry object is a property of Bond . It is used to identify the symmetry of the quantum number set, as well as providing the combining rule for the quantum number when Bonds are combined.
Dim = 4 |type: KET> Z2:: +0 +0 +1 +1 Dim = 3 |type: KET> Z2:: +0 +1 +1 Dim = 12 |type: KET> Z2:: +0 +1 +1 +0 +1 +1 +1 +0 +0 +1 +0 +0 Dim = 4 |type: KET> Z4:: +0 +3 +1 +2 Dim = 3 |type: KET> Z4:: +2 +3 +1 Dim = 12 |type: KET> Z4:: +2 +3 +1 +1 +2 +0 +3 +0 +2 +0 +1 +3
Dim = 4 |type: KET> Z2:: +0 +0 +1 +1 Dim = 3 |type: KET> Z2:: +0 +1 +1 Dim = 12 |type: KET> Z2:: +0 +1 +1 +0 +1 +1 +1 +0 +0 +1 +0 +0 Dim = 4 |type: KET> Z4:: +0 +3 +1 +2 Dim = 3 |type: KET> Z4:: +2 +3 +1 Dim = 12 |type: KET> Z4:: +2 +3 +1 +1 +2 +0 +3 +0 +2 +0 +1 +3 Dim = 4 |type: KET> Z2:: +0 +0 +1 +1 Deg>> 1 1 1 1 Dim = 3 |type: KET> Z2:: +0 +1 +1 Deg>> 1 1 1 Dim = 12 |type: KET> Z2:: +0 +1 Deg>> 6 6 Dim = 4 |type: KET> Z4:: +0 +3 +1 +2 Deg>> 1 1 1 1 Dim = 3 |type: KET> Z4:: +2 +3 +1 Deg>> 1 1 1 Dim = 12 |type: KET> Z4:: +0 +1 +2 +3 Deg>> 3 3 3 3