diff --git a/doc/changelog.md b/doc/changelog.md index 1c64ef6cd4..eecd735ed4 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -266,6 +266,12 @@ return y ``` +

Documentation

+ +* A page has been added to the documentation, listing devices that are + Catalyst compatible. + [(#966)](https://github.com/PennyLaneAI/catalyst/pull/966) +

Internal changes

* llvm O2 and Enzyme passes are only run when needed (gradients presents). Async execution of QNodes triggers now triggers a @@ -303,10 +309,11 @@ This release contains contributions from (in alphabetical order): Alessandro Cosentino, Lillian M. A. Frederiksen, +Josh Izaac, Kunwar Maheep Singh, Mehrdad Malekmohammadi, Romain Moyard, -Erick Ochoa, +Erick Ochoa Lopez, Mudit Pandey, nate stemen, Raul Torres, diff --git a/doc/dev/devices.rst b/doc/dev/devices.rst new file mode 100644 index 0000000000..40a7ceaeb4 --- /dev/null +++ b/doc/dev/devices.rst @@ -0,0 +1,89 @@ + +.. raw:: html + + + +Supported devices +================= + +Not all PennyLane devices currently work with Catalyst, and for those that do, their supported +feature set may not necessarily match supported features when used without :func:`~.qjit`. + +Supported backend devices include: + +.. list-table:: + :widths: 20 80 + + * - ``lightning.qubit`` + + - A fast state-vector qubit simulator written with a C++ backend. See the + `Lightning documentation `__ + for more details, as well as its + `Catalyst configuration file `__ + for natively supported instructions. + + * - ``lightning.kokkos`` + + - A fast state-vector qubit simulator utilizing the Kokkos library for CPU and GPU accelerated + circuit simulation. See the + `Lightning documentation `__ + for more details, as well as its + `Catalyst configuration file `__ + for natively supported instructions. + + * - ``braket.aws.qubit`` + + - Interact with quantum computing hardware devices and simulators through Amazon Braket. To use + this device with Catalyst, make sure to install the + `PennyLane-Braket plugin `__. + See the + `Catalyst configuration file `__ + for natively supported instructions. + + * - ``braket.local.qubit`` + + - Run gate-based circuits on the Braket SDK's local simulator. To use + this device with Catalyst, make sure to install the + `PennyLane-Braket plugin `__. + See the + `Catalyst configuration file `__ + for natively supported instructions. + + * - ``qrack.simulator`` + + - `Qrack `__ is a GPU-accelerated quantum computer + simulator with many novel optimizations including hybrid stabilizer simulation. To use this + device with Catalyst, make sure to install the + `PennyLane-Qrack plugin `__, and check out + the `QJIT compilation with Qrack and Catalyst tutorial `__. + + See the `Catalyst configuration file `__ + for natively supported instructions. + + * - ``oqc.cloud`` + + - Execute on `Oxford Quantum Circuits (OQC) `__ superconducting hardware, + via `OQC Cloud `__. To use OQC Cloud with Catalyst, simply `install the + client `__, ensure your credentials are set as + environment variables, and use the ``backend`` argument to specify the OQC backend to use: + + .. code-block:: python + + import os + os.environ["OQC_EMAIL"] = "your_email" + os.environ["OQC_PASSWORD"] = "your_password" + os.environ["OQC_URL"] = "oqc_url" + + dev = qml.device("oqc.cloud", backend="lucy", shots=2012, wires=2) + + See the `Catalyst configuration file `__ + for natively supported instructions. + diff --git a/doc/dev/quick_start.rst b/doc/dev/quick_start.rst index b5ee7a7039..f4c35c9abf 100644 --- a/doc/dev/quick_start.rst +++ b/doc/dev/quick_start.rst @@ -40,8 +40,9 @@ PennyLane. However, some of PennyLane's features may not be fully supported yet, .. warning:: - The supported backend devices are currently ``lightning.qubit``, ``lightning.kokkos``, - ``braket.local.qubit``, ``braket.aws.qubit``, and ``oqc.cloud`` but future plans include the addition of more. + Not all PennyLane devices currently work with Catalyst. Supported backend devices include + ``lightning.qubit``, ``lightning.kokkos``, and ``braket.aws.qubit``. For + a full of supported devices, please see :doc:`/dev/devices`. PennyLane tapes are still used internally by Catalyst and you can express your circuits in the way you are used to, as long as you ensure that all operations are added to the main tape. @@ -101,101 +102,19 @@ PennyLane are also supported via the decomposition mechanism in Catalyst. For ex qml.adjoint(qml.SingleExcitation(jnp.pi / 3, wires=[0, 1])) return qml.state() -In addition, you can jit most of :doc:`PennyLane templates ` to easily construct and evaluate -more complex quantum circuits; see below for the list of currently supported operations and templates. +In addition, you can qjit most :doc:`PennyLane templates ` to easily construct and evaluate +more complex quantum circuits. .. important:: Decomposition will generally happen in accordance with the specification provided by devices, - which can vary from device to device (e.g. ``default.qubit`` and ``lightning.qubit`` might - decompose quite differently.) + which can vary from device to device (e.g., ``default.qubit`` and ``lightning.qubit`` might + decompose quite differently). However, Catalyst's decomposition logic will differ in the following cases: 1. All :class:`qml.Controlled ` operations will decompose to :class:`qml.QubitUnitary ` operations. 2. The set of operations supported by Catalyst itself can in some instances lead to additional decompositions compared to the device itself. -.. raw:: html - -
- -.. details:: - :title: List of supported native operations - - .. autosummary:: - :nosignatures: - - ~pennylane.Identity - ~pennylane.PauliX - ~pennylane.PauliY - ~pennylane.PauliZ - ~pennylane.Hadamard - ~pennylane.S - ~pennylane.T - ~pennylane.PhaseShift - ~pennylane.RX - ~pennylane.RY - ~pennylane.RZ - ~pennylane.CNOT - ~pennylane.CY - ~pennylane.CZ - ~pennylane.SWAP - ~pennylane.IsingXX - ~pennylane.IsingYY - ~pennylane.IsingXY - ~pennylane.IsingZZ - ~pennylane.ControlledPhaseShift - ~pennylane.CRX - ~pennylane.CRY - ~pennylane.CRZ - ~pennylane.CRot - ~pennylane.CSWAP - ~pennylane.MultiRZ - ~pennylane.QubitUnitary - -.. raw:: html - -
-
- -.. details:: - :title: List of supported templates - - .. autosummary:: - :nosignatures: - - ~pennylane.AllSinglesDoubles - ~pennylane.AmplitudeEmbedding - ~pennylane.AngleEmbedding - ~pennylane.ApproxTimeEvolution - ~pennylane.ArbitraryStatePreparation - ~pennylane.BasicEntanglerLayers - ~pennylane.BasisEmbedding - ~pennylane.BasisStatePreparation - ~pennylane.broadcast - ~pennylane.FermionicDoubleExcitation - ~pennylane.FermionicSingleExcitation - ~pennylane.FlipSign - ~pennylane.GateFabric - ~pennylane.GroverOperator - ~pennylane.IQPEmbedding - ~pennylane.kUpCCGSD - ~pennylane.MERA - ~pennylane.MottonenStatePreparation - ~pennylane.MPS - ~pennylane.Permute - ~pennylane.QAOAEmbedding - ~pennylane.QFT - ~pennylane.QuantumMonteCarlo - ~pennylane.QuantumPhaseEstimation - ~pennylane.RandomLayers - ~pennylane.SimplifiedTwoDesign - ~pennylane.StronglyEntanglingLayers - ~pennylane.TTN - ~pennylane.UCCSD - -.. raw:: html - -
Observables ----------- @@ -218,28 +137,6 @@ a tensor product of a :class:`qml.PauliX `, :class:`qml.Hadama ) return qml.expval(qml.PauliX(0) @ qml.Hadamard(1) @ qml.Hermitian(h_matrix, 2)) -.. raw:: html - -
- -.. details:: - :title: List of supported observables - - .. autosummary:: - :nosignatures: - - ~pennylane.Identity - ~pennylane.PauliX - ~pennylane.PauliY - ~pennylane.PauliZ - ~pennylane.Hadamard - ~pennylane.Hermitian - ~pennylane.Hamiltonian - -.. raw:: html - -
- Measurements ------------ Most PennyLane :doc:`measurement processes ` diff --git a/doc/index.rst b/doc/index.rst index 0a63b2f5c0..ad7c86cec7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -67,6 +67,7 @@ Catalyst dev/installation dev/quick_start + dev/devices dev/autograph dev/sharp_bits dev/jax_integration diff --git a/frontend/catalyst/jit.py b/frontend/catalyst/jit.py index df880ec756..203932ff33 100644 --- a/frontend/catalyst/jit.py +++ b/frontend/catalyst/jit.py @@ -90,9 +90,9 @@ def qjit( .. note:: - The supported backend devices are currently ``lightning.qubit``, ``lightning.kokkos``, - ``braket.local.qubit``, ``braket.aws.qubit``, and ``oqc.cloud``. For a list of supported - operations, observables, and measurements, please see the :doc:`/dev/quick_start`. + Not all PennyLane devices currently work with Catalyst. Supported backend devices include + ``lightning.qubit``, ``lightning.kokkos``, and ``braket.aws.qubit``. For + a full of supported devices, please see :doc:`/dev/devices`. Args: fn (Callable): the quantum or classical function