{"id":14991209,"url":"https://github.com/pennylaneai/catalyst","last_synced_at":"2025-05-15T17:02:27.866Z","repository":{"id":94955330,"uuid":"602822750","full_name":"PennyLaneAI/catalyst","owner":"PennyLaneAI","description":"A JIT compiler for hybrid quantum programs in PennyLane","archived":false,"fork":false,"pushed_at":"2025-04-03T05:09:30.000Z","size":15131,"stargazers_count":159,"open_issues_count":165,"forks_count":45,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-03T06:22:42.888Z","etag":null,"topics":["autodiff","automatic-differentiation","jax","jit","llvm","mlir","pennylane","python","qir","quantum","quantum-compiler","quantum-computing"],"latest_commit_sha":null,"homepage":"https://docs.pennylane.ai/projects/catalyst","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PennyLaneAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-17T02:23:20.000Z","updated_at":"2025-04-03T03:47:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"f318f05f-073e-4c91-8f4c-3fca0c199cba","html_url":"https://github.com/PennyLaneAI/catalyst","commit_stats":{"total_commits":912,"total_committers":42,"mean_commits":"21.714285714285715","dds":0.8125,"last_synced_commit":"b90a548e0699bb053bedbe29e154bb4c22c0149d"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PennyLaneAI%2Fcatalyst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PennyLaneAI%2Fcatalyst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PennyLaneAI%2Fcatalyst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PennyLaneAI%2Fcatalyst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PennyLaneAI","download_url":"https://codeload.github.com/PennyLaneAI/catalyst/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744294,"owners_count":20988781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodiff","automatic-differentiation","jax","jit","llvm","mlir","pennylane","python","qir","quantum","quantum-compiler","quantum-computing"],"created_at":"2024-09-24T14:21:44.787Z","updated_at":"2025-05-15T17:02:27.848Z","avatar_url":"https://github.com/PennyLaneAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/PennyLaneAI/catalyst/actions/workflows/check-catalyst.yaml/badge.svg?branch=main\u0026event=push)](https://github.com/PennyLaneAI/catalyst/actions/workflows/check-catalyst.yaml)\r\n[![Coverage](https://img.shields.io/codecov/c/github/PennyLaneAI/catalyst/master.svg?logo=codecov\u0026style=flat-square)](https://codecov.io/gh/PennyLaneAI/catalyst)\r\n[![Documentation](https://readthedocs.com/projects/xanaduai-catalyst/badge/?version=latest\u0026token=e6f8607e841564d11d02baef4540523169f95d9c64fcdc656a0ecfd6564203ca)](https://docs.pennylane.ai/projects/catalyst)\r\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.06720/status.svg)](https://doi.org/10.21105/joss.06720)\r\n[![PyPI](https://img.shields.io/pypi/v/PennyLane-Catalyst.svg?style=flat-square)](https://pypi.org/project/PennyLane-Catalyst)\r\n[![Forum](https://img.shields.io/discourse/https/discuss.pennylane.ai/posts.svg?logo=discourse\u0026style=flat-square)](https://discuss.pennylane.ai)\r\n[![License](https://img.shields.io/pypi/l/PennyLane.svg?logo=apache\u0026style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0)\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"https://raw.githubusercontent.com/PennyLaneAI/catalyst/main/doc/_static/pl-catalyst-logo-lightmode.png#gh-light-mode-only\" width=\"700px\"\u003e\r\n    \u003c!--\r\n    Use a relative import for the dark mode image. When loading on PyPI, this\r\n    will fail automatically and show nothing.\r\n    --\u003e\r\n  \u003cimg src=\"./doc/_static/pl-catalyst-logo-darkmode.png#gh-dark-mode-only\" width=\"700px\" onerror=\"this.style.display='none'\" alt=\"\"/\u003e\r\n\u003c/p\u003e\r\n\r\nCatalyst is an experimental package that enables just-in-time (JIT) compilation of hybrid\r\nquantum-classical programs.\r\n\r\n**Catalyst is currently under heavy development — if you have suggestions on the API or use-cases\r\nyou'd like to be covered, please open an GitHub issue or reach out. We'd love to hear about how\r\nyou're using the library, collaborate on development, or integrate additional devices and\r\nfrontends.**\r\n\r\n## Key Features\r\n\r\n- Compile the entire quantum-classical workflow, including any optimization loops.\r\n\r\n- Use Catalyst alongside PennyLane directly from Python. Simply decorate quantum code and hybrid\r\n  functions with `@qjit`, leading to significant performance improvements over standard Python\r\n  execution.\r\n\r\n- Access advanced control flow that supports both quantum and classical instructions.\r\n\r\n- Infrastructure for both quantum *and* classical compilation, allowing you to compile quantum\r\n  circuits that contain control flow.\r\n\r\n- Built to be end-to-end differentiable.\r\n\r\n- Support for [PennyLane-Lightning](https://github.com/PennyLaneAI/pennylane-lightning) high performance\r\n  simulators, and [Amazon Braket](https://amazon-braket-pennylane-plugin-python.readthedocs.io)\r\n  devices. Additional hardware support, including QPUs, to come.\r\n\r\n## Overview\r\n\r\nCatalyst currently consists of the following components:\r\n\r\n- [Catalyst Compiler](https://docs.pennylane.ai/projects/catalyst/en/latest/modules/mlir.html).\r\n\r\n  The core Catalyst compiler is built using [MLIR](https://mlir.llvm.org/), with the addition of a\r\n  quantum dialect used to represent quantum instructions. This allows for a high-level intermediate\r\n  representation of the classical and quantum components of the program, resulting in advantages\r\n  during optimization. Once optimized, the compiler lowers the representation down to LLVM +\r\n  [QIR](https://www.qir-alliance.org/), and a machine binary is produced.\r\n\r\n- [Catalyst\r\n  Runtime](https://docs.pennylane.ai/projects/catalyst/en/latest/modules/runtime.html).\r\n\r\n  The runtime is a C++ runtime with multiple-device support based on QIR that enables the execution\r\n  of Catalyst-compiled quantum programs. A complete list of all backend devices along with the quantum\r\n  instruction set supported by these runtime implementations can be found by visiting\r\n  [the runtime documentation](https://docs.pennylane.ai/projects/catalyst/en/latest/modules/runtime.html).\r\n\r\nIn addition, we also provide a Python frontend for [PennyLane](https://pennylane.ai) and [JAX](https://jax.readthedocs.io):\r\n\r\n- [PennyLane JAX frontend](https://docs.pennylane.ai/projects/catalyst/en/latest/modules/frontend.html).\r\n\r\n  A Python library that provides a `@qjit` decorator to just-in-time compile PennyLane hybrid\r\n  quantum-classical programs. In addition, the frontend package provides Python functions for\r\n  defining Catalyst-compatible control flow structures, gradient, and mid-circuit measurement.\r\n\r\n## Installation\r\n\r\nCatalyst is officially supported on Linux (x86_64, aarch64) and macOS (arm64) platforms,\r\nand pre-built binaries are being distributed via the Python Package Index (PyPI) for Python versions 3.10 and\r\nhigher. To install it, simply run the following ``pip`` command:\r\n\r\n```console\r\npip install pennylane-catalyst\r\n```\r\n\r\nCatalyst no longer supports macOS with x86_64 architecture after 0.11.0. This includes Macs running on Intel processors.\r\nIf you would like to use Catalyst on these systems, please install Catalyst version 0.11.0, PennyLane version 0.41.0, PennyLane-Lightning\r\nversion 0.41.0, and Jax version 0.4.28:\r\n\r\n```console\r\npip install pennylane-catalyst==0.11.0\r\npip install pennylane==0.41.0\r\npip install pennylane-lightning==0.41.0\r\npip install jax==0.4.28\r\n```\r\n\r\nIf you wish to contribute to Catalyst or develop against our runtime or compiler, instructions for\r\n[building from source](https://docs.pennylane.ai/projects/catalyst/en/latest/dev/installation.html#minimal-building-from-source-guide)\r\nare also available.\r\n\r\n## Trying Catalyst with PennyLane\r\n\r\nTo get started using the Catalyst JIT compiler from Python, check out our [quick start\r\nguide](https://docs.pennylane.ai/projects/catalyst/en/latest/dev/quick_start.html), as well as our\r\nvarious examples and tutorials in our [documentation](https://docs.pennylane.ai/projects/catalyst).\r\n\r\nFor an introduction to quantum computing and quantum machine learning, you can also visit the\r\nPennyLane website for [tutorials, videos, and demonstrations](https://pennylane.ai/qml).\r\n\r\n## Roadmap\r\n\r\n- **Frontend:** As we continue to build out Catalyst, the PennyLane frontend will likely be\r\n  upstreamed into PennyLane proper, providing native JIT functionality built-in to PennyLane. The\r\n  Catalyst compiler and runtime will remain part of the Catalyst project. *If you are interested in\r\n  working on additional frontends for Catalyst, please get in touch.*\r\n\r\n- **Compiler:** We will continue to build out the compiler stack, and add quantum compilation\r\n  routines. This includes an API for providing or writing Catalyst-compatible compilation routines.\r\n  In addition, we will be improving the autodifferentiation support, and adding support for\r\n  classical autodiff, additional quantum gradients, and quantum-aware optimization methods.\r\n\r\n- **Runtime:** We will be adding support for more devices, including quantum hardware devices. In\r\n  addition, we will be building out support for hetereogeneous execution. *If you are interested in\r\n  working on connecting a quantum device with Catalyst, please get in touch.*\r\n\r\nTo get the details right, we need your help — please send us your use cases by starting a\r\nconversation, or trying Catalyst out.\r\n\r\n## Contributing to Catalyst\r\n\r\nWe welcome contributions — simply fork the Catalyst repository, and then make a [pull\r\nrequest](https://help.github.com/articles/about-pull-requests/) containing your contribution.\r\n\r\nWe also encourage bug reports, suggestions for new features and enhancements.\r\n\r\n## Support\r\n\r\n- **Source Code:** https://github.com/PennyLaneAI/catalyst\r\n- **Issue Tracker:** https://github.com/PennyLaneAI/catalyst/issues\r\n\r\nIf you are having issues, please let us know by posting the issue on our GitHub issue tracker.\r\n\r\nWe also have a [PennyLane discussion forum](https://discuss.pennylane.ai)—come join the community\r\nand chat with the PennyLane team.\r\n\r\nNote that we are committed to providing a friendly, safe, and welcoming environment for all. Please\r\nread and respect the [Code of Conduct](.github/CODE_OF_CONDUCT.md).\r\n\r\n## Authors\r\n\r\nCatalyst is the work of [many contributors](https://github.com/PennyLaneAI/catalyst/graphs/contributors).\r\n\r\nIf you are doing research using Catalyst, please cite our paper:\r\n\r\n```bibtex\r\n@article{\r\n  Ittah2024,\r\n  doi = {10.21105/joss.06720},\r\n  url = {https://doi.org/10.21105/joss.06720},\r\n  year = {2024},\r\n  publisher = {The Open Journal},\r\n  volume = {9},\r\n  number = {99},\r\n  pages = {6720},\r\n  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},\r\n  title = {Catalyst: a Python JIT compiler for auto-differentiable hybrid quantum programs},\r\n  journal = {Journal of Open Source Software}\r\n}\r\n```\r\n\r\n## License\r\n\r\nCatalyst is **free** and **open source**, released under the Apache License, Version 2.0.\r\n\r\n## Acknowledgements\r\n\r\nCatalyst makes use of the following libraries and tools, which are under their own respective\r\nlicenses:\r\n\r\n- [JAX](https://github.com/jax-ml/jax)\r\n- [TensorFlow](https://github.com/tensorflow/tensorflow)\r\n- [OpenXLA](https://github.com/openxla/xla)\r\n- [LLVM/MLIR](https://github.com/llvm/llvm-project)\r\n- [EnzymeAD](https://github.com/EnzymeAD/Enzyme)\r\n- [pybind11](https://github.com/pybind/pybind11)\r\n- [nanobind](https://github.com/wjakob/nanobind)\r\n- [accelerate-lapacke](https://github.com/lepus2589/accelerate-lapacke)\r\n- [LAPACK](https://github.com/Reference-LAPACK/lapack)\r\n- [TOML++](https://github.com/marzer/tomlplusplus)\r\n- [json](https://github.com/nlohmann/json)\r\n- [stim](https://github.com/quantumlib/Stim)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpennylaneai%2Fcatalyst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpennylaneai%2Fcatalyst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpennylaneai%2Fcatalyst/lists"}