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 the following 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

  • Chebyshev approximation and composition of functions in matrix product states for quantum-inspired numerical analysis, Juan José Rodríguez-Aldavero, Paula García-Molina, Luca Tagliacozzo, Juan José García-Ripoll https://arxiv.org/abs/2407.09609

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.
  • 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.5.tar.gz (221.7 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.5-cp314-cp314-win_amd64.whl (221.1 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.5-cp314-cp314-musllinux_1_2_x86_64.whl (539.1 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

seemps-2.9.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (543.5 kB view details)

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

seemps-2.9.5-cp314-cp314-macosx_15_0_arm64.whl (227.1 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

seemps-2.9.5-cp313-cp313-win_amd64.whl (219.3 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.5-cp313-cp313-musllinux_1_2_x86_64.whl (541.9 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (547.0 kB view details)

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

seemps-2.9.5-cp313-cp313-macosx_15_0_arm64.whl (226.7 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

seemps-2.9.5-cp312-cp312-win_amd64.whl (220.0 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.5-cp312-cp312-musllinux_1_2_x86_64.whl (547.3 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (552.5 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.5.tar.gz.

File metadata

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

File hashes

Hashes for seemps-2.9.5.tar.gz
Algorithm Hash digest
SHA256 160ea16333fd18011134f27a844614659bfca75639e40ad3458c79e79553ac92
MD5 2a540cc51dfc645f8739d1a3d49065b6
BLAKE2b-256 5972958a57f3ecb99549454d9de620065ca83a47bf3292cbe2f66e773a03810a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for seemps-2.9.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cea3210cde6611d117bc902ff113336a0811139142f7438450a2da1bf35053c2
MD5 b3f393c3bb4a7528d29a0d72d954bf6f
BLAKE2b-256 93376b10331755fb38bac5fc90013aff018dcfbb99802b45bc96ea42ca49a525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.5-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 26b61acdd508ff7e36d33e6cd396fbf1b2f185153e3c9ef7464f76c75637a9a9
MD5 eb2ec26ef6e10b62bcd39ef57576c063
BLAKE2b-256 55354d80c037c7cd978793bf34cc7761d403c036d5bb4307d1e769bdcc228e17

See more details on using hashes here.

File details

Details for the file seemps-2.9.5-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.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb1cadb0ac4d1c9290b40514d2603c4b7d94dd59a54285bf7ba9643eed86129d
MD5 3e88c10b70c8d4fbb6975a32157dfd3d
BLAKE2b-256 20675196a9863e6a9fb1706854cf481b8c540c0da7fb71c08765a2280bbab748

See more details on using hashes here.

File details

Details for the file seemps-2.9.5-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for seemps-2.9.5-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7929266957e2ec2dee17de35df7f364b7ca73c0847a909d5d5d8931881bbd538
MD5 527200a65640cbbe79ddde6d02f9feaf
BLAKE2b-256 e54cbd6bb33d27bbd6ca6991be3489f53aac28bac42965cac1d44d2f9c571df7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for seemps-2.9.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b5c419911c9c95ab50cd86661b2fcf29aac6f1fcc6eb5d57b1b210a001e0f9ab
MD5 f143944e6894d30ca6c0e8ff33bdd8c9
BLAKE2b-256 f79db01f0867203ee039bc2db63eda83fce95db5e03a1575268f74e213cdb704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.5-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 34d43e86cabdb5891b787143d200fe10630d219c6d6ea31896394ad0fb9b8e07
MD5 fe36a9dbcc241c4f6012dc9cc72bfd5e
BLAKE2b-256 048f79a17cd5adfbe9a9910379a8b4a9caf7c5dc4e6b54bbd42b9df8d93c22fd

See more details on using hashes here.

File details

Details for the file seemps-2.9.5-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.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c86a575fa9265ef28a5f104953036163b69ce550de1f009e357818feb8b20b6
MD5 6f18b60d0f91c6e130056327e1bc2879
BLAKE2b-256 b73ba30dd7903b4115d44bb050982d2df947de62a45c5293ad6c21890533fd97

See more details on using hashes here.

File details

Details for the file seemps-2.9.5-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for seemps-2.9.5-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ebb852ea144b4ba469206562f554521e4865d565e1154e2ac991b817da782a06
MD5 07fbf0e109ee955922cadc10ade44303
BLAKE2b-256 05604e6dfd73c02432e1256017f9a3ad78bc1e20c99ec80e77d70ea06fae54ce

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for seemps-2.9.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 167e8820b49f38e9873f1875301cbd9188f27cdc0a8a03cb5819d6988d2ec8a3
MD5 29c99cd85e69472017ea899720c560ce
BLAKE2b-256 7127f0f4b1106ca3234b856ffbeeebae0e202d55cd1ce009d7093102b2fd01b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.5-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d8243ed06eb190bd9b908a15b350cb6cd53d72a3c47d8f4a33ed6e849f3e7b5b
MD5 854730429637de14bb45bc13c40af6ed
BLAKE2b-256 f847e58750c7224afc308c4e9ab87db38fb37f54e78da0b7f2fdba00a5c217ae

See more details on using hashes here.

File details

Details for the file seemps-2.9.5-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.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8ae2027313577bc88ffab8921f8a6e41263d35daddaf476ce2484bcd240ddea
MD5 d86e74baec01ea0bccb3f990eb1f0728
BLAKE2b-256 3909404fcca627c4555d6ff6c552c9d7eb5d1165b7caf20d05c031b5feaa1aff

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