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.8.tar.gz (261.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.8-cp314-cp314-win_amd64.whl (238.3 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.8-cp314-cp314-musllinux_1_2_x86_64.whl (556.5 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

seemps-2.9.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (561.0 kB view details)

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

seemps-2.9.8-cp314-cp314-macosx_15_0_arm64.whl (244.2 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

seemps-2.9.8-cp313-cp313-win_amd64.whl (236.4 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.8-cp313-cp313-musllinux_1_2_x86_64.whl (559.3 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (564.4 kB view details)

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

seemps-2.9.8-cp313-cp313-macosx_15_0_arm64.whl (243.8 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

seemps-2.9.8-cp312-cp312-win_amd64.whl (237.1 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.8-cp312-cp312-musllinux_1_2_x86_64.whl (564.7 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (569.9 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.8.tar.gz.

File metadata

  • Download URL: seemps-2.9.8.tar.gz
  • Upload date:
  • Size: 261.1 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.8.tar.gz
Algorithm Hash digest
SHA256 7853ad2589d73f175a25c2ae18328be7f7b02ff3bd8a5cc5fe76094a89aaceab
MD5 9df97dfcb6191e567017a1a186de183d
BLAKE2b-256 ae6ff2902fd718d62a409b0c73ba42c2cca66b3e66f0cd09aa34e4e8c7b0bbf2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.8-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 238.3 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.8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 0627353c4fc5bae5887b70d923cb9dd5fd70247c16f84ac47b0269f6f0308aa0
MD5 2c17085b4ad4363251f73cce6ff5ec19
BLAKE2b-256 c463e0fca783908326db2667c6c75c843e511fc98abe9499a0b4a91d8a0c51d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.8-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 25dfeec1b18b85def3fef75e0bba1400990ac1722492e47c945d53f71fed7616
MD5 a2bbd4fbaf04e5aa7a64611495e01e35
BLAKE2b-256 871eab0dd4b78f20c0c0b8ee5fec17fc7737a87ed7e116bccc575a2408f48765

See more details on using hashes here.

File details

Details for the file seemps-2.9.8-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.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37eab86b1802ae03fcf4bfbd8208e70350ad108cab10dfc660fdac0f93651cb5
MD5 812e2f805521c8e616aa823821986d1f
BLAKE2b-256 14e5e18cf038d14ee37516f78fed14a17ae20755ce6004373e96c2198b77abac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.8-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 372455ff06270c01581630b7a822b4dbdaea870e227a94d6f3d275f717a267e2
MD5 701487c2d0df0ae3601f5d2ec03348d0
BLAKE2b-256 af0cdbcb3c01b0c5d8ef3ae5cd3988a6448f2b40b522605b25f157c0d193050c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 236.4 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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5bd27613f718abb8db9991546bbf395ecfd9dbbffd684474df286d4fd12a3fa5
MD5 4fb519674a18bec184e0c18eac30ced1
BLAKE2b-256 5ca9db6911fafeb1304c5a3f4ca283b8a6360898ef9274bf8bc444bc717758f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.8-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 59ef9805170fbfd858e6faca1d01b2943bc6ebc61b4a4cb87579cbed35da661d
MD5 8bc6a5e93676e8902eb1ca5c40c07b47
BLAKE2b-256 bec8cf03b78fd54a4f5d5803165235b096226d5d1c21a55f6b27882cd1aaee90

See more details on using hashes here.

File details

Details for the file seemps-2.9.8-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.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fcc26cfb65eb5870cf70a831992aa779c05831ec89d9f01a8b676a7b45d94ae2
MD5 357eb96e9f7f74d944dd3641b9b6efa0
BLAKE2b-256 49a7b47eb4b0a76a5bafe1a078040b4fdc6cc786e2d85e84db2d846b25bad17e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f5912ffd58264905b1ab7d5e4980e4a359c854a576da3ada04dba5954b7afc36
MD5 5dea06e024958bd7919ecb3ede5ba8b8
BLAKE2b-256 6e365248600cd26c376c4f5e6da7151eccc369f715992f9f15d9e86d3469e41d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 237.1 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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b05883a02c8af666daf1fd7f979d3bf167da34ffc7f50eae1910f6e0b911f798
MD5 6b2b75997f68a849c51977fd605b45de
BLAKE2b-256 2652861c06bfd382c1c000e0d44c238c0df746b92403ce2d54e7c01d7ac69880

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.8-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f9adeb93388dc19968c9133848a1d7415876fdcf99f2c59605cfd3c9482938b2
MD5 580a6c1abc13acd4ddc83780daf9a985
BLAKE2b-256 08feb1b5f1d00977096cc8a4417afcabab859c5dd3c4b7b44ef5fb508aafce8d

See more details on using hashes here.

File details

Details for the file seemps-2.9.8-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.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 021fe751e3541c62c8d1578e63859dd486c8bc15de0739f30430211f251ff6fe
MD5 0a7588a1fc55446df3345c0994326b7d
BLAKE2b-256 69cc9063c73058996f9e6c2bc13c09d214fa09543f8f02a8d0e4f30edb3c246a

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