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.6.tar.gz (228.9 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.6-cp314-cp314-win_amd64.whl (228.6 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.6-cp314-cp314-musllinux_1_2_x86_64.whl (546.6 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

seemps-2.9.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (551.0 kB view details)

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

seemps-2.9.6-cp314-cp314-macosx_15_0_arm64.whl (234.5 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

seemps-2.9.6-cp313-cp313-win_amd64.whl (226.7 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.6-cp313-cp313-musllinux_1_2_x86_64.whl (549.4 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (554.5 kB view details)

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

seemps-2.9.6-cp313-cp313-macosx_15_0_arm64.whl (234.1 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

seemps-2.9.6-cp312-cp312-win_amd64.whl (227.4 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.6-cp312-cp312-musllinux_1_2_x86_64.whl (554.8 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (560.0 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.6.tar.gz.

File metadata

  • Download URL: seemps-2.9.6.tar.gz
  • Upload date:
  • Size: 228.9 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.6.tar.gz
Algorithm Hash digest
SHA256 97d65674a1cbe0dbbe02adee14c1102fd945dcfc32b659accdb9fb62a23a1fbf
MD5 610b2788359502a46229db3e55148dd7
BLAKE2b-256 db82f46b730e47e2d5a5efd17241175273368e35cc03055a90ccb29a610541e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.6-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 228.6 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.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 84a05b43852ff989a0b7df3847d40204b4cf69ca5f3954e4adc6c46c4cc340d2
MD5 616a68d41c3af2eeeef036e0b126b67a
BLAKE2b-256 b218c9c5331bd9021449439fdb1e3de14cbad719639c6282414356476e356cca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.6-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cc1d191451c2f33830923e324621f1cc76cc69f6e7e445095ac1c8b581263962
MD5 cc0a0a60ae055b92459197b7ffb7f66d
BLAKE2b-256 ec7d26759936b985b8d33e30804059ee037bccca55173d44dcc2a951a78c6c53

See more details on using hashes here.

File details

Details for the file seemps-2.9.6-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.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33ddfb3b231a350f3cc345db9f60d91f34b8235c050b8d30d00032cb3d93aabd
MD5 bb915667ed5a935114121a19655f3eca
BLAKE2b-256 1493ff85a859e89491fb7a34d1aed439cff96b56d196625b9c82674050d135f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.6-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 da5190f3b5f9fda3d97c7e1fcc250e936521a409ac5175b7c59750aeb70c4b9d
MD5 5547a0a4cc1619b0ffc23ef40b5da91f
BLAKE2b-256 9d7c2ae9c5cf7aeabcc46b6042dafd6aba3292fb602705c03256a629deb51c5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 226.7 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.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8a14e413a957b0fd6982011ae4255bb15d336f194c5a5adbeeec23742fc262fb
MD5 d0d02d3a833d95e2bc3b88977c2d3346
BLAKE2b-256 17bb7428c3ff595b3970820b7b69abd2e507d7d43e1d3e6f5e123eea37a6eba9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.6-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 919e45c098641a44130c4d8fb31e4ec0d9070471cf825d60aaa81cec159796d1
MD5 1d3c5820c1501a7692d688719bd7276a
BLAKE2b-256 28a4ce9ef5b01ce85651d7d58d907d008d11c92e7ce1e2ec5abf9ab0cf26ba30

See more details on using hashes here.

File details

Details for the file seemps-2.9.6-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.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d9a2787531feb5a62a4a8481bdf4c0d58ec326fb2ba328ad3cadb98e8640b602
MD5 8dbe65f9fc1806fa6eb99d321c4c71ec
BLAKE2b-256 bce8d9a24a2454fe037aa453c6642e41079b65ee2b4700d6e1181b9d573f65ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.6-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 76ce29713004dc7fc25b16d872344a1ffefe21569bd325d5df38910f74e16afd
MD5 1ff5654c65f3400e4901db7fc0cd881a
BLAKE2b-256 d27349a5614a0e0ab1192147dacd438b2a60030bc15e88607c8a6bf6a3360787

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 227.4 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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f17103d553fe1d2a9fa2cf67c108e32d2c75776f452e2a2d93dff8a081e01416
MD5 a95a353beae5820ae220f863f4c1c31a
BLAKE2b-256 055fbac4c2cae3a62bce33378368b4d51a9675029dd035dd5580a0446a594a66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.6-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ca05c21bba828fa59d60dd53e7b0e040a7ae2b4f2f952af141b9510973f545e9
MD5 425fc41e0a9d33f8a5394b22d9d137e8
BLAKE2b-256 aed9fd3363c63bee6b4c140a6bfdca91d0dc74332be068f57d78797f7b0b8fc2

See more details on using hashes here.

File details

Details for the file seemps-2.9.6-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.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fec4a41a4f823aa617904f47e8f875780dabb0b4efb3afb41fbf7ee8aa9bf95f
MD5 5c9ef6b5efe7340ef1edf420eba0c425
BLAKE2b-256 a7ba5b07ec3826355b5e21a7d177a4495729cd73b07aafd9c0be0fd2f15da41b

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