Skip to main content

Matrix Product State library for quantum simulation and numerical analysis

Project description

SeeMPS

Introduction

SEEMPS is the second iteration of the SElf-Explaining Matrix-Product-State library.

The original library, still available here was a collection of Jupyter notebooks with a well documented implementation of matrix-product state algorithms.

The current iteration aims to be more useable and have better and more standard documentation, while preserving the same degree of accessibility of the algorithms.

Intended audience

The library is thought out as introduction to the world of Matrix Product States and DMRG-inspired algorithms. Its main goal is not performance, but rapid prototyping and testing of ideas, providing a good playground before dwelling in more advanced (C++, Julia) versions of the algorithms.

This said, the library as it stands has been used in some heavy-duty simulations involving tens and hundreds of qubits, and, in particular, its current iteration arises from two works on quantum-inspired algorithms for numerical analysis:

  • Quantum-inspired algorithms for multivariate analysis: from interpolation to partial differential equations, Juan José García-Ripoll, Quantum 5, 431 (2021), https://doi.org/10.22331/q-2021-04-15-431

  • Global optimization of MPS in quantum-inspired numerical analysis, Paula García-Molina, Luca Tagliacozzo, Juan José García-Ripoll, https://arxiv.org/abs/2303.09430

Usage

The library is developed in a mixture of Python 3 and Cython, with the support of Numpy, Scipy and h5py. Installation instructions are provided in the documentation.

Authors:

  • Juan José García Ripoll (Institute of Fundamental Physics)
  • Paula García Molina (Institute of Fundamental Physics)
  • Juan José Rodríguez Aldavero (Institute of Fundamental Physics)

Contributors:

  • Jorge Gidi

Development

Environment

For optimal development the following is expected:

  • uv from Astral is installed
  • In Linux, if you wish to use a local version of Python, you might need to install the python-devel package or equivalent one. This also installs a C and C++ compilers.
  • In Windows, you need to install a Visual Studio C++ (Community Edition) compiler to build SeeMPS.
  • A copy of Visual Code with the Python extensions installed plus some additional recommended extensions:

The environment is bootstrapped using

uv sync --dev

This installs both the SeeMPS library and libraries that it depends on, plus additional tools that are used for development:

  • ruff, for code linting
  • mypy and basedpyright, for type checking
  • coverage, for code coverage

On top of this, please use

uv run scripts/make.py --install-hooks

to ensure type checkers and other tests are run before committing changes with git.

Testing

The library contains a rather complete set of unittests under the tests/ folder. The tests can be run using the standard unittest module, as in

uv run python -m unittest -v

The code coverage of the test suite exceeds 88%. To analyze test coverage you can open a terminal and run

uv run coverage run -m unittest -v && uv run coverage report

Alternatively, you can use

uv run coverage lcov

to create a coverage file that is interpreted by the "Coverage Gutters" Visual Code extension. There is a task (right-button option in the explorer) with the name "Run Tests with Coverage" that both runs the tests and automatically creates the reports using

uv run coverage run -m unittest -v && uv run coverage lcov

TODOs

  • Update documentation.
  • Pull request with local developments (computational tree, Hadamard sketching (HaTT), etc.) and breaking changes (TT-cross, orthogonal polynomials, integration, etc.).
  • Add problem-specific tools: quantile estimation with binary search (for Value at Risk), MPO cumulative sum.
  • Many functions are declared to accept Interval, when they actually can only use RegularInterval or ChebyshevInterval

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

seemps-2.9.1.tar.gz (222.1 kB view details)

Uploaded Source

Built Distributions

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

seemps-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl (534.4 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

seemps-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (538.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

seemps-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl (537.2 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (542.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

seemps-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl (542.6 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (546.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file seemps-2.9.1.tar.gz.

File metadata

  • Download URL: seemps-2.9.1.tar.gz
  • Upload date:
  • Size: 222.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seemps-2.9.1.tar.gz
Algorithm Hash digest
SHA256 a70d38cb8c0e6c9d57287288832438c9ccb32bac581c7fd93b91cd02abf44b4c
MD5 ef1131b9eca12130263b9f91f0ef55a7
BLAKE2b-256 bab4007c4a403114f846698b689da545bd5ec296fb50cf524620cab7f8ab677d

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0b2a3879f8a04a51807c65c90ecb634b9fa6de1c772998f8dad93c3653f5f151
MD5 925208057c633b231a0ae6c1d7437a54
BLAKE2b-256 c17b2922774488db2d4254429bf6891f568a305b5d15768e817c5be4dbc62152

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c499f66f2b909f294e07f39968ef9c1be7e227ddadb64499b8f9f1f269214d16
MD5 e79ed312a360a3fc80b822209e0b7440
BLAKE2b-256 4dfc71de7b45420b1aa649ee50ae7692168c8515d132e53d2c302857ca76f786

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dc8a707e40782991c16e75e15da17adedc729bc284cae9cfe6842be26d172ee1
MD5 555f3ee3d910a32c3df607d32b910da5
BLAKE2b-256 9981efbc31e0c59d41dc7f2a08e061bb7aaf1a3c2c0d2fca97d7cc0cd5af12fc

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1faadd64bc0a9c59cdffc9d45fddf62b650749a6bd8c6cf5ac6e73318e852b0a
MD5 dc7c4b395d25c8ae31192249c6263cdd
BLAKE2b-256 2dd814929d043a376d9c8ce675e186b88def3c1eb7965bba8f39740eb41a0e73

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5bb2c456d818c9b3b4d6bfe68403a8500ddb601d86b20d7020a368482e88936e
MD5 e2d14576a039683325a0ac58c3f5f68d
BLAKE2b-256 545017de5d0521a22d09844442c87163f1b714a75d062cc14f1a9a18beb513ff

See more details on using hashes here.

File details

Details for the file seemps-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for seemps-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 57c63237e259240bc531ec8e6f8e6ba02c433e30b3279473b8395b5eb8f6888d
MD5 76b3bc740260db5f5c4db9df8da89a7e
BLAKE2b-256 0bfff2bb148069068afb064a95cba64d70ff107a518e4a38313e96a8da50c7d2

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