Cytnx v0.7.6
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
cytnx Namespace Reference

Namespaces

namespace  algo
 
namespace  linalg
 linear algebra related functions.
 
namespace  physics
 
namespace  qgates
 
namespace  random
 
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  LinOp
 
class  Network
 
class  Scalar
 
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

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
}
 

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)
 
template<class T >
cytnx::UniTensor operator+ (const T &lc, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator+ (const cytnx::UniTensor &Lt, const T &rc)
 
cytnx::UniTensor operator- (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator- (const T &lc, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator- (const cytnx::UniTensor &Lt, const T &rc)
 
cytnx::UniTensor operator* (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator* (const T &lc, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator* (const cytnx::UniTensor &Lt, const T &rc)
 
cytnx::UniTensor operator/ (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator/ (const T &lc, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator/ (const cytnx::UniTensor &Lt, const T &rc)
 
cytnx::UniTensor operator% (const cytnx::UniTensor &Lt, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator% (const T &lc, const cytnx::UniTensor &Rt)
 
template<class T >
cytnx::UniTensor operator% (const cytnx::UniTensor &Lt, const T &rc)
 
Tensor operator+ (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator+ (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator+ (const Tensor &Lt, const T &rc)
 
Tensor operator- (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator- (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator- (const Tensor &Lt, const T &rc)
 
Tensor operator* (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator* (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator* (const Tensor &Lt, const T &rc)
 
Tensor operator/ (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator/ (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator/ (const Tensor &Lt, const T &rc)
 
Tensor operator% (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator% (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator% (const Tensor &Lt, const T &rc)
 
Tensor operator== (const Tensor &Lt, const Tensor &Rt)
 
template<class T >
Tensor operator== (const T &lc, const Tensor &Rt)
 
template<class T >
Tensor operator== (const Tensor &Lt, const T &rc)
 
Scalar operator+ (const Scalar &lc, const Scalar &rs)
 
Scalar operator* (const Scalar &lc, const Scalar &rs)
 
Scalar operator- (const Scalar &lc, const Scalar &rs)
 
Scalar operator/ (const Scalar &lc, const Scalar &rs)
 
bool operator< (const Scalar &lc, const Scalar &rs)
 
bool operator> (const Scalar &lc, const Scalar &rs)
 
bool operator<= (const Scalar &lc, const Scalar &rs)
 
bool operator>= (const Scalar &lc, const Scalar &rs)
 
bool operator== (const Scalar &lc, const Scalar &rs)
 
Scalar abs (const Scalar &c)
 
Scalar sqrt (const Scalar &c)
 
cytnx_complex128 complex128 (const Scalar &in)
 
cytnx_complex64 complex64 (const Scalar &in)
 
std::ostream & operator<< (std::ostream &os, const Scalar &in)
 
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)
 
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)
 Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.
 
template<class ... T>
UniTensor Contracts (const UniTensor &in, const T &... args)
 Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.
 
std::ostream & operator<< (std::ostream &os, const Accessor &in)
 
std::ostream & operator<< (std::ostream &os, const Bond &bin)
 
std::ostream & operator<< (std::ostream &os, const Network &in)
 
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, 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< cytnx_int64 > &lbls, cytnx_uint64 &TN_iBondNum, const string &line, const cytnx_uint64 &line_num)
 
void _extract_TNs_from_ORDER_ (vector< string > &TN_names, const vector< string > &tokens)
 
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 > &current_shape, const cytnx_uint64 &inner_rowrank, const std::vector< cytnx_uint64 > &inv_mapper)
 
std::ostream & operator<< (std::ostream &os, const Storage &in)
 
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 ()
 
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)
 
template<>
TensorTensor::operator+=<Tensor::Tproxy > (const Tensor::Tproxy &rc)
 
template<>
TensorTensor::operator+=<Scalar::Sproxy > (const Scalar::Sproxy &rc)
 
template<>
TensorTensor::operator-=<Tensor::Tproxy > (const Tensor::Tproxy &rc)
 
template<>
TensorTensor::operator-=<Scalar::Sproxy > (const Scalar::Sproxy &rc)
 
template<>
TensorTensor::operator*=<Tensor::Tproxy > (const Tensor::Tproxy &rc)
 
template<>
TensorTensor::operator*=<Scalar::Sproxy > (const Scalar::Sproxy &rc)
 
template<>
TensorTensor::operator/=<Tensor::Tproxy > (const Tensor::Tproxy &rc)
 
template<>
TensorTensor::operator/=<Scalar::Sproxy > (const Scalar::Sproxy &rc)
 
std::ostream & operator<< (std::ostream &os, const UniTensor &in)
 
void _resolve_CT (std::vector< UniTensor > &TNlist)
 

Variables

Device_class Device
 
Type_class Type
 
int __blasINTsize__ = sizeof(lapack_int)
 
bool User_debug = true
 
NetworkType_class NtType
 
Scalar_init_interface __ScII
 
Storage_init_interface __SII
 
SymmetryType_class SymType
 
UniTensorType_class UTenType
 

Typedef Documentation

◆ ac

◆ cytnx_bool

typedef bool cytnx::cytnx_bool

◆ cytnx_complex128

typedef std::complex<double> cytnx::cytnx_complex128

◆ cytnx_complex64

typedef std::complex<float> cytnx::cytnx_complex64

◆ cytnx_double

typedef double cytnx::cytnx_double

◆ cytnx_float

typedef float cytnx::cytnx_float

◆ cytnx_int16

typedef int16_t cytnx::cytnx_int16

◆ cytnx_int32

typedef int32_t cytnx::cytnx_int32

◆ cytnx_int64

typedef int64_t cytnx::cytnx_int64

◆ cytnx_size_t

typedef size_t cytnx::cytnx_size_t

◆ cytnx_uint16

typedef uint16_t cytnx::cytnx_uint16

◆ cytnx_uint32

typedef uint32_t cytnx::cytnx_uint32

◆ cytnx_uint64

typedef uint64_t cytnx::cytnx_uint64

Enumeration Type Documentation

◆ bondType

enum cytnx::bondType : int
Enumerator
BD_KET 
BD_BRA 
BD_REG 
BD_NONE 
BD_IN 
BD_OUT 

Function Documentation

◆ _extract_TNs_from_ORDER_()

void cytnx::_extract_TNs_from_ORDER_ ( vector< string > &  TN_names,
const vector< string > &  tokens 
)

◆ _locator_to_inner_ij()

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 
)

◆ _parse_ORDER_line_()

void cytnx::_parse_ORDER_line_ ( vector< string > &  tokens,
const string &  line,
const cytnx_uint64 line_num 
)

◆ _parse_TN_line_()

void cytnx::_parse_TN_line_ ( vector< cytnx_int64 > &  lbls,
cytnx_uint64 TN_iBondNum,
const string &  line,
const cytnx_uint64 line_num 
)

◆ _parse_TOUT_line_()

void cytnx::_parse_TOUT_line_ ( vector< cytnx_int64 > &  lbls,
cytnx_uint64 TOUT_iBondNum,
const string &  line,
const cytnx_uint64 line_num 
)

◆ _resolve_CT()

void cytnx::_resolve_CT ( std::vector< UniTensor > &  TNlist)

◆ abs()

Scalar cytnx::abs ( const Scalar c)

◆ arange() [1/2]

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

Parameters
startthe start value of the range
endthe end value of the range
stepthe step-size of the range
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ arange() [2/2]

Tensor cytnx::arange ( const cytnx_int64 Nelem)

create an rank-1 Tensor with incremental unsigned integer elements start with [0,Nelem)

Parameters
Nelemthe number of incremental elements to create.
Returns
[Tensor]

◆ complex128()

cytnx_complex128 cytnx::complex128 ( const Scalar in)

◆ complex64()

cytnx_complex64 cytnx::complex64 ( const Scalar in)

◆ Contract()

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.

Parameters
inLthe Tensor #1
inRthe Tensor #2
cacheLif the inL should be contiguous align after calling
cacheRif the inR should be contiguous align after calling
Returns
[UniTensor]

See also UniTensor.contract

◆ Contracts() [1/2]

UniTensor cytnx::Contracts ( const std::vector< UniTensor > &  TNs)

Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.

Parameters
TNsthe Tensors.
Returns
[UniTensor]

See also UniTensor.contract

◆ Contracts() [2/2]

template<class ... T>
UniTensor cytnx::Contracts ( const UniTensor in,
const T &...  args 
)

Contract multiple UniTensor by tracing the ranks with common labels with pairwise operation.

Parameters
inthe Tensors.
argsthe Tensors.
Returns
[UniTensor]

See also UniTensor.contract

◆ eye()

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.

Parameters
Dimthe dimension of diagonal.
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

Note: This function is a alias of cytnx::identity().

◆ get_cost()

cytnx_float cytnx::get_cost ( const PsudoUniTensor &  t1,
const PsudoUniTensor &  t2 
)

◆ identity()

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.

Parameters
Dimthe dimension of diagonal.
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ linspace()

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 
)

◆ ones() [1/2]

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.

Parameters
Nelemthe number of elements
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ ones() [2/2]

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.

Parameters
Nelemthe shape of the Tensor
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ operator%() [1/6]

cytnx::UniTensor cytnx::operator% ( const cytnx::UniTensor Lt,
const cytnx::UniTensor Rt 
)

◆ operator%() [2/6]

template<class T >
cytnx::UniTensor cytnx::operator% ( const cytnx::UniTensor Lt,
const T &  rc 
)

◆ operator%() [3/6]

template<class T >
cytnx::UniTensor cytnx::operator% ( const T &  lc,
const cytnx::UniTensor Rt 
)

◆ operator%() [4/6]

template<class T >
Tensor cytnx::operator% ( const T &  lc,
const Tensor Rt 
)

◆ operator%() [5/6]

template<class T >
Tensor cytnx::operator% ( const Tensor Lt,
const T &  rc 
)

◆ operator%() [6/6]

Tensor cytnx::operator% ( const Tensor Lt,
const Tensor Rt 
)

◆ operator*() [1/9]

cytnx::UniTensor cytnx::operator* ( const cytnx::UniTensor Lt,
const cytnx::UniTensor Rt 
)

◆ operator*() [2/9]

template<class T >
cytnx::UniTensor cytnx::operator* ( const cytnx::UniTensor Lt,
const T &  rc 
)

◆ operator*() [3/9]

Scalar cytnx::operator* ( const Scalar lc,
const Scalar rs 
)

◆ operator*() [4/9]

template<class T >
cytnx::UniTensor cytnx::operator* ( const T &  lc,
const cytnx::UniTensor Rt 
)

◆ operator*() [5/9]

template<class T >
Tensor cytnx::operator* ( const T &  lc,
const Tensor Rt 
)

◆ operator*() [6/9]

Tensor cytnx::operator* ( const Tensor lhs,
const Scalar::Sproxy &  rhs 
)

◆ operator*() [7/9]

Tensor cytnx::operator* ( const Tensor lhs,
const Tensor::Tproxy &  rhs 
)

◆ operator*() [8/9]

template<class T >
Tensor cytnx::operator* ( const Tensor Lt,
const T &  rc 
)

◆ operator*() [9/9]

Tensor cytnx::operator* ( const Tensor Lt,
const Tensor Rt 
)

◆ operator+() [1/9]

cytnx::UniTensor cytnx::operator+ ( const cytnx::UniTensor Lt,
const cytnx::UniTensor Rt 
)

◆ operator+() [2/9]

template<class T >
cytnx::UniTensor cytnx::operator+ ( const cytnx::UniTensor Lt,
const T &  rc 
)

◆ operator+() [3/9]

Scalar cytnx::operator+ ( const Scalar lc,
const Scalar rs 
)

◆ operator+() [4/9]

template<class T >
cytnx::UniTensor cytnx::operator+ ( const T &  lc,
const cytnx::UniTensor Rt 
)

◆ operator+() [5/9]

template<class T >
Tensor cytnx::operator+ ( const T &  lc,
const Tensor Rt 
)

◆ operator+() [6/9]

Tensor cytnx::operator+ ( const Tensor lhs,
const Scalar::Sproxy &  rhs 
)

◆ operator+() [7/9]

Tensor cytnx::operator+ ( const Tensor lhs,
const Tensor::Tproxy &  rhs 
)

◆ operator+() [8/9]

template<class T >
Tensor cytnx::operator+ ( const Tensor Lt,
const T &  rc 
)

◆ operator+() [9/9]

Tensor cytnx::operator+ ( const Tensor Lt,
const Tensor Rt 
)

◆ operator-() [1/9]

cytnx::UniTensor cytnx::operator- ( const cytnx::UniTensor Lt,
const cytnx::UniTensor Rt 
)

◆ operator-() [2/9]

template<class T >
cytnx::UniTensor cytnx::operator- ( const cytnx::UniTensor Lt,
const T &  rc 
)

◆ operator-() [3/9]

Scalar cytnx::operator- ( const Scalar lc,
const Scalar rs 
)

◆ operator-() [4/9]

template<class T >
cytnx::UniTensor cytnx::operator- ( const T &  lc,
const cytnx::UniTensor Rt 
)

◆ operator-() [5/9]

template<class T >
Tensor cytnx::operator- ( const T &  lc,
const Tensor Rt 
)

◆ operator-() [6/9]

Tensor cytnx::operator- ( const Tensor lhs,
const Scalar::Sproxy &  rhs 
)

◆ operator-() [7/9]

Tensor cytnx::operator- ( const Tensor lhs,
const Tensor::Tproxy &  rhs 
)

◆ operator-() [8/9]

template<class T >
Tensor cytnx::operator- ( const Tensor Lt,
const T &  rc 
)

◆ operator-() [9/9]

Tensor cytnx::operator- ( const Tensor Lt,
const Tensor Rt 
)

◆ operator/() [1/9]

cytnx::UniTensor cytnx::operator/ ( const cytnx::UniTensor Lt,
const cytnx::UniTensor Rt 
)

◆ operator/() [2/9]

template<class T >
cytnx::UniTensor cytnx::operator/ ( const cytnx::UniTensor Lt,
const T &  rc 
)

◆ operator/() [3/9]

Scalar cytnx::operator/ ( const Scalar lc,
const Scalar rs 
)

◆ operator/() [4/9]

template<class T >
cytnx::UniTensor cytnx::operator/ ( const T &  lc,
const cytnx::UniTensor Rt 
)

◆ operator/() [5/9]

template<class T >
Tensor cytnx::operator/ ( const T &  lc,
const Tensor Rt 
)

◆ operator/() [6/9]

Tensor cytnx::operator/ ( const Tensor lhs,
const Scalar::Sproxy &  rhs 
)

◆ operator/() [7/9]

Tensor cytnx::operator/ ( const Tensor lhs,
const Tensor::Tproxy &  rhs 
)

◆ operator/() [8/9]

template<class T >
Tensor cytnx::operator/ ( const Tensor Lt,
const T &  rc 
)

◆ operator/() [9/9]

Tensor cytnx::operator/ ( const Tensor Lt,
const Tensor Rt 
)

◆ operator<()

bool cytnx::operator< ( const Scalar lc,
const Scalar rs 
)

◆ operator<<() [1/10]

ostream & cytnx::operator<< ( ostream &  os,
const Symmetry in 
)

◆ operator<<() [2/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Accessor in 
)

◆ operator<<() [3/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Bond bin 
)

◆ operator<<() [4/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Network in 
)

◆ operator<<() [5/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Scalar in 
)

◆ operator<<() [6/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Storage in 
)

◆ operator<<() [7/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Symmetry in 
)

◆ operator<<() [8/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Tensor in 
)

◆ operator<<() [9/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const Tensor::Tproxy &  in 
)

◆ operator<<() [10/10]

std::ostream & cytnx::operator<< ( std::ostream &  os,
const UniTensor in 
)

◆ operator<=()

bool cytnx::operator<= ( const Scalar lc,
const Scalar rs 
)

◆ operator==() [1/4]

bool cytnx::operator== ( const Scalar lc,
const Scalar rs 
)

◆ operator==() [2/4]

template<class T >
Tensor cytnx::operator== ( const T &  lc,
const Tensor Rt 
)

◆ operator==() [3/4]

template<class T >
Tensor cytnx::operator== ( const Tensor Lt,
const T &  rc 
)

◆ operator==() [4/4]

Tensor cytnx::operator== ( const Tensor Lt,
const Tensor Rt 
)

◆ operator>()

bool cytnx::operator> ( const Scalar lc,
const Scalar rs 
)

◆ operator>=()

bool cytnx::operator>= ( const Scalar lc,
const Scalar rs 
)

◆ pContract()

PsudoUniTensor cytnx::pContract ( PsudoUniTensor &  t1,
PsudoUniTensor &  t2 
)

◆ ScIInit_b()

Scalar_base * cytnx::ScIInit_b ( )

◆ ScIInit_cd()

Scalar_base * cytnx::ScIInit_cd ( )

◆ ScIInit_cf()

Scalar_base * cytnx::ScIInit_cf ( )

◆ ScIInit_d()

Scalar_base * cytnx::ScIInit_d ( )

◆ ScIInit_f()

Scalar_base * cytnx::ScIInit_f ( )

◆ ScIInit_i16()

Scalar_base * cytnx::ScIInit_i16 ( )

◆ ScIInit_i32()

Scalar_base * cytnx::ScIInit_i32 ( )

◆ ScIInit_i64()

Scalar_base * cytnx::ScIInit_i64 ( )

◆ ScIInit_u16()

Scalar_base * cytnx::ScIInit_u16 ( )

◆ ScIInit_u32()

Scalar_base * cytnx::ScIInit_u32 ( )

◆ ScIInit_u64()

Scalar_base * cytnx::ScIInit_u64 ( )

◆ SIInit_b()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_b ( )

◆ SIInit_cd()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_cd ( )

◆ SIInit_cf()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_cf ( )

◆ SIInit_d()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_d ( )

◆ SIInit_f()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_f ( )

◆ SIInit_i16()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_i16 ( )

◆ SIInit_i32()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_i32 ( )

◆ SIInit_i64()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_i64 ( )

◆ SIInit_u16()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_u16 ( )

◆ SIInit_u32()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_u32 ( )

◆ SIInit_u64()

boost::intrusive_ptr< Storage_base > cytnx::SIInit_u64 ( )

◆ sqrt()

Scalar cytnx::sqrt ( const Scalar c)

◆ Storage_base::at< std::complex< double > >()

template<>
std::complex< double > & cytnx::Storage_base::at< std::complex< double > > ( const cytnx_uint64 idx) const

◆ Storage_base::at< std::complex< float > >()

template<>
std::complex< float > & cytnx::Storage_base::at< std::complex< float > > ( const cytnx_uint64 idx) const

◆ Storage_base::back< std::complex< double > >()

template<>
std::complex< double > & cytnx::Storage_base::back< std::complex< double > > ( ) const

◆ Storage_base::back< std::complex< float > >()

template<>
std::complex< float > & cytnx::Storage_base::back< std::complex< float > > ( ) const

◆ Storage_base::data< std::complex< double > >()

template<>
std::complex< double > * cytnx::Storage_base::data< std::complex< double > > ( ) const

◆ Storage_base::data< std::complex< float > >()

template<>
std::complex< float > * cytnx::Storage_base::data< std::complex< float > > ( ) const

◆ Tensor::operator*=<Scalar::Sproxy >()

template<>
Tensor & cytnx::Tensor::operator*=<Scalar::Sproxy > ( const Scalar::Sproxy &  rc)

◆ Tensor::operator*=<Tensor::Tproxy >()

template<>
Tensor & cytnx::Tensor::operator*=<Tensor::Tproxy > ( const Tensor::Tproxy &  rc)

◆ Tensor::operator+=<Scalar::Sproxy >()

template<>
Tensor & cytnx::Tensor::operator+=<Scalar::Sproxy > ( const Scalar::Sproxy &  rc)

◆ Tensor::operator+=<Tensor::Tproxy >()

template<>
Tensor & cytnx::Tensor::operator+=<Tensor::Tproxy > ( const Tensor::Tproxy &  rc)

◆ Tensor::operator-=<Scalar::Sproxy >()

template<>
Tensor & cytnx::Tensor::operator-=<Scalar::Sproxy > ( const Scalar::Sproxy &  rc)

◆ Tensor::operator-=<Tensor::Tproxy >()

template<>
Tensor & cytnx::Tensor::operator-=<Tensor::Tproxy > ( const Tensor::Tproxy &  rc)

◆ Tensor::operator/=<Scalar::Sproxy >()

template<>
Tensor & cytnx::Tensor::operator/=<Scalar::Sproxy > ( const Scalar::Sproxy &  rc)

◆ Tensor::operator/=<Tensor::Tproxy >()

template<>
Tensor & cytnx::Tensor::operator/=<Tensor::Tproxy > ( const Tensor::Tproxy &  rc)

◆ tri()

void cytnx::tri ( const char *  text)

This is debug function for printing special characters.

◆ zeros() [1/2]

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.

Parameters
Nelemthe number of elements
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ zeros() [2/2]

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.

Parameters
Nelemthe shape of the Tensor
dtypethe dtype of the Tensor. It can be any type defined in cytnx::Type
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

Variable Documentation

◆ __blasINTsize__

int cytnx::__blasINTsize__ = sizeof(lapack_int)

◆ __ScII

Scalar_init_interface cytnx::__ScII

◆ __SII

Storage_init_interface cytnx::__SII

◆ Device

Device_class cytnx::Device

◆ NtType

NetworkType_class cytnx::NtType

◆ SymType

SymmetryType_class cytnx::SymType

◆ Type

Type_class cytnx::Type

◆ User_debug

bool cytnx::User_debug = true

◆ UTenType

UniTensorType_class cytnx::UTenType