Hello!
I've made a global installation and decided to try one of the example codes. The Bose-Hubbard with a saddle-point potential one. I created a directory with just the .py file and run
./<file_name>.py --PostProcess=F
There are no errors, just a bunch of
('nsteps', 10000)
But at the end of the day, all the folders in OUTPUTS_03_Hubbard are empty.
Do you have any idea what could go wrong?
Thank you.
Hello Ihor,
Yes, I can definitely help you here. The example script is set up for running in parallel. Thus, it creates all the input files for the Fortran backend, which includes printing the number of steps, but does not produce any output yet. A slurm script should has been created and you could use the corresponding line with "srun Execute_MPSParallelMain ..." to run it on your local machine with MPI. (Depending on your OS, you might have to replace srun with mpirun or mpiexec and you can specify the number of cores with the "-n" option.)
Otherwise, you can run in serial on your local machine with the following changes. Find 'WriteMPSParallelFiles" and
1) Comment the three lines containing the call to WriteMPSParallelFiles
2) Add in this place "MainFiles = mps.WriteFiles(params, Operators, H, PostProcess=PostProcess)
3) Add after this function call and within the same if-case "mps.runMPS(MainFiles)"
Let me know if you have any further questions, need more details, or if the suggestions works for you.
Kind regards,
Daniel
Dear Daniel,
Yes, this helped. Thank you!
I've changed the system size to L=8 and number of parameters nt=2, and still, it took like 1-2 hours on my laptop. Is this normal?
I'm trying now to prepare a simple simulation by my own. My initial goal is to be able to simulate dynamics (using TDVP and TEBD with conservation of Abelian symmetries) starting with a given simple product state (like |0>x|1>x|0>... or similar). Is this currently possible with your library, and if so, are there any examples?
If I understand correctly, in the Bose-Hubbard examples you first find a ground state variationally and then launch quenching evolution with the ground state as an initial state. I guess I can create an arbitrary initial state for TDVP/TEBD with the State class (like mps.State.qProductState(...)) and then launch dynamics by simply supplying convergence class of the required type? It is not clear to me how to accomplish this.
Cheers,
Ihor
Hello Ihor,
With regards to the CPU time: comparing compute time across machines is difficult. And you have some more parameters to shorten simulations in addition to less sites and less number of tunneling strengths. You can modify the length of the time evolution (look for Quench.AddQuench) and the number of bosons in the system defined right after the system size as fill. A fewer number of bosons leads to a fewer number of states and less possible entanglement. 1-2 hours do not look unreasonnable if you only changed to L=8 and nt = 2.
For you goals. (a) Abelian symmetry as number conservatin is already included in the script you used. Thus, it is a good starting point. (b) Initial point as a product state: it is possible. I'll go into details below. (c) TEBD and TDVP. You select the algorithm over the convergence parameter class. If you pick tconv = mps.TDVPConvParam(...) instead of mps.TEBDConvParam(...), you run with TDVP.
To use an initial state different than the ground state you have to add and change the following:
1) Delete or comment all keys in the simulation dictionary associated with the ground state search, i.e., 'MPSObservables', 'MPSConvergenceParameters', and keys for the excited states are also to be excluded.
2) Insert the new key-value-pair to your simulation dictionaries, which allows you to skip the variational MPS ground state search: 'MPS' : False
3) Add new key-value-pair for the initial state from file: 'timeevo_mps_initial' : 'Mystate.mps'
4) Generate a QProductState (captial Q at the beginning) for a user-defined product state with symmetries. You may look into the file MPSPyLib/State.py, the class has a detailed description of the arguments. After you generated an instance of this class, e.g., named Psi, call Psi.write('Mystate.mps') atfter the WriteFiles or WriteMPSParallelFiles and before executing the fortran core. Filename must match the one specified in timeevo_mps_initial
Let me know if you have some more questions here and I will be happy to help you; it is difficult to say where you might need more details as there are multiple steps.
Best regards,
Daniel