Cytnx v0.9.5
Loading...
Searching...
No Matches
Functions
cytnx::physics Namespace Reference

Functions

Tensor spin (const cytnx_double &S, const std::string &Comp, const int &device=Device.cpu)
 create Spin-S representation matrix.
 
Tensor pauli (const std::string &Comp, const int &device=Device.cpu)
 create Pauli matrix.
 

Function Documentation

◆ pauli()

Tensor cytnx::physics::pauli ( const std::string &  Comp,
const int &  device = Device.cpu 
)

create Pauli matrix.

Parameters
Compthe Component of Spin, it can be 'x', 'y' and 'z'
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]

◆ spin()

Tensor cytnx::physics::spin ( const cytnx_double S,
const std::string &  Comp,
const int &  device = Device.cpu 
)

create Spin-S representation matrix.

Parameters
Sthe Spin index. should be multiple of 1/2.
Compthe Component of Spin, it can be 'x', 'y' and 'z'
devicethe device that the Tensor is put on. It can be any device defined in cytnx::Device
Returns
[Tensor]