I want to implement some simple exact diagonalization, for a challenging/new system, to benchmark DMRG for larger systems.
Is this simple to do? I need to keep the wavefunctions in MPS format after ED.
I created a code formula based on your question. Please let me know if it's useful for you, or if adding something else to it would help (including better comments of what the code is doing).
Here is the link: