:orphan:
-
The higher order primitives in program capture can now accept inputs with abstract shapes. (#6786)
-
The
PlxprInterpreter
classes can now handle creating dynamic arrays viajnp.ones
,jnp.zeros
,jnp.arange
, andjnp.full
. #6865) -
QNode
objects now have anupdate
method that allows for re-configuring settings likediff_method
,mcm_method
, and more. This allows for easier on-the-fly adjustments to workflows. Any arguments not specified will retain their original value. (#6803)After constructing a
QNode
,import pennylane as qml @qml.qnode(device=qml.device("default.qubit")) def circuit(): qml.H(0) qml.CNOT([0,1]) return qml.probs()
its settings can be modified with
update
, which returns a newQNode
object. Here is an example of updating a QNode'sdiff_method
:>>> print(circuit.diff_method) best >>> new_circuit = circuit.update(diff_method="parameter-shift") >>> print(new_circuit.diff_method) 'parameter-shift'
-
Devices can now configure whether or not ML framework data is sent to them via an
ExecutionConfig.convert_to_numpy
parameter. This is not used ondefault.qubit
due to compilation overheads when jitting. (#6788) (#6869) -
The coefficients of observables now have improved differentiability. (#6598)
-
An empty basis set in
qml.compile
is now recognized as valid, resulting in decomposition of all operators that can be decomposed. (#6821) -
An informative error is raised when a
QNode
withdiff_method=None
is differentiated. (#6770) -
qml.gradients.finite_diff_jvp
has been added to compute the jvp of an arbitrary numeric function. (#6853) -
With program capture enabled,
QNode
's can now be differentiated withdiff_method="finite-diff"
. (#6853) -
The requested
diff_method
is now validated when program capture is enabled. (#6852)
-
MultiControlledX
no longer accepts strings as control values. (#6835) -
The input argument
control_wires
ofMultiControlledX
has been removed. (#6832) (#6862) -
qml.execute
now has a collection of keyword-only arguments. (#6598) -
The
decomp_depth
argument in :func:~pennylane.transforms.set_decomposition
has been removed. (#6824) -
The
max_expansion
argument in :func:~pennylane.devices.preprocess.decompose
has been removed. (#6824) -
The
tape
andqtape
properties ofQNode
have been removed. Instead, use theqml.workflow.construct_tape
function. (#6825) -
The
gradient_fn
keyword argument toqml.execute
has been removed. Instead, it has been replaced withdiff_method
. (#6830) -
The
QNode.get_best_method
andQNode.best_method_str
methods have been removed. Instead, use theqml.workflow.get_best_diff_method
function. (#6823) -
The
output_dim
property ofqml.tape.QuantumScript
has been removed. Instead, use methodshape
ofQuantumScript
orMeasurementProcess
to get the same information. (#6829) -
Removed method
qsvt_legacy
along with its private helper_qsp_to_qsvt
(#6827)
-
The
mcm_method
keyword inqml.execute
has been deprecated. Instead, use themcm_method
andpostselect_mode
arguments. (#6807) -
Specifying gradient keyword arguments as any additional keyword argument to the qnode is deprecated and will be removed in v0.42. The gradient keyword arguments should be passed to the new keyword argument
gradient_kwargs
via an explicit dictionary. This change will improve qnode argument validation. (#6828) -
The
qml.gradients.hamiltonian_grad
function has been deprecated. This gradient recipe is not required with the new operator arithmetic system. (#6849) -
The
inner_transform_program
andconfig
keyword arguments inqml.execute
have been deprecated. If more detailed control over the execution is required, useqml.workflow.run
with these arguments instead. (#6822) (#6879)
-
The source code has been updated use black 25.1.0 (#6897)
-
Improved the
InterfaceEnum
object to prevent direct comparisons tostr
objects. (#6877) -
Added a
QmlPrimitive
class that inheritsjax.core.Primitive
to a newqml.capture.custom_primitives
module. This class contains aprim_type
property so that we can differentiate between different sets of PennyLane primitives. Consequently,QmlPrimitive
is now used to define all PennyLane primitives. (#6847) -
The
RiemannianGradientOptimizer
has been updated to take advantage of newer features. (#6882)
-
The docstrings for
qml.unary_mapping
,qml.binary_mapping
,qml.christiansen_mapping
,qml.qchem.localize_normal_modes
, andqml.qchem.VibrationalPES
have been updated to include better code examples. (#6717) -
The docstrings for
qml.qchem.localize_normal_modes
andqml.qchem.VibrationalPES
have been updated to include examples that can be copied. (#6834) -
Fixed a typo in the code example for
qml.labs.dla.lie_closure_dense
. (#6858)
-
The interface is now detected from the data in the circuit, not the arguments to the
QNode
. This allows interface data to be strictly passed as closure variables and still be detected. (#6892) -
BasisState
now casts its input to integers. (#6844)
This release contains contributions from (in alphabetical order):
Yushao Chen, Isaac De Vlugt, Diksha Dhawan, Pietropaolo Frisoni, Marcus Gisslén, Christina Lee, Mudit Pandey, Andrija Paurevic