Giter Site home page Giter Site logo

gregdmeyer / dynamite Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 6.0 3.17 MB

Fast quantum evolution and eigensolving using Krylov subspace methods via the PETSc/SLEPc libraries.

License: MIT License

Python 79.02% C 12.30% Makefile 0.08% Cuda 4.41% Cython 3.17% Dockerfile 1.02%

dynamite's People

Contributors

flmachado avatar gregdmeyer avatar jack-kemp avatar yx14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dynamite's Issues

64 bit from container

Hi Greg,

Thanks for creating dynamite!

I would like to use dynamite for some research I am doing on SYK type models. I am looking to calculate spectra for Hamiltonians with number of fermions N>30. I am having difficulty installing from source onto our cluster so have been using singularity to run from container. When running my code N=40 for example I get the error:

5280628736 is too big for PetscInt, you may need to ./configure using --with-64-bit-indices.

Is it possible to run with 64 bit from a container or would I need to work out how to install from source?

Thanks
Sam

Error from setup.py when installing from source?

Installing the latest version of dynamite from source

Hello, I already have a version of dynamite installed on my system from 2021 and I wanted to install an updated version on a separate Linux machine (from this branch or the dev branch).

I have installed PETSC and SLEPC from source using the 3.20 release of both and both libraries have passed their checks.

When I get to installing dynamite with pip install ./ I get an error from the requirements to build the wheel which seem related to the CXX_FLAGS added in one of the latest commits:

Processing /bwfefs/home/erinaldi/Code/dynamite
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Writing header files...
      Traceback (most recent call last):
        File "/home/erinaldi/OSS/miniconda3/envs/dynamite/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/erinaldi/OSS/miniconda3/envs/dynamite/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/erinaldi/OSS/miniconda3/envs/dynamite/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-6ec87jbg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-6ec87jbg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-6ec87jbg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 223, in <module>
        File "<string>", line 22, in main
        File "<string>", line 95, in extensions
      KeyError: 'CXX_FLAGS'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Question:

Is this an error that has been solved already?
It happens both in the dev and the master branches.

System

python 3.10.13
pip 23.2.1
setuptools 68.0.0

Readthedocs main page shows the wrong docker command

Hello,

I would like to make sure that I am not doing anything wrong when running the tutorials in the docker container image of dynamite.

The main page https://dynamite.readthedocs.io/en/latest/ of the dynamite documentations shows a docker command:

docker run --rm -p 8887:8887 -w /home/dnm/examples/tutorial gdmeyer/dynamite:latest

which does not work as expected.
In fact it does not have jupyter installed and I suspect the command should be changed to

docker run --rm -p 8887:8887 -w /home/dnm/examples/tutorial gdmeyer/dynamite:latest-jupyter

I also have a related question about running a MPI jobs with dynamite using the docker container but without singularity or shifter. Is that actually possible?

Zero Elements in Sparse Matrix

Sometimes we are able to add and subtract terms form the Hamiltonian, such that we have zero terms in the sparse matrix.

We should be able to clean these terms, or at least check when the value associated with a mask is 0 so we can disregard it.
It is probably incompatible with our current scheme but being able to detect all zero terms and killing would be nice in the future!!

Below is a MVP of this issue:
a = Sigmaz(0)-Sigmaz(0)
a.L=1
print(a.get_mat().view())

output:
type: seqaij
row 0: (0, 0.)
row 1: (1, 0.)
None

Thanks!

eigensolve with mpirun

Hi Greg,

Is the function dynamite.computations.eigsolve designed for multiprocessing? If I run:

    energies_start = time.time()
    energies = H.eigsolve(nev=n_ev)
    energies_end = time.time()

With for example mpirun -n 10 python my_script.py it seems to run slower than just python my_script.py.

Thanks
Sam

Tensor product of states?

Hi,

The package is quite neat and user friendly, so kudos!

One thing I was trying to do was build up states which are tensor products of smaller states. I was wondering if it makes sense to suggest including such functionality in the library? The operation shouldn't be too difficult, but just wasn't sure if it was in the scope of what others would find useful as well.

Thanks,
Vincent

Imaginary time evolution

Hi,

thanks for this amazing library! Is it possible to choose imaginary times in evolve()? Together with typicality (i.e. averaging over Haar random initial states), this would enable computations of finite temperature expectation values.

Alex

Multiple realizations of disordered Hamiltonians

Dear Greg,

Thank you very much for this fantastic package!

May I ask a question about simulating the evolution with disordered Hamiltonian? I can think of two ways, one is to insert the random seed according to the rank of the the mpi processes, so difficult mpi processes return us results from different disorder realization; the other is to use all mpi processes to evolve the system with the same random seed, then repeat the computation with a different random seed.

Could you please kindly comment on which way is better in dynamite? Or there are other good strategies?

Thank you.

Best regards,
Sen

Multiprocessing

Hello, we managed to install dynamite and we are very impressed how fast and optimized is.
I have got a very stupid question that you may know the answer. Is dynamite capable of multiprocessing calculations?
We can of course run it with mpirun but what we would like to do is to use several cores for a single task like computing time evolution for a certain time. In other words, we know how to run the code in parallel so that, for instance, we assign a core to each point of time evolution. However, we would like to assign several cores to each point of time. We have tried to combine the standard multiprocessing package with dynamite but we have not been successful. Many thanks, Antonio

Time-dependent Hamiltonians - ramps

Thanks so much for this package!

I was wondering whether it is at all possible to extend this framework to allow for general time-dependent Hamiltonians, specifically in order to describe ramps H(t)=(1-s(t))*H_0 +s(t) H_1 ? One possibility would be to trotterize, but maybe there is a better way, for example by using a GPU-compatible ODE solver.

Renyi Entropy is wrong

Made a mistake in the implementation of the Reniy Entropy and it is missing a log term
Will send PR today

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.