Skip to main content

Numerical and symbolic implementation of quasi-degenerate perturbation theory

Project description

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.

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

pymablock-2.1.0.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

pymablock-2.1.0-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file pymablock-2.1.0.tar.gz.

File metadata

  • Download URL: pymablock-2.1.0.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pymablock-2.1.0.tar.gz
Algorithm Hash digest
SHA256 5befc09fe984c3a235da11f2d051fefcde987cf1ef425c30451cd3f8476954d8
MD5 e4b310fe7e75553e24f7439319f85c22
BLAKE2b-256 2d4a824c5ca64e7fa80cdf30dc8340de9a1b4bd4ca8acad23d82a0bf4b0b2ec6

See more details on using hashes here.

File details

Details for the file pymablock-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymablock-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pymablock-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12d0a04f79349b1c1daeb3177d871aeb75cdbf3ce097c365176cd4fe9fb7cc37
MD5 b0e4ba5c9e2940787158594a3c96d2cd
BLAKE2b-256 0b3b7a9edce93d26b0cba2432450557d6703e4207e0dc877636e218ad4be1257

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page