24 #ifndef COM_DAFER45_TBTK_FOCK_STATE
25 #define COM_DAFER45_TBTK_FOCK_STATE
31 template<
typename BIT_REGISTER>
34 template<
typename BIT_REGISTER>
37 template<
typename BIT_REGISTER>
41 FockState(
unsigned int exponentialDimension);
44 FockState(
const FockState &fockState);
53 const BIT_REGISTER& getBitRegister()
const;
56 BIT_REGISTER& getBitRegister();
59 int getPrefactor()
const;
68 friend class FockSpace<BIT_REGISTER>;
71 friend class LadderOperator<BIT_REGISTER>;
74 BIT_REGISTER bitRegister;
81 template<
typename BIT_REGISTER>
82 FockState<BIT_REGISTER>::FockState(
unsigned int exponentialDimension
84 bitRegister(exponentialDimension+1)
90 template<
typename BIT_REGISTER>
91 FockState<BIT_REGISTER>::FockState(
const FockState &fockState
93 bitRegister(fockState.bitRegister)
95 prefactor = fockState.prefactor;
98 template<
typename BIT_REGISTER>
99 FockState<BIT_REGISTER>::~FockState(){
102 template<
typename BIT_REGISTER>
103 bool FockState<BIT_REGISTER>::isNull()
const{
104 return bitRegister.getMostSignificantBit();
107 template<
typename BIT_REGISTER>
108 const BIT_REGISTER& FockState<BIT_REGISTER>::getBitRegister()
const{
112 template<
typename BIT_REGISTER>
113 BIT_REGISTER& FockState<BIT_REGISTER>::getBitRegister(){
117 template<
typename BIT_REGISTER>
118 int FockState<BIT_REGISTER>::getPrefactor()
const{
127 template<
typename BIT_REGISTER>
128 void FockState<BIT_REGISTER>::print()
const{
129 Streams::out << prefactor <<
"|";
130 for(
int n = bitRegister.getNumBits()-1; n >= 0; n--){
131 Streams::out << bitRegister.getBit(n);
132 if(n%8 == 0 && n != 0)
135 Streams::out <<
">\n";