On 3 Sep 2010, at 03:23, rexlundgren@mail.utexas.edu wrote:
Hi, Thanks for the reply. When I try that with the following code inserted in the sparsediag.h file :
//orignal code
// calculate eigen vectors ietl::Info<magnitude_type> info; // (m1, m2, ma, eigenvalue, residualm, status). try { eigenvectors.clear(); lanczos.eigenvectors(lanczos.eigenvalues().begin(),lanczos.eigenvalues().begin()+n, std::back_inserter(eigenvectors),info,generator); } catch (std::runtime_error& e) { std::cout <<"Exception during eigenvector calculation: " << e.what() << "\n"; }
} else { vector_type v(1); v[0]=1.; eigenvectors.push_back(v);
//new code to print out eigenvectors std::cout << eigenvectors[0].size() << " Size \n"; std::cout << eigenvectors[0] << "\n";
}
} // rest of code
The output is the following for a spin chain with L=4.
1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) Starting Lanczos Finished Lanczos 1 Size [1]((1,0)) Starting Lanczos Finished Lanczos 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0)) 1 Size [1]((1,0))
The problem is I don't know how to interpret this in terms of the original basis that is not within the subspace, or if there is still some problem in my code(maybe its in the wrong spot).
Thanks for the help
Rex
You should print the parameters (from the variable parms) as well - they give the quantum numbers, such as Sz and the TOTAL_MOMENTUM. For the small system you looked at most subspaces are of size 1, that's why you just get 1-dimensional eigenvectors.
Matthias