SOLIDstate
A C++ library for solid state physics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QuantumState.hpp
Go to the documentation of this file.
1 
11 #ifndef QUANTUMSTATE_QUANTUMSTATE_HPP
12 #define QUANTUMSTATE_QUANTUMSTATE_HPP
13 
14 #include <armadillo>
15 #include <string>
16 #include <cassert>
17 
18 #include "../QuantumSystem/QuantumSystem.hpp"
19 
20 namespace solid
21 {
22 
28 template <typename T>
30 {
31 
32 public:
36  arma::Col<T> vector;
37 
39 
45  QuantumState<T>(arma::Col<T> vec)
46  {
47  vector = vec;
48  }
49 
55  QuantumState<T>(arma::subview_col<T> vec)
56  {
57  vector = vec;
58  }
59 
66  template <typename T2>
68 
74  void print(std::string extra_text = "")
75  {
76  vector.print(extra_text);
77  }
78 
79 
88  double energy;
89 };
90 
91 } // namespace solid
92 
93 #endif
double energy
energy, it is assigned after eigen problem is solved
Definition: QuantumState.hpp:88
template class representing Quantum State of the system
Definition: QuantumState.hpp:29
arma::Col< T > vector
container of the QuantumState
Definition: QuantumState.hpp:36
void print(std::string extra_text="")
print() the vector
Definition: QuantumState.hpp:74