Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,10 @@
Instead, these functions should be imported from the `pennylane.noise` module.
[(#7854)](https://github.com/PennyLaneAI/pennylane/pull/7854)

* The `qml.QNode.add_transform` method is deprecated and will be removed in v0.43.
* The `qml.QNode.add_transform` method is deprecated and will be removed in v0.44.
Instead, please use `QNode.transform_program.push_back(transform_container=transform_container)`.
[(#7855)](https://github.com/PennyLaneAI/pennylane/pull/7855)
[(#8266)](https://github.com/PennyLaneAI/pennylane/pull/8266)

<h3>Internal changes ⚙️</h3>

Expand Down
4 changes: 2 additions & 2 deletions pennylane/workflow/qnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,13 @@ def add_transform(self, transform_container: TransformContainer):

.. warning::

This method is deprecated and will be removed in v0.43. Instead, please use :meth:`~.TransformProgram.push_back` on
This method is deprecated and will be removed in v0.44. Instead, please use :meth:`~.TransformProgram.push_back` on
the ``QNode.transform_program`` property to add transforms to the transform program.

.. warning:: This is a developer facing feature and is called when a transform is applied on a QNode.
"""
warnings.warn(
"The `qml.QNode.add_transform` method is deprecated and will be removed in v0.43. "
"The `qml.QNode.add_transform` method is deprecated and will be removed in v0.44. "
"Instead, please use `QNode.transform_program.push_back(transform_container=transform_container)`.",
PennyLaneDeprecationWarning,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_qnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def circuit(x):

with pytest.warns(
PennyLaneDeprecationWarning,
match="The `qml.QNode.add_transform` method is deprecated and will be removed in v0.43",
match="The `qml.QNode.add_transform` method is deprecated and will be removed in v0.44",
):
circuit.add_transform(
qml.transforms.core.TransformContainer(qml.gradients.param_shift.expand_transform)
Expand Down