|
Cytnx v0.9.1
|
Namespaces | |
| namespace | algo |
| Some basic algorithms API. | |
| namespace | linalg |
| linear algebra related functions. | |
| namespace | operators |
| namespace | physics |
| namespace | qgates |
| namespace | random |
| The randomization related functions. | |
| namespace | stat |
| namespace | tn_algo |
Classes | |
| class | Accessor |
| object that mimic the python slice to access elements in C++ [this is for c++ API only]. More... | |
| class | Bond |
| the object contains auxiliary properties for each Tensor rank (bond) More... | |
| class | Gncon |
| class | LinOp |
| class | Network |
| class | Qs |
| class | Scalar |
| A class to represent a scalar. More... | |
| class | Storage |
| an memeory storage with multi-type/multi-device support More... | |
| class | Symmetry |
| the symmetry object More... | |
| class | Tensor |
| an tensor (multi-dimensional array) More... | |
| class | UniTensor |
| An Enhanced tensor specifically designed for physical Tensor network simulation. More... | |
Typedefs | |
| template<class T > | |
| using | vec3d = std::vector< std::vector< std::vector< T > > > |
| template<class T > | |
| using | vec2d = std::vector< std::vector< T > > |
| typedef double | cytnx_double |
| typedef float | cytnx_float |
| typedef uint64_t | cytnx_uint64 |
| typedef uint32_t | cytnx_uint32 |
| typedef uint16_t | cytnx_uint16 |
| typedef int64_t | cytnx_int64 |
| typedef int32_t | cytnx_int32 |
| typedef int16_t | cytnx_int16 |
| typedef size_t | cytnx_size_t |
| typedef std::complex< float > | cytnx_complex64 |
| typedef std::complex< double > | cytnx_complex128 |
| typedef bool | cytnx_bool |
| typedef Accessor | ac |
Enumerations | |
| enum | bondType : int { BD_KET = -1 , BD_BRA = 1 , BD_REG = 0 , BD_NONE = 0 , BD_IN = -1 , BD_OUT = 1 } |
| bond type More... | |
Functions | |
| Tensor | zeros (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an rank-1 Tensor with all the elements are initialized with zero. | |
| Tensor | zeros (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an Tensor with all the elements are initialized with zero. | |
| Tensor | identity (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an square rank-2 Tensor with all diagonal to be one. | |
| Tensor | eye (const cytnx_uint64 &Dim, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an square rank-2 Tensor with all diagonal to be one. | |
| Tensor | ones (const cytnx_uint64 &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an rank-1 Tensor with all the elements are initialized with one. | |
| Tensor | ones (const std::vector< cytnx_uint64 > &Nelem, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an Tensor with all the elements are initialized with one. | |
| Tensor | arange (const cytnx_int64 &Nelem) |
| create an rank-1 Tensor with incremental unsigned integer elements start with [0,Nelem) | |
| Tensor | arange (const cytnx_double &start, const cytnx_double &end, const cytnx_double &step=1, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| create an rank-1 Tensor with elements defined in range [start,end) with assigned step-size | |
| Tensor | linspace (const cytnx_double &start, const cytnx_double &end, const cytnx_uint64 &Nelem, const bool &endpoint=true, const unsigned int &dtype=Type.Double, const int &device=Device.cpu) |
| cytnx::UniTensor | operator+ (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt) |
| The addtion operator between two UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator+ (const T &lc, const cytnx::UniTensor &Rt) |
| The addtion operator between a template type and a UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator+ (const cytnx::UniTensor &Lt, const T &rc) |
| The addtion operator between a UniTensor and a template type. | |
| cytnx::UniTensor | operator- (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt) |
| The subtraction operator between two UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator- (const T &lc, const cytnx::UniTensor &Rt) |
| The subtraction operator between a template type and a UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator- (const cytnx::UniTensor &Lt, const T &rc) |
| The subtraction operator between a UniTensor and a template type. | |
| cytnx::UniTensor | operator* (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt) |
| The multiplication operator between two UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator* (const T &lc, const cytnx::UniTensor &Rt) |
| The multiplication operator between a template type and a UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator* (const cytnx::UniTensor &Lt, const T &rc) |
| The multiplication operator between a UniTensor and a template type. | |
| cytnx::UniTensor | operator/ (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt) |
| The division operator between two UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator/ (const T &lc, const cytnx::UniTensor &Rt) |
| The division operator between a template type and a UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator/ (const cytnx::UniTensor &Lt, const T &rc) |
| The division operator between a UniTensor and a template type. | |
| cytnx::UniTensor | operator% (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt) |
| The modulo operator between two UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator% (const T &lc, const cytnx::UniTensor &Rt) |
| The modulo operator between a template type and a UniTensor. | |
| template<class T > | |
| cytnx::UniTensor | operator% (const cytnx::UniTensor &Lt, const T &rc) |
| The modulo operator between a UniTensor and a template type. | |
| Tensor | operator+ (const Tensor &Lt, const Tensor &Rt) |
| The addition operator for Tensor. | |
| template<class T > | |
| Tensor | operator+ (const T &lc, const Tensor &Rt) |
| The addition operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator+ (const Tensor &Lt, const T &rc) |
| The addition operator between Tensor and a template type. | |
| Tensor | operator- (const Tensor &Lt, const Tensor &Rt) |
| The subtraction operator for Tensor. | |
| template<class T > | |
| Tensor | operator- (const T &lc, const Tensor &Rt) |
| The subtraction operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator- (const Tensor &Lt, const T &rc) |
| The subtraction operator between Tensor and a template type. | |
| Tensor | operator* (const Tensor &Lt, const Tensor &Rt) |
| The multiplication operator for Tensor. | |
| template<class T > | |
| Tensor | operator* (const T &lc, const Tensor &Rt) |
| The multiplication operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator* (const Tensor &Lt, const T &rc) |
| The multiplication operator between Tensor and a template type. | |
| Tensor | operator/ (const Tensor &Lt, const Tensor &Rt) |
| The division operator for Tensor. | |
| template<class T > | |
| Tensor | operator/ (const T &lc, const Tensor &Rt) |
| The division operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator/ (const Tensor &Lt, const T &rc) |
| The division operator between Tensor and a template type. | |
| Tensor | operator% (const Tensor &Lt, const Tensor &Rt) |
| The mode operator for Tensor. | |
| template<class T > | |
| Tensor | operator% (const T &lc, const Tensor &Rt) |
| The mode operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator% (const Tensor &Lt, const T &rc) |
| The mode operator between Tensor and a template type. | |
| Tensor | operator== (const Tensor &Lt, const Tensor &Rt) |
| The comparison operator for Tensor. | |
| template<class T > | |
| Tensor | operator== (const T &lc, const Tensor &Rt) |
| The comparison operator between a template type and Tensor. | |
| template<class T > | |
| Tensor | operator== (const Tensor &Lt, const T &rc) |
| The comparison operator between Tensor and a template type. | |
| UniTensor | ncon (const std::vector< UniTensor > &tensor_list_in, const std::vector< std::vector< cytnx_int64 > > &connect_list_in, const bool check_network=false, const bool optimize=false, std::vector< cytnx_int64 > cont_order=std::vector< cytnx_int64 >(), const std::vector< std::string > &out_labels=std::vector< std::string >()) |
| Scalar | operator+ (const Scalar &lc, const Scalar &rs) |
| The addition operator between two Scalar objects. | |
| Scalar | operator* (const Scalar &lc, const Scalar &rs) |
| The multiplication operator between two Scalar objects. | |
| Scalar | operator- (const Scalar &lc, const Scalar &rs) |
| The subtraction operator between two Scalar objects. | |
| Scalar | operator/ (const Scalar &lc, const Scalar &rs) |
| The division operator between two Scalar objects. | |
| bool | operator< (const Scalar &lc, const Scalar &rs) |
| The less-than operator between two Scalar objects. | |
| bool | operator> (const Scalar &lc, const Scalar &rs) |
| The greater-than operator between two Scalar objects. | |
| bool | operator<= (const Scalar &lc, const Scalar &rs) |
| The less-than-or-equal operator between two Scalar objects. | |
| bool | operator>= (const Scalar &lc, const Scalar &rs) |
| The greater-than-or-equal operator between two Scalar objects. | |
| bool | operator== (const Scalar &lc, const Scalar &rs) |
| The equal operator between two Scalar objects. | |
| Scalar | abs (const Scalar &c) |
| Return the absolute value of a Scalar object. | |
| Scalar | sqrt (const Scalar &c) |
| Return the square root of a Scalar object. | |
| cytnx_complex128 | complex128 (const Scalar &in) |
| Convert a Scalar object to a cytnx::complex128. | |
| cytnx_complex64 | complex64 (const Scalar &in) |
| Convert a Scalar object to a cytnx::complex64. | |
| std::ostream & | operator<< (std::ostream &os, const Scalar &in) |
| The stream operator for Scalar objects. | |
| boost::intrusive_ptr< Storage_base > | SIInit_cd () |
| boost::intrusive_ptr< Storage_base > | SIInit_cf () |
| boost::intrusive_ptr< Storage_base > | SIInit_d () |
| boost::intrusive_ptr< Storage_base > | SIInit_f () |
| boost::intrusive_ptr< Storage_base > | SIInit_u64 () |
| boost::intrusive_ptr< Storage_base > | SIInit_i64 () |
| boost::intrusive_ptr< Storage_base > | SIInit_u32 () |
| boost::intrusive_ptr< Storage_base > | SIInit_i32 () |
| boost::intrusive_ptr< Storage_base > | SIInit_u16 () |
| boost::intrusive_ptr< Storage_base > | SIInit_i16 () |
| boost::intrusive_ptr< Storage_base > | SIInit_b () |
| std::ostream & | operator<< (std::ostream &os, const Symmetry &in) |
| Tensor | operator+ (const Tensor &lhs, const Tensor::Tproxy &rhs) |
| Tensor | operator- (const Tensor &lhs, const Tensor::Tproxy &rhs) |
| Tensor | operator* (const Tensor &lhs, const Tensor::Tproxy &rhs) |
| Tensor | operator/ (const Tensor &lhs, const Tensor::Tproxy &rhs) |
| Tensor | operator+ (const Tensor &lhs, const Scalar::Sproxy &rhs) |
| Tensor | operator- (const Tensor &lhs, const Scalar::Sproxy &rhs) |
| Tensor | operator* (const Tensor &lhs, const Scalar::Sproxy &rhs) |
| Tensor | operator/ (const Tensor &lhs, const Scalar::Sproxy &rhs) |
| std::ostream & | operator<< (std::ostream &os, const Tensor &in) |
| std::ostream & | operator<< (std::ostream &os, const Tensor::Tproxy &in) |
| int | type_promote (const int &typeL, const int &typeR) |
| UniTensor | Contract (const UniTensor &inL, const UniTensor &inR, const bool &cacheL=false, const bool &cacheR=false) |
| Contract two UniTensor by tracing the ranks with common labels. | |
| UniTensor | Contracts (const std::vector< UniTensor > &TNs, const std::string &order, const bool &optimal) |
| Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation. | |
| template<class... T> | |
| UniTensor | Contracts (const UniTensor &in, const T &...args, const std::string &order, const bool &optimal) |
| Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation. | |
| std::ostream & | operator<< (std::ostream &os, const Accessor &in) |
| void | beauty_print_block (std::ostream &os, const cytnx_uint64 &Nin, const cytnx_uint64 &Nout, const std::vector< cytnx_uint64 > &qn_indices, const std::vector< Bond > &bonds, const Tensor &block) |
| std::ostream & | operator<< (std::ostream &os, const Bond &bin) |
| std::ostream & | operator<< (std::ostream &os, const Gncon &in) |
| std::ostream & | operator<< (std::ostream &os, const Network &in) |
| void | _parse_task_line_ (string line, vector< vector< pair< string, string > > > &table, vector< std::string > &names, map< string, cytnx_uint64 > &name2pos, int i) |
| void | _parse_ORDER_line_ (vector< string > &tokens, const string &line, const cytnx_uint64 &line_num) |
| void | _parse_TOUT_line_ (vector< cytnx_int64 > &lbls, cytnx_uint64 &TOUT_iBondNum, vector< vector< pair< string, string > > > &table, map< string, cytnx_uint64 > name2pos, const string &line, const cytnx_uint64 &line_num) |
| void | print_gn (std::vector< vector< pair< string, string > > > &table, vector< string > &names, map< string, cytnx_uint64 > &name2pos) |
| This is debug function. | |
| void | _extract_TNs_from_ORDER_ (vector< string > &TN_names, const vector< string > &tokens) |
| void | _parse_TOUT_line_ (vector< std::string > &lbls, cytnx_uint64 &TOUT_iBondNum, const string &line, const cytnx_uint64 &line_num) |
| void | tri (const char *text) |
| This is debug function for printing special characters. | |
| void | _parse_TN_line_ (vector< string > &lbls, cytnx_uint64 &TN_iBondNum, const string &line, const cytnx_uint64 &line_num) |
| Scalar_base * | ScIInit_cd () |
| Scalar_base * | ScIInit_cf () |
| Scalar_base * | ScIInit_d () |
| Scalar_base * | ScIInit_f () |
| Scalar_base * | ScIInit_u64 () |
| Scalar_base * | ScIInit_i64 () |
| Scalar_base * | ScIInit_u32 () |
| Scalar_base * | ScIInit_i32 () |
| Scalar_base * | ScIInit_u16 () |
| Scalar_base * | ScIInit_i16 () |
| Scalar_base * | ScIInit_b () |
| cytnx_float | get_cost (const PsudoUniTensor &t1, const PsudoUniTensor &t2) |
| PsudoUniTensor | pContract (PsudoUniTensor &t1, PsudoUniTensor &t2) |
| std::vector< cytnx_uint64 > | _locator_to_inner_ij (const std::vector< cytnx_uint64 > &locator, const std::vector< cytnx_uint64 > ¤t_shape, const cytnx_uint64 &inner_rowrank, const std::vector< cytnx_uint64 > &inv_mapper) |
| std::ostream & | operator<< (std::ostream &os, const Storage &in) |
| template<> | |
| std::complex< double > * | Storage_base::data< std::complex< double > > () const |
| template<> | |
| std::complex< float > * | Storage_base::data< std::complex< float > > () const |
| template<> | |
| std::complex< float > & | Storage_base::at< std::complex< float > > (const cytnx_uint64 &idx) const |
| template<> | |
| std::complex< double > & | Storage_base::at< std::complex< double > > (const cytnx_uint64 &idx) const |
| template<> | |
| std::complex< float > & | Storage_base::back< std::complex< float > > () const |
| template<> | |
| std::complex< double > & | Storage_base::back< std::complex< double > > () const |
| ostream & | operator<< (ostream &os, const Symmetry &in) |
| std::ostream & | operator<< (std::ostream &os, const UniTensor &in) |
| void | _resolve_CT (std::vector< UniTensor > &TNlist) |
Variables | |
| Device_class | Device |
| data on which devices. | |
| SymmetryType_class | SymType |
| Symmetry type. | |
| Type_class | Type |
| data type | |
| int | __blasINTsize__ = sizeof(lapack_int) |
| bool | User_debug = false |
| UniTensorType_class | UTenType |
| UniTensor type. | |
| GnconType_class | NtType |
| Scalar_init_interface | __ScII |
| Storage_init_interface | __SII |
| typedef bool cytnx::cytnx_bool |
| typedef std::complex<double> cytnx::cytnx_complex128 |
| typedef std::complex<float> cytnx::cytnx_complex64 |
| typedef double cytnx::cytnx_double |
| typedef float cytnx::cytnx_float |
| typedef int16_t cytnx::cytnx_int16 |
| typedef int32_t cytnx::cytnx_int32 |
| typedef int64_t cytnx::cytnx_int64 |
| typedef size_t cytnx::cytnx_size_t |
| typedef uint16_t cytnx::cytnx_uint16 |
| typedef uint32_t cytnx::cytnx_uint32 |
| typedef uint64_t cytnx::cytnx_uint64 |
| using cytnx::vec2d = typedef std::vector<std::vector<T> > |
| using cytnx::vec3d = typedef std::vector<std::vector<std::vector<T> > > |
| enum cytnx::bondType : int |
bond type
This is about the enumeration of the type of the object Bond. For the UniTensor is non-symmetry, the corresponding bondType must be BD_REG. For the UniTensor is symmetry, the corresponding bondType must be BD_KET or BD_BRA. Please note that if you want to do the contraction for symmetric UniTensor, you only can contract the bond with BD_KET and BD_BRA. Namely, you cannot do the contraction if two bonds are both BD_KET or both BD_BRA.
| Enumerator | |
|---|---|
| BD_KET | -1, represent ket state in physics |
| BD_BRA | 1, represent bra state in physics |
| BD_REG | 0, use if the UniTensor is non-symmetry |
| BD_NONE | 0, same as BD_REG |
| BD_IN | -1, same as BD_KET |
| BD_OUT | 1, same as BD_BRA |
| void cytnx::_extract_TNs_from_ORDER_ | ( | vector< string > & | TN_names, |
| const vector< string > & | tokens | ||
| ) |
| std::vector< cytnx_uint64 > cytnx::_locator_to_inner_ij | ( | const std::vector< cytnx_uint64 > & | locator, |
| const std::vector< cytnx_uint64 > & | current_shape, | ||
| const cytnx_uint64 & | inner_rowrank, | ||
| const std::vector< cytnx_uint64 > & | inv_mapper | ||
| ) |
| void cytnx::_parse_ORDER_line_ | ( | vector< string > & | tokens, |
| const string & | line, | ||
| const cytnx_uint64 & | line_num | ||
| ) |
| void cytnx::_parse_task_line_ | ( | string | line, |
| vector< vector< pair< string, string > > > & | table, | ||
| vector< std::string > & | names, | ||
| map< string, cytnx_uint64 > & | name2pos, | ||
| int | i | ||
| ) |
| void cytnx::_parse_TN_line_ | ( | vector< string > & | lbls, |
| cytnx_uint64 & | TN_iBondNum, | ||
| const string & | line, | ||
| const cytnx_uint64 & | line_num | ||
| ) |
| void cytnx::_parse_TOUT_line_ | ( | vector< cytnx_int64 > & | lbls, |
| cytnx_uint64 & | TOUT_iBondNum, | ||
| vector< vector< pair< string, string > > > & | table, | ||
| map< string, cytnx_uint64 > | name2pos, | ||
| const string & | line, | ||
| const cytnx_uint64 & | line_num | ||
| ) |
| void cytnx::_parse_TOUT_line_ | ( | vector< std::string > & | lbls, |
| cytnx_uint64 & | TOUT_iBondNum, | ||
| const string & | line, | ||
| const cytnx_uint64 & | line_num | ||
| ) |
| void cytnx::_resolve_CT | ( | std::vector< UniTensor > & | TNlist | ) |
| Tensor cytnx::arange | ( | const cytnx_double & | start, |
| const cytnx_double & | end, | ||
| const cytnx_double & | step = 1, |
||
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an rank-1 Tensor with elements defined in range [start,end) with assigned step-size
| start | the start value of the range |
| end | the end value of the range |
| step | the step-size of the range |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| Tensor cytnx::arange | ( | const cytnx_int64 & | Nelem | ) |
| void cytnx::beauty_print_block | ( | std::ostream & | os, |
| const cytnx_uint64 & | Nin, | ||
| const cytnx_uint64 & | Nout, | ||
| const std::vector< cytnx_uint64 > & | qn_indices, | ||
| const std::vector< Bond > & | bonds, | ||
| const Tensor & | block | ||
| ) |
| cytnx_complex128 cytnx::complex128 | ( | const Scalar & | in | ) |
Convert a Scalar object to a cytnx::complex128.
| cytnx_complex64 cytnx::complex64 | ( | const Scalar & | in | ) |
Convert a Scalar object to a cytnx::complex64.
| UniTensor cytnx::Contract | ( | const UniTensor & | inL, |
| const UniTensor & | inR, | ||
| const bool & | cacheL = false, |
||
| const bool & | cacheR = false |
||
| ) |
Contract two UniTensor by tracing the ranks with common labels.
| inL | the Tensor #1 |
| inR | the Tensor #2 |
| cacheL | if the inL should be contiguous align after calling |
| cacheR | if the inR should be contiguous align after calling |
| UniTensor cytnx::Contracts | ( | const std::vector< UniTensor > & | TNs, |
| const std::string & | order, | ||
| const bool & | optimal | ||
| ) |
Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.
| TNs | the Tensors. |
| order | desired contraction order. |
| optimal | wheather to find the optimal contraction order automatically. |
See also UniTensor.contract
| UniTensor cytnx::Contracts | ( | const UniTensor & | in, |
| const T &... | args, | ||
| const std::string & | order, | ||
| const bool & | optimal | ||
| ) |
Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.
| in | the Tensors. |
| args | the Tensors. |
See also UniTensor.contract
| Tensor cytnx::eye | ( | const cytnx_uint64 & | Dim, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an square rank-2 Tensor with all diagonal to be one.
| Dim | the dimension of diagonal. |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
Note: This function is a alias of cytnx::identity().
| cytnx_float cytnx::get_cost | ( | const PsudoUniTensor & | t1, |
| const PsudoUniTensor & | t2 | ||
| ) |
| Tensor cytnx::identity | ( | const cytnx_uint64 & | Dim, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an square rank-2 Tensor with all diagonal to be one.
| Dim | the dimension of diagonal. |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| Tensor cytnx::linspace | ( | const cytnx_double & | start, |
| const cytnx_double & | end, | ||
| const cytnx_uint64 & | Nelem, | ||
| const bool & | endpoint = true, |
||
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
| UniTensor cytnx::ncon | ( | const std::vector< UniTensor > & | tensor_list_in, |
| const std::vector< std::vector< cytnx_int64 > > & | connect_list_in, | ||
| const bool | check_network = false, |
||
| const bool | optimize = false, |
||
| std::vector< cytnx_int64 > | cont_order = std::vector<cytnx_int64>(), |
||
| const std::vector< std::string > & | out_labels = std::vector<std::string>() |
||
| ) |
| Tensor cytnx::ones | ( | const cytnx_uint64 & | Nelem, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an rank-1 Tensor with all the elements are initialized with one.
| Nelem | the number of elements |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| Tensor cytnx::ones | ( | const std::vector< cytnx_uint64 > & | Nelem, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an Tensor with all the elements are initialized with one.
| Nelem | the shape of the Tensor |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| cytnx::UniTensor cytnx::operator% | ( | const cytnx::UniTensor & | Lt, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The modulo operator between two UniTensor.
This is the modulo function for UniTensor. It will call linalg::Mod(const UniTensor &Lt, const UniTensor &Rt) function.
| cytnx::UniTensor cytnx::operator% | ( | const cytnx::UniTensor & | Lt, |
| const T & | rc | ||
| ) |
The modulo operator between a UniTensor and a template type.
This is the modulo function for UniTensor. It will call linalg::Mod(const UniTensor &Lt, const T &rc) function.
| [in] | Lt | The left UniTensor. |
| [in] | rc | The right template type. |
| cytnx::UniTensor cytnx::operator% | ( | const T & | lc, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The modulo operator between a template type and a UniTensor.
This is the modulo function for UniTensor. It will call linalg::Mod(const T &lc, const UniTensor &Rt) function.
| [in] | lc | The left template type. |
| [in] | Rt | The right UniTensor. |
The mode operator between a template type and Tensor.
This operator call linalg::Mod(const T &lc, const Tensor &Rt) to perform the mode between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The mode operator between Tensor and a template type.
This operator call linalg::Mod(const Tensor &Lt, const T &rc) to perform the mode between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The mode operator for Tensor.
This operator call linalg::Mod(const Tensor &Lt, const Tensor &Rt) to perform the mode.
| cytnx::UniTensor cytnx::operator* | ( | const cytnx::UniTensor & | Lt, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The multiplication operator between two UniTensor.
This is the multiplication function for UniTensor. It will call linalg::Mul(const UniTensor &Lt, const UniTensor &Rt) function.
| cytnx::UniTensor cytnx::operator* | ( | const cytnx::UniTensor & | Lt, |
| const T & | rc | ||
| ) |
The multiplication operator between a UniTensor and a template type.
This is the multiplication function for UniTensor. It will call linalg::Mul(const UniTensor &Lt, const T &rc) function.
| [in] | Lt | The left UniTensor. |
| [in] | rc | The right template type. |
| cytnx::UniTensor cytnx::operator* | ( | const T & | lc, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The multiplication operator between a template type and a UniTensor.
This is the multiplication function for UniTensor. It will call linalg::Mul(const T &lc, const UniTensor &Rt) function.
| [in] | lc | The left template type. |
| [in] | Rt | The right UniTensor. |
The multiplication operator between a template type and Tensor.
This operator call linalg::Mul(const T &lc, const Tensor &Rt) to perform the multiplication between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The multiplication operator between Tensor and a template type.
This operator call linalg::Mul(const Tensor &Lt, const T &rc) to perform the multiplication between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The multiplication operator for Tensor.
This operator call linalg::Mul(const Tensor &Lt, const Tensor &Rt) to perform the multiplication.
| cytnx::UniTensor cytnx::operator+ | ( | const cytnx::UniTensor & | Lt, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The addtion operator between two UniTensor.
This is the addtion function for UniTensor. It will call linalg::Add(const UniTensor &Lt, const UniTensor &Rt) function.
| cytnx::UniTensor cytnx::operator+ | ( | const cytnx::UniTensor & | Lt, |
| const T & | rc | ||
| ) |
The addtion operator between a UniTensor and a template type.
This is the addtion function for UniTensor. It will call linalg::Add(const UniTensor &Lt, const T &rc) function.
| [in] | Lt | The left UniTensor. |
| [in] | rc | The right template type. |
| cytnx::UniTensor cytnx::operator+ | ( | const T & | lc, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The addtion operator between a template type and a UniTensor.
This is the addtion function for UniTensor. It will call linalg::Add(const T &lc, const UniTensor &Rt) function.
| [in] | lc | The left template type. |
| [in] | Rt | The right UniTensor. |
The addition operator between a template type and Tensor.
This operator call linalg::Add(const T &lc, const Tensor &Rt) to perform the addition between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The addition operator between Tensor and a template type.
This operator call linalg::Add(const Tensor &Lt, const T &rc) to perform the addition between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The addition operator for Tensor.
This operator call linalg::Add(const Tensor &Lt, const Tensor &Rt) to perform the addition.
| cytnx::UniTensor cytnx::operator- | ( | const cytnx::UniTensor & | Lt, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The subtraction operator between two UniTensor.
This is the subtraction function for UniTensor. It will call linalg::Sub(const UniTensor &Lt, const UniTensor &Rt) function.
| cytnx::UniTensor cytnx::operator- | ( | const cytnx::UniTensor & | Lt, |
| const T & | rc | ||
| ) |
The subtraction operator between a UniTensor and a template type.
This is the subtraction function for UniTensor. It will call linalg::Sub(const UniTensor &Lt, const T &rc) function.
| [in] | Lt | The left UniTensor. |
| [in] | rc | The right template type. |
| cytnx::UniTensor cytnx::operator- | ( | const T & | lc, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The subtraction operator between a template type and a UniTensor.
This is the subtraction function for UniTensor. It will call linalg::Sub(const T &lc, const UniTensor &Rt) function.
| [in] | lc | The left template type. |
| [in] | Rt | The right UniTensor. |
The subtraction operator between a template type and Tensor.
This operator call linalg::Sub(const T &lc, const Tensor &Rt) to perform the subtraction between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The subtraction operator between Tensor and a template type.
This operator call linalg::Sub(const Tensor &Lt, const T &rc) to perform the subtraction between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The subtraction operator for Tensor.
This operator call linalg::Sub(const Tensor &Lt, const Tensor &Rt) to perform the subtraction.
| cytnx::UniTensor cytnx::operator/ | ( | const cytnx::UniTensor & | Lt, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The division operator between two UniTensor.
This is the division function for UniTensor. It will call linalg::Div(const UniTensor &Lt, const UniTensor &Rt) function.
| cytnx::UniTensor cytnx::operator/ | ( | const cytnx::UniTensor & | Lt, |
| const T & | rc | ||
| ) |
The division operator between a UniTensor and a template type.
This is the division function for UniTensor. It will call linalg::Div(const UniTensor &Lt, const T &rc) function.
| [in] | Lt | The left UniTensor. |
| [in] | rc | The right template type. |
| cytnx::UniTensor cytnx::operator/ | ( | const T & | lc, |
| const cytnx::UniTensor & | Rt | ||
| ) |
The division operator between a template type and a UniTensor.
This is the division function for UniTensor. It will call linalg::Div(const T &lc, const UniTensor &Rt) function.
| [in] | lc | The left template type. |
| [in] | Rt | The right UniTensor. |
The division operator between a template type and Tensor.
This operator call linalg::Div(const T &lc, const Tensor &Rt) to perform the division between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The division operator between Tensor and a template type.
This operator call linalg::Div(const Tensor &Lt, const T &rc) to perform the division between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The division operator for Tensor.
This operator call linalg::Div(const Tensor &Lt, const Tensor &Rt) to perform the division.
| ostream & cytnx::operator<< | ( | ostream & | os, |
| const Symmetry & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Accessor & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Bond & | bin | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Gncon & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Network & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Scalar & | in | ||
| ) |
The stream operator for Scalar objects.
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Storage & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Symmetry & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Tensor & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const Tensor::Tproxy & | in | ||
| ) |
| std::ostream & cytnx::operator<< | ( | std::ostream & | os, |
| const UniTensor & | in | ||
| ) |
The comparison operator between a template type and Tensor.
This operator call linalg::Cpr(const T &lc, const Tensor &Rt) to perform the comparison between a template type and Tensor.
| [in] | lc | Left template type. |
| [in] | Rt | Right Tensor. |
The comparison operator between Tensor and a template type.
This operator call linalg::Cpr(const Tensor &Lt, const T &rc) to perform the comparison between Tensor and a template type.
| [in] | Lt | Left Tensor. |
| [in] | rc | Right template type. |
The comparison operator for Tensor.
This operator call linalg::Cpr(const Tensor &Lt, const Tensor &Rt) to perform the comparison.
| PsudoUniTensor cytnx::pContract | ( | PsudoUniTensor & | t1, |
| PsudoUniTensor & | t2 | ||
| ) |
| void cytnx::print_gn | ( | std::vector< vector< pair< string, string > > > & | table, |
| vector< string > & | names, | ||
| map< string, cytnx_uint64 > & | name2pos | ||
| ) |
This is debug function.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::complex< double > & cytnx::Storage_base::at< std::complex< double > > | ( | const cytnx_uint64 & | idx | ) | const |
| std::complex< float > & cytnx::Storage_base::at< std::complex< float > > | ( | const cytnx_uint64 & | idx | ) | const |
| std::complex< double > & cytnx::Storage_base::back< std::complex< double > > | ( | ) | const |
| std::complex< float > & cytnx::Storage_base::back< std::complex< float > > | ( | ) | const |
| std::complex< double > * cytnx::Storage_base::data< std::complex< double > > | ( | ) | const |
| std::complex< float > * cytnx::Storage_base::data< std::complex< float > > | ( | ) | const |
| void cytnx::tri | ( | const char * | text | ) |
This is debug function for printing special characters.
| int cytnx::type_promote | ( | const int & | typeL, |
| const int & | typeR | ||
| ) |
| Tensor cytnx::zeros | ( | const cytnx_uint64 & | Nelem, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an rank-1 Tensor with all the elements are initialized with zero.
| Nelem | the number of elements |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| Tensor cytnx::zeros | ( | const std::vector< cytnx_uint64 > & | Nelem, |
| const unsigned int & | dtype = Type.Double, |
||
| const int & | device = Device.cpu |
||
| ) |
create an Tensor with all the elements are initialized with zero.
| Nelem | the shape of the Tensor |
| dtype | the dtype of the Tensor. It can be any type defined in cytnx::Type |
| device | the device that the Tensor is put on. It can be any device defined in cytnx::Device |
| int cytnx::__blasINTsize__ = sizeof(lapack_int) |
| Scalar_init_interface cytnx::__ScII |
| Storage_init_interface cytnx::__SII |
| Device_class cytnx::Device |
data on which devices.
This is the variable about the data on which devices .
You can use it as following:
The supported enumerations are as following:
| enumeration | description |
|---|---|
| cpu | -1, on cpu |
| cuda | 0, on cuda |
| NetworkType_class cytnx::NtType |
| SymmetryType_class cytnx::SymType |
Symmetry type.
It is about the type of the Symmetry object The supported enumerations are as following:
| enumeration | description |
|---|---|
| Void | -99, void type (that means not initialized) |
| U | -1, U1 symmetry |
| Z | 0, Zn symmetry |
| Type_class cytnx::Type |
data type
This is the variable about the data type of the UniTensor, Tensor, ... .
You can use it as following:
The supported enumerations are as following:
| enumeration | description |
|---|---|
| Void | the data type is void (nothing) |
| ComplexDouble | complex double type with 128 bits |
| ComplexFloat | complex float type with 64 bits |
| Double | double float type with 64 bits |
| Float | single float type with 32 bits |
| Int64 | long long integer type with 64 bits |
| Uint64 | unsigned long long integer type with 64 bits |
| Int32 | integer type with 32 bits |
| Uint32 | unsigned integer type with 32 bits |
| Int16 | short integer type with 16 bits |
| Uint16 | undigned short integer with 16 bits |
| Bool | boolean type |
| bool cytnx::User_debug = false |
| UniTensorType_class cytnx::UTenType |