Skip to content

Commit ce52585

Browse files
isaacdevlugtaustingmhuang
authored andcommitted
Catalyst now uses capture.enable() as well, removing experimental_capture=True (#7298)
Related PR in Catalyst: PennyLaneAI/catalyst#1657 (cc @rauletorresc)
1 parent 697aa2d commit ce52585

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

doc/news/program_capture_sharp_bits.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,16 +404,17 @@ Using program capture with Catalyst
404404
-----------------------------------
405405

406406
To use the program capture feature with Catalyst, the ``qml.capture.enable()`` toggle
407-
is not required. Instead, when decorating a workflow with :func:`~.pennylane.qjit`,
408-
add the ``experimental_capture=True`` flag:
407+
is also required.
409408

410409
.. code-block:: python
411410
412411
import pennylane as qml
413412
413+
qml.capture.enable()
414+
414415
dev = qml.device('lightning.qubit', wires=1)
415416
416-
@qml.qjit(experimental_capture=True)
417+
@qml.qjit
417418
@qml.qnode(dev)
418419
def circuit():
419420
qml.RX(0.1, wires=0)
@@ -907,4 +908,4 @@ TransformError: Input is not an Operator, tape, QNode, or quantum function
907908
908909
>>> circuit()
909910
...
910-
NotImplementedError:
911+
NotImplementedError:

doc/releases/changelog-dev.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646

4747
<h3>Documentation 📝</h3>
4848

49+
* The entry in the :doc:`/news/program_capture_sharp_bits` page for using program capture with Catalyst
50+
has been updated. Instead of using ``qjit(experimental_capture=True)``, Catalyst is now compatible
51+
with the global toggles ``qml.capture.enable()`` and ``qml.capture.disable()`` for enabling and
52+
disabling program capture.
53+
[(#7298)](https://github.com/PennyLaneAI/pennylane/pull/7298)
54+
4955
<h3>Bug fixes 🐛</h3>
5056

5157
* Adds an informative error if `qml.cond` is used with an abstract condition with

0 commit comments

Comments
 (0)