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.4.tar.gz (222.0 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.4-cp314-cp314-win_amd64.whl (218.2 kB view details)

Uploaded CPython 3.14Windows x86-64

seemps-2.9.4-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.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (538.6 kB view details)

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

seemps-2.9.4-cp314-cp314-macosx_15_0_arm64.whl (224.0 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

seemps-2.9.4-cp313-cp313-win_amd64.whl (216.3 kB view details)

Uploaded CPython 3.13Windows x86-64

seemps-2.9.4-cp313-cp313-musllinux_1_2_x86_64.whl (537.1 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

seemps-2.9.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (542.0 kB view details)

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

seemps-2.9.4-cp313-cp313-macosx_15_0_arm64.whl (223.8 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

seemps-2.9.4-cp312-cp312-win_amd64.whl (217.1 kB view details)

Uploaded CPython 3.12Windows x86-64

seemps-2.9.4-cp312-cp312-musllinux_1_2_x86_64.whl (542.5 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

seemps-2.9.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (546.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.4.tar.gz.

File metadata

  • Download URL: seemps-2.9.4.tar.gz
  • Upload date:
  • Size: 222.0 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.4.tar.gz
Algorithm Hash digest
SHA256 7acd78d35503b2d9bb384639be5583b170c6ed1abf4144cf5eacce4fa3713b2b
MD5 998c608f9e97cbd3d7ccdc681864effe
BLAKE2b-256 799c18e74b1c9d934bcad84057f10d1918797eb7fd71f44d456acd75c45cb887

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.4-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 218.2 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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a875691cb832ae34f31b4a2ac95bbb35bc03b15109cb556df04dd58ee7cf53ee
MD5 3f60c096a7122a6fbf11fbed57a928b5
BLAKE2b-256 729efece4bba59dc40097d9d9b3ca5b04f88cdf4e857f9befdb13dac5c77f078

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.4-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 802e9140aff8604f1829ea4f133c6369892c32993279bcd1909ab04547267167
MD5 f21510de81af485fdf97d7fd8e290f3e
BLAKE2b-256 719bd722d5a3af1d71b6abf995c5e309f102342bd8e02975fa839c9d686da199

See more details on using hashes here.

File details

Details for the file seemps-2.9.4-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.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33ed5e2182e156f6b636ba1014061db43f26dab2b94f68de0fd27293230fd88a
MD5 685bc80a41e37effc9cf691e2e18a00b
BLAKE2b-256 3010d470153331e81c69a775f7fa5ba1792b050d486142664531c6fc4d8e2ae3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.4-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c1e1be95a999566a3793980984d1299e8e8ff71041212f571600f3c66f0c4301
MD5 21b1ac2e01141496a2e65dd27ed5a0b2
BLAKE2b-256 4091bbe27bae0857f1f861bb4fe25d69403687a87e327640393270894d4a941d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 216.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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3a4f4a99da5318900f95c29e5c71e88a82a023f4bb9870f64011fe63cb526fd2
MD5 de595df805a82f2321c976a7f2bff2c3
BLAKE2b-256 78497d42d3ed016300b7f93d46f0608877c61647071ca3936f05a230f6673986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 87e53ce0ab5db9ba860bcca218618cdd66cf9add83190bf67e9e97c3e9e3763b
MD5 bffe83f6baa4a881204196636765918d
BLAKE2b-256 523556b64637e8876447278d34609604f98c291e84fd17171b957c8fea103c9f

See more details on using hashes here.

File details

Details for the file seemps-2.9.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9fa64b59141992de5e2e49e94af0fbb1b98c532c8cddf03293de907f5927368e
MD5 3e2027f45112bfd561545949cfd7eba7
BLAKE2b-256 96d69124cbeabd807120063e187377fd53e4d319847ba4abce67ab48cb238fd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.4-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c10b714002bf99555fb7959a2dce4e523adccc461f12c689fac36f19ecc1c91a
MD5 ddaf875009e7b95c2299b056496977cc
BLAKE2b-256 9c9a4dceff41d969874001b4ab4f08a446c15c10b9e19497b526bc9881b5cf52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seemps-2.9.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 45755cc5e158a6256b19b443991a6094f853c79c96b8af37e7079e28b6aa05b8
MD5 7b5896b849f0a79f892e9a1181704c37
BLAKE2b-256 431fafbc251a1a76372bb7427441baa96653d8e0ce5e171849ce978096639718

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seemps-2.9.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e705ec63748a844ba38e92e2a5853bd04599dbc46d87f583a6d65789e4f1cb2a
MD5 9391e96c1e099ca223837f914a9d84d0
BLAKE2b-256 c16d4086219e2743801c8fd870217443062e168970dd24d29f036065d9ece8d2

See more details on using hashes here.

File details

Details for the file seemps-2.9.4-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.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10ea64fa62fa9cba0e678be99ddf5c8417f37a96c456ada8e840226aa5787c64
MD5 e62f24431dd4486e725787f048bbc37e
BLAKE2b-256 3132c93316a916a06e98844a395efd6bbf8249d814ae37190d2efb753dda97a4

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