Cytnx v0.7.3
Loading...
Searching...
No Matches
Physics.hpp
Go to the documentation of this file.
1#ifndef _Physics_H_
2#define _Physics_H_
3#include "Type.hpp"
4#include "Device.hpp"
5#include "cytnx_error.hpp"
6#include "Tensor.hpp"
7#include "UniTensor.hpp"
8#include <vector>
9#include <initializer_list>
10#include <string>
11namespace cytnx{
12 namespace physics{
14
24 Tensor spin(const cytnx_double &S, const std::string &Comp, const int &device=Device.cpu);
25
27 Tensor spin(const cytnx_double &S, const char &Comp, const int &device=Device.cpu);
29
31
40 Tensor pauli(const std::string &Comp, const int &device=Device.cpu);
41
43 Tensor pauli(const char &Comp, const int &device=Device.cpu);
45
46 #define kBoltz cytnx_double(1.380649e-23) // J/K
47 #define hPlanck cytnx_double(6.62607015e-34) // J-s
48 #define hBar cytnx_double(1.05457181e-34) // J-s
49
50 }
51}//namespace cytnx
52
54namespace cytnx{
55 namespace qgates{
56 UniTensor pauli_x(const int &device=Device.cpu);
57 UniTensor pauli_y(const int &device=Device.cpu);
58 UniTensor pauli_z(const int &device=Device.cpu);
59 UniTensor hadamard(const int &device=Device.cpu);
60 UniTensor phase_shift(const cytnx_double &phase, const int &device=Device.cpu);
61 UniTensor swap(const int &device=Device.cpu);
62 UniTensor sqrt_swap(const int &device=Device.cpu);
63 }
64}
66
67
68#endif
an tensor (multi-dimensional array)
Definition Tensor.hpp:289
Tensor pauli(const std::string &Comp, const int &device=Device.cpu)
create Pauli matrix.
Definition Physics.cpp:54
Tensor spin(const cytnx_double &S, const std::string &Comp, const int &device=Device.cpu)
create Spin-S representation matrix.
Definition Physics.cpp:13
UniTensor sqrt_swap(const int &device)
Definition Physics.cpp:114
UniTensor pauli_z(const int &device)
Definition Physics.cpp:91
UniTensor hadamard(const int &device)
Definition Physics.cpp:95
UniTensor pauli_y(const int &device)
Definition Physics.cpp:87
UniTensor phase_shift(const cytnx_double &phase, const int &device)
Definition Physics.cpp:101
UniTensor pauli_x(const int &device)
Definition Physics.cpp:83
UniTensor swap(const int &device)
Definition Physics.cpp:107
Definition Accessor.hpp:12
Device_class Device
Definition Device.cpp:105
double cytnx_double
Definition Type.hpp:20