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.3.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.3-cp314-cp314-win_amd64.whl (218.3 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.3-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.3-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.3-cp313-cp313-win_amd64.whl (216.4 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.3-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.3-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.3-cp312-cp312-win_amd64.whl (217.2 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: seemps-2.9.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ab1f03efd86504cff8f29b4b8ed545c8619b77a71e6d12bbaa373232e73ee08c
MD5 1ae7548052f6286ae07f872d05fc9a12
BLAKE2b-256 a643340ef3abd4f589a78328f1f02dd6ec30ce60e90f238366e8f662e52fc459

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: seemps-2.9.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 218.3 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seemps-2.9.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 25f3820ab0d6afbc4f31247c620ec3b48be9cf9797c4b1bc2a60db458ded7a5a
MD5 1d35717ca8d00cf210ae1e82e4e67765
BLAKE2b-256 7c0ba1e028890ea10150d0057f6e839f8375fda13ec65ee63528f0af98e25c97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.3-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2dc36441af6da048135e444bdcf9b65de811ad97f7afec54125e60875683366d
MD5 44eb7529bfa2451a31a93ee70a5e8c4a
BLAKE2b-256 f1709e28f324cc30eea84705f8fa7b90eccef784ed4324cfbc0b4cb7d025a0bd

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-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.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cac8d6199ff9c3b89ae7abbcfd4904602d685b4029099558f7ba872cb14f5233
MD5 f696c67b031495c83daa049ddd23427b
BLAKE2b-256 292b161116e2ab3b6a4f9ebd8bcf2a87ed80aacf2230b7b15631bad74f6fdfc2

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: seemps-2.9.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 216.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seemps-2.9.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fda710f9f4235d69557aab6f8ca3078848cb261b16ee8ac923191f988b9fefb9
MD5 1c6f10fcb6c64ed131880be94c5fc5f8
BLAKE2b-256 a4affb9a6f645ae6ec1dcee12ec806a8c2c46648fbc2f02912b1fe37e32707ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e3c660d5982ba0540ce8593863c7270f015b9bdcab60fcf33a8324818b39cc0
MD5 919aaa5c9ee1d89d1821edcad19ec20c
BLAKE2b-256 95493a01beb49d3e8ccf2aaec42632ba582d6a54fffc4447f1026476dc43a063

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-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.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 006b21de3e75c698b58a87dce7f1a561c9c6ade291f58b1e64c99da3ce9668ff
MD5 7b52f64e66ca1afa8d8e17eb5714422d
BLAKE2b-256 6872f595220ce7927abfbe5472c9cd8e5628fde872d4e748fdf97e06827f2b6a

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: seemps-2.9.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seemps-2.9.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 16707343f33a509269cf25fe0ff9bda4537513cf55fbf39e4e1a23450de2d912
MD5 96f11f4e131f16e0647c1933b5289d44
BLAKE2b-256 b83141871a151eca955ba0ca9e5c2fdc46db286e681bc988be40852775935565

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d99a4ea0a4f05d4769c49907f8372d3a5ff3c22cfc218e26bfee3141d726b6a5
MD5 a95d4a6399bd518ec1d4bc54f388f198
BLAKE2b-256 cc9b020e832f17af46369713223d70646ec86acb75bd38447abdd6605dfa9029

See more details on using hashes here.

File details

Details for the file seemps-2.9.3-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.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b015bf2a14f87a93bed71cc19e314119ac007a5ea59b349dbdcaf342305bd02
MD5 9778ad2fc777ab7819f960c9ad794830
BLAKE2b-256 6e39271ac69f9bf98ee96f78878705c55e7d710eee02c7d23bb5cb81b529c332

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