Skip to main content

Tests Coverage Documentation DOI PyPI Forum License

Catalyst is an experimental package that enables just-in-time (JIT) compilation of hybrid quantum-classical programs.

Catalyst is currently under heavy development — if you have suggestions on the API or use-cases you'd like to be covered, please open an GitHub issue or reach out. We'd love to hear about how you're using the library, collaborate on development, or integrate additional devices and frontends.

Key Features

  • Compile the entire quantum-classical workflow, including any optimization loops.

  • Use Catalyst alongside PennyLane directly from Python. Simply decorate quantum code and hybrid functions with @qjit, leading to significant performance improvements over standard Python execution.

  • Access advanced control flow that supports both quantum and classical instructions.

  • Infrastructure for both quantum and classical compilation, allowing you to compile quantum circuits that contain control flow.

  • Built to be end-to-end differentiable.

  • Support for PennyLane-Lightning high performance simulators, and Amazon Braket devices. Additional hardware support, including QPUs, to come.

Overview

Catalyst currently consists of the following components:

  • Catalyst Compiler.

    The core Catalyst compiler is built using MLIR, with the addition of a quantum dialect used to represent quantum instructions. This allows for a high-level intermediate representation of the classical and quantum components of the program, resulting in advantages during optimization. Once optimized, the compiler lowers the representation down to LLVM + QIR, and a machine binary is produced.

  • Catalyst Runtime.

    The runtime is a C++ runtime with multiple-device support based on QIR that enables the execution of Catalyst-compiled quantum programs. A complete list of all backend devices along with the quantum instruction set supported by these runtime implementations can be found by visiting the runtime documentation.

In addition, we also provide a Python frontend for PennyLane and JAX:

  • PennyLane JAX frontend.

    A Python library that provides a @qjit decorator to just-in-time compile PennyLane hybrid quantum-classical programs. In addition, the frontend package provides Python functions for defining Catalyst-compatible control flow structures, gradient, and mid-circuit measurement.

Installation

Catalyst is officially supported on Linux (x86_64, aarch64) and macOS (arm64) platforms, and pre-built binaries are being distributed via the Python Package Index (PyPI) for Python versions 3.10 and higher. To install it, simply run the following pip command:

pip install pennylane-catalyst

Catalyst no longer supports macOS with x86_64 architecture after 0.11.0. This includes Macs running on Intel processors. If you would like to use Catalyst on these systems, please install Catalyst version 0.11.0, PennyLane version 0.41.0, PennyLane-Lightning version 0.41.0, and Jax version 0.4.28:

pip install pennylane-catalyst==0.11.0
pip install pennylane==0.41.0
pip install pennylane-lightning==0.41.0
pip install jax==0.4.28

If you wish to contribute to Catalyst or develop against our runtime or compiler, instructions for building from source are also available.

Trying Catalyst with PennyLane

To get started using the Catalyst JIT compiler from Python, check out our quick start guide, as well as our various examples and tutorials in our documentation.

For an introduction to quantum computing and quantum machine learning, you can also visit the PennyLane website for tutorials, videos, and demonstrations.

Roadmap

  • Frontend: As we continue to build out Catalyst, the PennyLane frontend will likely be upstreamed into PennyLane proper, providing native JIT functionality built-in to PennyLane. The Catalyst compiler and runtime will remain part of the Catalyst project. If you are interested in working on additional frontends for Catalyst, please get in touch.

  • Compiler: We will continue to build out the compiler stack, and add quantum compilation routines. This includes an API for providing or writing Catalyst-compatible compilation routines. In addition, we will be improving the autodifferentiation support, and adding support for classical autodiff, additional quantum gradients, and quantum-aware optimization methods.

  • Runtime: We will be adding support for more devices, including quantum hardware devices. In addition, we will be building out support for hetereogeneous execution. If you are interested in working on connecting a quantum device with Catalyst, please get in touch.

To get the details right, we need your help — please send us your use cases by starting a conversation, or trying Catalyst out.

Contributing to Catalyst

We welcome contributions — simply fork the Catalyst repository, and then make a pull request containing your contribution.

We also encourage bug reports, suggestions for new features and enhancements.

Support

If you are having issues, please let us know by posting the issue on our GitHub issue tracker.

We also have a PennyLane discussion forum—come join the community and chat with the PennyLane team.

Note that we are committed to providing a friendly, safe, and welcoming environment for all. Please read and respect the Code of Conduct.

Authors

Catalyst is the work of many contributors.

If you are doing research using Catalyst, please cite our paper:

@article{
  Ittah2024,
  doi = {10.21105/joss.06720},
  url = {https://doi.org/10.21105/joss.06720},
  year = {2024},
  publisher = {The Open Journal},
  volume = {9},
  number = {99},
  pages = {6720},
  author = {David Ittah and Ali Asadi and Erick Ochoa Lopez and Sergei Mironov and Samuel Banning and Romain Moyard and Mai Jacob Peng and Josh Izaac},
  title = {Catalyst: a Python JIT compiler for auto-differentiable hybrid quantum programs},
  journal = {Journal of Open Source Software}
}

License

Catalyst is free and open source, released under the Apache License, Version 2.0.

Acknowledgements

Catalyst makes use of the following libraries and tools, which are under their own respective licenses:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_x86_64.whl (72.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_aarch64.whl (72.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

pennylane_catalyst-0.12.0-cp312-abi3-macosx_13_0_arm64.whl (63.7 MB view details)

Uploaded CPython 3.12+macOS 13.0+ ARM64

pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl (72.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl (72.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pennylane_catalyst-0.12.0-cp311-cp311-macosx_13_0_arm64.whl (63.7 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl (72.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_aarch64.whl (72.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

pennylane_catalyst-0.12.0-cp310-cp310-macosx_13_0_arm64.whl (63.7 MB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

File details

Details for the file pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 612454d4cbcb1f24080ced7477c6586fa49e5f5eac83288cf22447556de3bf6b
MD5 63e21020f4442d6586728c00391f8c19
BLAKE2b-256 914ffd30b20406dde3b561129995ed9106f05e7d3081e6a0878e2ffe5d106439

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2cc0b1282c4051e592e59c5e2939aa52783e0a5ba90c84572c00716f100f99c7
MD5 feaaa054989652e5f0b906fa9c572e33
BLAKE2b-256 a37570ffbd7bcd04bf0470c3f83ae8261bdbdcb2c8611f832b5cf3b0d8d6d2ab

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp312-abi3-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp312-abi3-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 e6f5cd871177079cc0189487e5fdeef822abf186992edf4cab60accbb9be62bd
MD5 d20a25c3eda697738f11a5c03d8eccf8
BLAKE2b-256 6c644f47f4ba0f4607c43473bc5c8b69ef861e59d7492fb957d4befa70332888

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 40a43f5adfe1419154778b13b14aad3af90ecc3647dd0e4e6956a3e4cfa3b33e
MD5 c349ce39340a01b215169d35479dea62
BLAKE2b-256 1bd6c9301cea2c7b64bccd9c7cfe16aeeeb9f5be3e15d437765e0fa3ba8647bc

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 109a204c45c69f59ad47356c6a3e90ca0600e49820ac77985fc9da602135bde2
MD5 22bb33b64982f71e1385fe59c0678b35
BLAKE2b-256 fbcb000c00fb260b623de098a7c450ac0b04d7a1590b57dbcf061f660ae56a55

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5177a3c46604ef4c627bdfd1c7b8fa9a68e8c40f1ac9256f3dcb2140a64ff71f
MD5 cd319ab4cb64269991992c27aeb03bc4
BLAKE2b-256 2810b678a9b9d72769e11e49d67348407118edcf41c03911c8413c25f02b69e2

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 199d860104df51aae52755cdc9ce2f1d8ce7372591d52ebb15a211826e83b1d5
MD5 b9e85a2bf876bf01a824089948f06912
BLAKE2b-256 b83b87053f1e05e9db6862ae6ce0178eada66ef1f1ff1c8fa17e8d1801cc5189

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5e1522bece8a37e003280f2ad51c5d674e8d488b9abaa49ea42ba8c9d7155da1
MD5 90a678fcfe63d1ba94520a7a9c472474
BLAKE2b-256 91f84104be88dc7e138ca805c1eb1ca5d52c791b924ddb4c13c4a74f1df0e2b6

See more details on using hashes here.

File details

Details for the file pennylane_catalyst-0.12.0-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_catalyst-0.12.0-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 c875547e52a2f3565f882235808b8f63f2e3f831ab0c25412ac81298667ec40d
MD5 ca5c6bf145a4e0cde4e910a8bfad2387
BLAKE2b-256 1f2280065cae76eac81cc0532418e8e3a06b747ab7b484e0a8fdbe669893eb99

See more details on using hashes here.

Release history Release notifications | RSS feed

0.15.0

6 files

0.14.1

6 files

0.14.0

6 files

0.13.0

6 files

This release

0.12.0 This release

9 files

0.11.0

12 files

0.10.0

12 files

0.9.0

12 files

0.8.1

16 files

0.7.0

16 files

0.6.0

12 files

0.5.0

12 files

0.4.1

9 files

0.3.2

9 files

0.2.1

4 files

0.1.2

1 file

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