Skip to main content

Pymablock: quasi-degenerate perturbation theory in Python

Pymablock (Python matrix block-diagonalization) is a Python package that constructs effective models using quasi-degenerate perturbation theory. It handles both numerical and symbolic inputs, and it efficiently block-diagonalizes Hamiltonians with multivariate perturbations to arbitrary order.

Building an effective model using Pymablock is a three step process:

  • Define a Hamiltonian
  • Call pymablock.block_diagonalize
  • Request the desired order of the effective Hamiltonian
from pymablock import block_diagonalize

# Define perturbation theory
H_tilde, *_ = block_diagonalize([h_0, h_p], subspace_eigenvectors=[vecs_A, vecs_B])

# Request correction to the effective Hamiltonian
H_AA_4 = H_tilde[0, 0, 4]

Here is why you should use Pymablock:

  • Do not reinvent the wheel

    Pymablock provides a tested reference implementation

  • Apply to any problem

    Pymablock supports numpy arrays, scipy sparse arrays, sympy matrices and quantum operators

  • Speed up your code

    Due to several optimizations, Pymablock can reliably handle both higher orders and large Hamiltonians

For more details see the Pymablock documentation.

Metadata

Release files for pymablock 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymablock 2.2.1
File Size Uploaded
pymablock-2.2.1.tar.gz 80.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymablock 2.2.1
File Interpreter ABI Platform
pymablock-2.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 167.8 kB

Release files / pymablock-2.2.1.tar.gz

Download URL pymablock-2.2.1.tar.gz
Size 80.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3c78c8021db23adea657ccd69dc7e52cd8643f077885ad0c265fe37a49288dd5
BLAKE2b-256 checksum
How to use checksums
65806ab4d6f94d1ca39c37225722a9c7f9c5f836fe54287291e6b2cc5fc38cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / pymablock-2.2.1-py3-none-any.whl

Download URL pymablock-2.2.1-py3-none-any.whl
Size 87.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cc19dc6f47cc3ad8794fd21f1915927a38b3c1fbaacd880ad776a7650e2e00a
BLAKE2b-256 checksum
How to use checksums
1780ef1e55eec87dcf0cb295f304f2445e4e9d95ca1673d2211e8882b31ef3f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page