#include <Gncon.hpp>
|
| static Gncon | Contract (const std::vector< UniTensor > &tensors, const std::string &Tout, const std::vector< std::string > &alias={}, const std::string &contract_order="") |
| |
◆ Gncon()
| cytnx::Gncon::Gncon |
( |
const std::string & |
fname, |
|
|
const int & |
Gncon_type = GNType.Regular |
|
) |
| |
|
inline |
◆ clear()
| void cytnx::Gncon::clear |
( |
| ) |
|
|
inline |
◆ clone()
| Gncon cytnx::Gncon::clone |
( |
| ) |
|
|
inline |
◆ Contract()
| static Gncon cytnx::Gncon::Contract |
( |
const std::vector< UniTensor > & |
tensors, |
|
|
const std::string & |
Tout, |
|
|
const std::vector< std::string > & |
alias = {}, |
|
|
const std::string & |
contract_order = "" |
|
) |
| |
|
inlinestatic |
◆ Fromfile()
| void cytnx::Gncon::Fromfile |
( |
const std::string & |
fname, |
|
|
const int & |
Gncon_type = GNType.Regular |
|
) |
| |
|
inline |
Construct Gncon from Gncon file.
- Parameters
-
| fname | The Gncon file path |
| Gncon_type | The type of Gncon. This can be [GNType.Regular] or [GNType.Fermion.]. Currently, only Regular Gncon is support! |
note:
- each Gncon file cannot have more than 1024 lines.
detail:
Format of a Gncon file:
- each line defines a UniTensor, that takes the format '[name] : [Labels]'
- the name can be any alphabets A-Z, a-z
- There are two reserved name: 'TOUT' and 'ORDER' (all capital)
- One can use 'TOUT' line to specify the output UniTensor's bond order using labels
- The 'ORDER' line is used to specify the contraction order
About [Labels]:
- each label should seperate by a comma ","
- one ';' is needed and used to seperate Rowrank and column rank
About [ORDER]:
- The contraction order, it can be specify using the standard mathmetical bracket ruls.
- Without specify this line, the default contraction order will be from the first line to the last line
example Gncon file:
example code for load the Gncon file:
c++ API:
output>
python API
output>
◆ FromString()
| void cytnx::Gncon::FromString |
( |
const std::vector< std::string > & |
contents, |
|
|
const int & |
Gncon_type = GNType.Regular |
|
) |
| |
|
inline |
Construct Gncon from a list of strings, where each string is the same as each line in Gncon file.
- Parameters
-
| contents | The Gncon file descriptions |
| Gncon_type | The type of Gncon. This can be [GNType.Regular] or [GNType.Fermion.]. Currently, only Regular Gncon is support! |
note:
- contents cannot have more than 1024 lines/strings.
detail:
Format of each string follows the same policy as Fromfile.
example code for load the Gncon file:
c++ API:
output>
python API
output>
◆ getOptimalOrder()
| std::string cytnx::Gncon::getOptimalOrder |
( |
const int & |
Gncon_type = GNType.Regular | ) |
|
|
inline |
◆ Launch()
| UniTensor cytnx::Gncon::Launch |
( |
const bool & |
optimal, |
|
|
const std::string & |
contract_order = "", |
|
|
const int & |
Gncon_type = GNType.Regular |
|
) |
| |
|
inline |
◆ PrintNet()
| void cytnx::Gncon::PrintNet |
( |
| ) |
|
|
inline |
◆ PutUniTensor() [1/2]
◆ PutUniTensor() [2/2]
| void cytnx::Gncon::PutUniTensor |
( |
const std::string & |
name, |
|
|
const UniTensor & |
utensor |
|
) |
| |
|
inline |
◆ PutUniTensors()
| void cytnx::Gncon::PutUniTensors |
( |
const std::vector< std::string > & |
name, |
|
|
const std::vector< UniTensor > & |
utensors |
|
) |
| |
|
inline |
◆ Savefile()
| void cytnx::Gncon::Savefile |
( |
const std::string & |
fname | ) |
|
|
inline |
The documentation for this class was generated from the following file: