Skip to main content

Quantum Manybody Problem

Project description

An efficient Neural-Network Quantum States Architecture for Strongly Correlated Systems

The Quantum-Many-Body (qmb) is a powerful tool designed to solve quantum-many-body problems.

About The Project

This repository hosts a Python package named qmb, dedicated to solving quantum-many-body problem. It implements a suite of algorithms and interfaces with various model descriptors, such as the OpenFermion format and FCIDUMP. Additionally, qmb can efficiently utilize accelerators such as GPU(s) to enhance its performance. The package's main entry point is a command line interface (CLI) application, also named qmb.

Getting Started

Users can run this application either using Docker or locally. Both approaches require GPU(s) with CUDA support and a properly installed GPU driver, which is typically included with the installation of the CUDA Toolkit.

Run with Docker

After installing Docker with CUDA support, pull our prebuilt Docker image using:

docker pull hzhangxyz/qmb

If users experience network issues, consider configuring Docker mirrors.

Then, user can run qmb with

docker run --device=nvidia.com/gpu=all --rm -it hzhangxyz/qmb --help

This command utilizes Docker's CDI feature to enable CUDA devices in --device=nvidia.com/gpu=all. Alternatively, for legacy support, users can run:

docker run --gpus all --rm -it hzhangxyz/qmb --help

Please note that we currently provide Docker images for Linux/AMD64 only.

When running with Docker, users might want to mount a local folder to share storage between the container and the local machine such as using the -v option.

Run locally

To install locally, users first needs to install the CUDA toolkit.

The qmb requires Python >= 3.12. After setting up a compatible Python environment such as using Anaconda, Miniconda, venv or pyenv, users can install our prebuilt package using:

pip install qmb

If users face network issues, consider setting up a mirror with the -i option.

Users can then invoke the qmb script with:

qmb --help

Please note that if the CUDA toolkit version is too old, users must install a compatible PyTorch version before running pip install qmb. For example, use pip install torch --index-url https://download.pytorch.org/whl/cu118 for CUDA 11.8 (see PyTorch’s guide for details). This older CUDA-compatible PyTorch must be installed first, otherwise, users will need to uninstall all existing PyTorch/CUDA-related python packages before reinstalling the correct version.

Usage

The main entry point of this package is a CLI script named qmb. Use the following command to view its usage:

qmb --help

This command provides a collection of subcommands, such as imag. To access detailed help for a specific subcommand, users can append --help to the command. For example, use qmb haar --help to view the help information for the imag subcommand.

Typically, qmb requires a specific descriptor for a particular physical or chemical model to execute. We have collected a set of such models here. Users can clone or download this dataset into a folder named models within their current working directory. This folder models is the default location which qmb will search for the necessary model files. Alternatively, users can specify a custom path by setting the $QMB_MODEL_PATH environment variable, thereby overriding the default behavior.

After cloning or downloading the dataset, users can calculate the ground state of the $N_2$ system by running the command:

qmb haar openfermion mlp -PN2

This command utilizes the imag subcommand with the descriptor in OpenFermion format and the mlp network, It specifies the $N_2$ model via the -PN2 flag since the $N_2$ model is loaded from the file N2.hdf5 in the folder models.

For more detailed information, please refer to the help command and the documentation.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines.

License

This project is distributed under the GPLv3 License. See LICENSE.md for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmb-0.0.51.tar.gz (76.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qmb-0.0.51-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file qmb-0.0.51.tar.gz.

File metadata

  • Download URL: qmb-0.0.51.tar.gz
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qmb-0.0.51.tar.gz
Algorithm Hash digest
SHA256 3b282a63234ce449fa4b702bd22a0252ef5aee6ffbd6b09e2ad790dd76972e06
MD5 91d0ecc13cad76961873c87a0b486a0f
BLAKE2b-256 7418b9b4dffa77121300fadbdcc20c26e790b835a94a9ef76f06ca2a3437e900

See more details on using hashes here.

File details

Details for the file qmb-0.0.51-py3-none-any.whl.

File metadata

  • Download URL: qmb-0.0.51-py3-none-any.whl
  • Upload date:
  • Size: 79.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qmb-0.0.51-py3-none-any.whl
Algorithm Hash digest
SHA256 5d3bd5d280790ca1fb4ac1b2980c21b754eb7da33bf55174ad96a19ebb24550a
MD5 6cf33dcefd1d00f46666e9ec25016f9a
BLAKE2b-256 e8a52c233a03fded4df48de07e0200a1abe20c88303efc50e935837459987e58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page