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

  • Pseudospectral method for solving PDEs using matrix product states, Jorge Gidi, Paula García-Molina, Luca Tagliacozzo, Juan José García-Ripoll https://arxiv.org/abs/2409.02916

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.7.tar.gz (240.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.7-cp314-cp314-win_amd64.whl (236.8 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.7-cp314-cp314-musllinux_1_2_x86_64.whl (555.0 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

seemps-2.9.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (559.4 kB view details)

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

seemps-2.9.7-cp314-cp314-macosx_15_0_arm64.whl (242.7 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

seemps-2.9.7-cp313-cp313-win_amd64.whl (234.9 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.7-cp313-cp313-musllinux_1_2_x86_64.whl (557.8 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (562.9 kB view details)

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

seemps-2.9.7-cp313-cp313-macosx_15_0_arm64.whl (242.3 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

seemps-2.9.7-cp312-cp312-win_amd64.whl (235.6 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.7-cp312-cp312-musllinux_1_2_x86_64.whl (563.2 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (568.4 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.7.tar.gz.

File metadata

  • Download URL: seemps-2.9.7.tar.gz
  • Upload date:
  • Size: 240.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.7.tar.gz
Algorithm Hash digest
SHA256 b9cdae56c4d788e93b081052707933259ddf017ebdf7d3fea8578d824df38940
MD5 ec3b2154a8ee910e3b3f1ae1cf9ddcb6
BLAKE2b-256 8ade1899c7db9bc2571d342e2f93ce3d113358b8da1c6e22ba8a9656246d786d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.7-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 236.8 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.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 acbf879f41d5f9a8049d66d7ccd8a4077f1854f0cd731b6580e9c59e5eed4ad1
MD5 05013c19433da167ab17197eea51e196
BLAKE2b-256 f6280c84f2c96dfaf614e21f952b780f56fdeed947e47ec7c593186910d7d267

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.7-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 92f161cc0c95634a2a65254f956f608dffacbb551b14448d2966c458a7c7dfbb
MD5 077904ebfd116cc3e3ee533188473944
BLAKE2b-256 5f0a00395eba66dc1ee45a911a2af3bab02c8dcb850b235a10205ef83a54cbde

See more details on using hashes here.

File details

Details for the file seemps-2.9.7-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.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eef3e88a237c9559daee55cacf02e786c0aee0aa91015b16d055b9000a0312d9
MD5 cf5728107625e1730ea9dc3ec7fe8314
BLAKE2b-256 00ddc74fd250a03cfe9f02c37e58a5bf7d478a8b4fd2e91558f5893c04bdc1c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.7-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eca62a19b9535e7f2a4ea271c15049cb213fb1b2fb04af5675b417f12477feb8
MD5 4ac1235c96c688ad38bd215232851f0e
BLAKE2b-256 9a38a14ce6bc009dfcf931bdc277f5adc50f4cb366e568d8e8b73939944059bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 234.9 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.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 65321e9ddc12f1f6053c07be6a6e71b175ee54f1429e5ead0e4839e18c45005e
MD5 202b80b88b57eb0f529456558ea57e64
BLAKE2b-256 29dbafa852b64cf3d0fa04c42b87996b4d1f2509991861e886f4a909cb4524a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.7-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f323d11806d529ec19fc1202a9655a71623664cb15bf84c7dcb100134a700653
MD5 5b2f9b9d96d614722b56469860a708ef
BLAKE2b-256 a3408d22ddd255a109eeafcba4dc57b7ed377508f6c8ee22cc49767b1ef04c57

See more details on using hashes here.

File details

Details for the file seemps-2.9.7-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.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21ba24ba0c6fadcee61c288d82234b08f128915b8f0cdd9be10b45b8a6bbda9f
MD5 ae5711f92db60a0da457f44e07de80a3
BLAKE2b-256 d25d834b4d54a7f4cb6a3103b014b92537125b8b94f99a3b9354f2e6384ffa12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f4096079e349837b85930be463ce133f9a9059707cd4ee80b9a0c4cda80a5895
MD5 a346f926bcd146c73c48219ad640848c
BLAKE2b-256 204b6070b987cc18e17c81ec6e376fd027804ddec57cb197ec5bb093ee7fd76d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 235.6 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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d6d56693261c92833ce45588e25a4b547489c48f298d8e796056b295360744a1
MD5 1f8cf3fc092444cf712f406ef9f32d89
BLAKE2b-256 8b629a7429098ce588cc8ced9dd8481a0fd1ce1f7f0d40bd528e1344c428da6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.7-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e958f4d66bb8ceba2f7602acf919f5204ad6f8499c45ba7287d9f9e4ef11f758
MD5 99f1d35fd48de68f6f899ec93f48df9e
BLAKE2b-256 5b2d8b793df3986c20853084f3b3c79a05af8b26aff3c7241ec7081ecd14f345

See more details on using hashes here.

File details

Details for the file seemps-2.9.7-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.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0eb17c56113d4ee9aaa9d0b350f5602b37bc95e65a856dc1b3a27659fe8eb2a
MD5 e80421be0dec191088932e05d5aca20a
BLAKE2b-256 8b53054c119082482a9cb8e6c8221698a02c5ab854983b876c66b13ac0527fd0

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