Look at the example/model directory in the ALPS libraries source trees. This is a program which prints the matrix for a model you specify. If you edit the file matrix.h you can also print all the states which gives you the matrix. Please be aware though that the ALPS exact diagonalization codes cannot do the biggest systems that you might be able to do using a matrix-free specialized code. What will you want to do after you checked your Mathematica code?
Matthias
On Dec 27, 2008, at 6:58 PM, khalid hassan wrote:
No I am using it for small systems. actually i made a code in mathematica that calculates the hamiltonian matrix and basis vectors, but it cannot be guaranteed 100% as i may have some situations not obliged. Now my professor wants to check my code with alps and then switch to alps. I dont know what next. for having the matrix from the code I need to know the c++, for which i have to spend some time as i know a little bit of c++ already. I want to know that if I am on the right track. as I may spend 3 months on learning c++ then i know that its not possible in alps. I am thinking what freedom it will give me for calculating any hamiltonian for any system. you said as it is possible now i can do it with confidence. as my professor has given me this task, as i am new in this field i dont know the reason.
If you have some suggestion for me to have this without needing to learn all c++ it will save my time as I am paying myself for my phd program.
Thanks to you for your answer.
Best Regards
Loane
--- On Sat, 12/27/08, Matthias Troyer troyer@phys.ethz.ch wrote:
From: Matthias Troyer troyer@phys.ethz.ch Subject: Re: [ALPS-users] hamiltonian matrix To: mkhloane@yahoo.com, comp-phys-alps-users@phys.ethz.ch Date: Saturday, December 27, 2008, 12:26 PM Look at the sparsediag or fulldiag code. You can print the basis and the matrix elements, but be warned that this can be a HUGE matrix. Why do you want to print it?
Matthias
On Dec 27, 2008, at 12:22 AM, khalid hassan wrote:
Dear all
I am using the alps for a fermionic hubbard system. It
gives the energies. I want the matrix elements of hamiltonian matrix. how can I have the hamiltonian matrix and basis states.
Best Regards Khalid Loane
comp-phys-alps-users@lists.phys.ethz.ch