⬆️🐍 Update dependency pennylane to ~=0.45.0#145
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
15df62f to
d4eec96
Compare
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
d4eec96 to
6e56b8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~=0.44.1→~=0.45.0Release Notes
PennyLaneAI/pennylane (pennylane)
v0.45.0: Release 0.45.0Compare Source
New features since last release
Sum of Slaters State Preparation 🆘
A new state preparation method called
SumOfSlatersPrepis now available. This state preparation routine introduced in Fomichev et al., PRX Quantum 5, 040339 (see the associated demo) is a state-of-the-art technique for algorithms that require a high-quality initial state, like in ground-state energy estimation algorithms of chemical systems. (#8964) (#8997) (#9228) (#9323)Consider this sparse state on three qubits, specified by normalized coefficients and statevector indices pointing to the populated computational basis states:
The
SumOfSlatersPrepoperation requires thecoefficients,indices, andwiresas input. It efficiently prepares sparse states using auxiliary wires,QROM\ s, reversible bit encodings, and a dense-state preparation on a smaller subspace. Its implementation can be inspected by using PennyLane's graph-based decomposition algorithm (enable_graph) with the following gate set and five auxiliary wires (work_wires).The smaller dense state preparation is represented by
|Ψ⟩, which is on two wires, and the<DynamicWire>labels represent dynamically allocated wires (withallocate) used in its decomposition.Workflow Inspection 🔍
When using
specswithqjitandlevel="all", you can now display the returnedCircuitSpecsas a table, allowing you to easily see how circuit resources evolve with each stage of compilation. In addition,specsnow supports settinglevel="user"for workflows compiled withqjit, returning circuit specifications after all user-specified transforms have been applied. (#9088) (#9307) (#9426)We can also observe the specifications after all user-applied transforms using
level="user":When inspecting a circuit via the
levelargument inspecsordraw, markers placed in aCompilePipeline(withmarker) are now accessible exclusively via theirlabel, making it much easier to track levels of compilation without having to track shifting integerlevelvalues. In addition, markers can now be added directly to aCompilePipelinewith theadd_markermethod, and printing aCompilePipelinenow legibly distinguishes transforms and markers. (#8990) (#9007) (#9076) (#9102)The new string representation of
CompilePipelineallows you to inspect the transforms and markers:>>> print(circuit.compile_pipeline) CompilePipeline( ├─▶ no-transforms [1] cancel_inverses() └─▶ after-cancel-inverses )As usual, marker labels can be used as an argument to
levelinspecsanddraw, showing the cumulative result of compilation up to the provided marker:specsnow includes PPR and PPM weights in its output, allowing for better categorization of PPMs and PPRs in workflows compiled withqjit. (#8983)specshas been upgraded with significantly faster processing of large workflows with many gates and/or measurements forqjitcompiled workflows in pass-by-pass mode. This is achieved using Catalyst'sResourceAnalysispass behind the scenes, improving upon the former implementation. For more details, check out the Catalyst v0.15 release notes. (#9279)specsnow returns measurement information forqjitworkloads when usinglevel="device". (#8988)When using pass-by-pass
specswith Catalyst, the output will no longer display a"Before Tape Transforms"level if no tape transforms have been applied. In particular, for scenarios where no tape transforms are present, the"Before MLIR passes"level becomes level0. In scenarios with at least one tape transform, level0corresponds to"Before Tape Transforms"and"Before MLIR passes"is the level after all tape transforms but before the first MLIR pass. (#9091) (#9166)QSVT Angle Solver 📐
A new angle solver has been added to find QSVT phase angles faster for large-degree polynomials. This can be accessed by setting
angle_solver="iterative-optax"inqsvtandpoly_to_angles, where the benefits are seen when when repeatedly evaluating the same-degree polynomial with different coefficients. Note that this requiresoptaxto be installed. (#8685) (#9435)>>> print(qsvt_angles) [-4.74724627 1.51868559 0.57952342 0.57952342 1.51868559 -0.03485729]Decomposition Inspection and Pre-defined Gate Sets 📠
New tools dedicated to accessible inspectability of PennyLane's graph-based decomposition system (enabled with
enable_graph) are now available! With this release, you can query the solutions of the graph-based system to understand how PennyLane decomposed a circuit, why specific rules where chosen over others, and more.It is now possible to assign custom names to decomposition rules using the
nameargument inqp.register_resources, making it easier to identify specific decomposition rules. (#9257)A new function called
inspect_decompsallows for the visualization and inspection of all possible decomposition paths the graph system can take for a concrete operator instance. (#9322) (#9359) (#9427)For each decomposition rule applicable to the operator instance, the output includes its name, circuit diagram, gate count, and wire allocation (if any):
By default,
inspect_decompsdisplays all available decomposition rules for an operator. Alternatively, a single decomposition rule can be inspected by passing its name:A new function called
decomp_inspectoris available for verifying how the decomposition graph chooses decomposition rules for each operator instance in a circuit. (#9359) (#9436)The
decomp_inspectoracts as a transform that can be applied on a QNode as a decorator. It returns an object that allows for interactively querying a given operator to identify which decomposition rules were considered and which one was chosen.Consider the following example where we want to efficiently decompose a
MultiRZinto single-qubit rotations andCNOTs:We can then call the
inspector'sinspect_decompsmethod and provide theMultiRZinstance of interest to see which decomposition rules were considered.For each decomposition rule applicable to the controlled
MultiRZoperator instance, the inspector provides a summary of its weighted cost, wire allocations, and the "Full Expansion" (the final gate counts produced after decomposing all the way down to the target gate set).Similar to the
qp.decomposetransform, thedecomp_inspectorprovides the ability to inject new decomposition rules via the keyword argumentsfixed_decompsandalt_decomps. For more details on the inspection capabilities please consult the documentation fordecomp_inspector.The
list_decompsfunction now returns an object that is easier to interact with, including better legibility when printing the entire set of available decomposition rules and when printing individual ones. Additionally, the object returned supports accessing a specific rule by index or by name. (#9260)A new
gate_setsmodule contains pre-defined gate sets that can be plugged into thegate_setargument of thedecomposetransform. These pre-defined gate sets can be easily accessed and integrated into decompositions workflows. Key gate sets include: (#8915) (#9045) (#9259) (#9417)qp.gate_sets.CLIFFORD_Twhich contains the Clifford+T gate set andqp.gate_sets.CLIFFORD_T_PLUS_RZwith an additionalRZgate. -qp.gate_sets.ROTATIONS_PLUS_CNOTwhich contains single-qubit rotations andCNOT. -qp.gate_sets.IDENTITYwhich contains theIdentityand theGlobalPhasegates.Here is an example using the
ROTATIONS_PLUS_CNOTgate set to decompose a controlledMultiRZgate:Resource Estimation Templates 📏
New lightweight representations of the
HybridQRAM,SelectOnlyQRAM,BasisEmbedding, andBasisStatetemplates have been added for fast and efficient resource estimation. These are available in theestimatormodule as:qp.estimator.HybridQRAM,qp.estimator.SelectOnlyQRAM,qp.estimator.BasisEmbedding, andqp.estimator.BasisState. (#8828) (#8826) (#9415) (#9449)>>> qre.estimate(hybrid_qram)() --- Resources: --- Total wires: 12 algorithmic wires: 11 allocated wires: 1 zero state: 1 any state: 0 Total gates : 2.797E+3 'Toffoli': 142, 'T': 2.112E+3, 'CNOT': 262, 'X': 65, 'Hadamard': 216Improvements 🛠
Decompositions 🍏
qp.transforms.decomposeis now conveniently accessible from the top level asqp.decompose. (#9011)It is now possible to locally add decomposition rules to an operator via a
qp.decomposition.local_decompscontext manager. These rules will only be available within the context. (#8955) (#8998)The following gate decompositions have been optimized for resource efficiency:
The
QROMdecomposition now has a more efficient allocation of work wires. (#9131)CSWAPis now decomposed more efficiently, usingchange_op_basiswith twoCNOTgates and a singleToffoligate. (#8887)Several new decomposition rules have been added that can be accessed with
enable_graph:MultiControlledXhas a new decomposition into a pair ofTemporaryANDgates and oneCNOT. It takes two control wires and at least onezeroedwork wire that has been passed explicitly. (#9291)TemporaryANDcan now be decomposed into the equivalent (although slightly more expensive)Toffoligate. Note that this decomposition only is valid ifTemporaryANDis used as intended - on zeroed input target qubits or zeroed output target qubits forAdjoint(TemporaryAND). (#9303) (#9424)A new decomposition of
Evolutionintoqp.PauliRothas been added which is compatible with the new graph-based decomposition system. Similarly, a decomposition ofqp.RZintoqp.PhaseShift, including a global phase, has been added. (#9001) (#9049)The graph-based decompositions system, enabled via
enable_graph, now additionally supports the customadjointmethod of qutrit operators such asQutritUnitary,ControlledQutritUnitary, andTRZ. (#9056)The custom
adjointmethod of qutrit operators are implemented as decomposition rules compatible with the new graph-based decomposition system. (#9056)Now, when the new graph-based decomposition system is enabled, the
decomposetransform no longer tries to find a decomposition for an operator that meets a providedstopping_condition, even if it is not in the definedgate_set. (#9036)A
strictkeyword argument was added to thedecomposetransform that, when set toFalse, allows the decomposition graph to treat operators without a decomposition as part of the gate set. This prevents the decomposition graph from erroring out by keeping these operators in the circuit. (#9025)The inspectibility of general symbolic decomposition rules is improved. The string representation of a decomposition rule is by default its source code. Now for symbolic decomposition rules that wrap a base decomposition rule, the source code for the base decomposition rule is also displayed when printing this rule. (#9305)
Allowed the passing of
num_work_wires,alt_decompsandfixed_decompsto the device preprocessing functiondecompose, which are then passed through to the graph-based decomposition system. (#9094)The decomposition of
BasisStateis now compatible withqjitandjax.jitfor static wires and/or states. Additionally, the parametric decomposition for traced states withoutqjitwas updated to use powers ofXrather thanRX. (#9069) (#9124) (#9339)The decompositions of
TemporaryAND,MultiRZ, andDiagonalQubitUnitaryare now compatible with Catalyst. (#9157)The
sk_decompositionnow accepts"Adjoint(T)"and"Adjoint(S)"in thebasis_setas a now-preferred alternative to the old"T*"and"S*"convention for gate adjoints. (#9231)Some decomposition rules for
MultiControlledX(e.g.,_mcx_two_borrowed_workersand_mcx_one_borrowed_worker) became identical for instances of this operator on less than 6 wires. To prevent this, stricter conditions have been applied on these decompositions. (#9324)Some wire reusage was removed in
Selectthat was not consistent with the approach to work wires elsewhere in PennyLane, and that was not taken into account in the resource functions for the graph-based decomposition system (leading to decompositions not being resolved correctly). Also simplified the resource calculation of one decomposition ofSelect. (#9222)The decomposition of
QSVThas been updated to be consistent with or without the graph-based decomposition system enabled. (#8994)When the new graph-based decomposition system is enabled, the
decomposetransform no longer raises duplicate warnings about operators that cannot be decomposed. (#9025)A new
DecompositionWarningis now raised instead of a generalUserWarningif the decomposition graph is unable to find a solution for an operator. (#9001)With the new graph-based decomposition system enabled, internal use of the
decomposetransform no longer raises warnings when the graph is unable to find a decomposition for an operator in the following scenarios: (#9001)null.qubitdevice. - compilation withqp.compile. - gradient transforms within theexpand_transformofhadamard_gradandparam_shift.In these cases the operators will be treated as supported.
Disentangling Transforms 🧶
The
disentangle_cnotanddisentangle_swapare now callable from PennyLane, not just from Catalyst'spassesmodule. These compilation passes simplify rendundantCNOTandSWAPgates. (#9133).. note::
The
disentangle_cnotanddisentangle_swapare compilation passes that are only compatible withqjitworkflows.Both compilation passes are designed to recognize patterns that include$\vert 1 \rangle$ state). This is illustrated in the example below, where no
CNOTandSWAPgates that are redundant. In the case ofdisentangle_cnot,CNOTgates are replaced when the control wire is preceded by anXgate (and the control wire is guaranteed to be in theCNOTgates remain after the compilation pass is applied.Drawing ✏️
The
draw_graphfunction is now accessible from PennyLane, not just from Catalyst. This function allows for compact graphical inspection ofqjit-compiled circuits, preserving structured control flow. (#9020).. note::
The
draw_graphfunction is only compatible withqjitworkflows.Like with
draw,draw_mpl, andspecs,draw_graphcan be given alevelto inspect how compilation passes affect the circuit.After all optimizations are applied (
level=2), we can still see the structure of the circuit.A new function called
labelhas been added, which allows for attaching custom labels to operator instances for circuit drawing. (#9078)>>> print(qp.draw(circuit)()) 0: ──H("my-h")─╭●─┤ Probs 1: ────────────╰X─┤ ProbsIn addition to this change, the
markwas added to mark an operator as an input-encoding gate forcircuit_spectrum, andqnode_spectrum.Program Capture 📥
With program capture enabled and using
for_loopandwhile_loop, constant closure variables with dynamic shapes can be used as such multiple times, no longer leading to leaked-tracer errors. (#9275) (#9335)A more informative error is raised if something that is not a measurement process is returned from a QNode when program capture is turned on. (#9072)
qp.condconverts non-boolean predicates to boolean immediately during capture time instead offrom_plxprdoing this, allowing for easier maintenance and organization offrom_plxpr. (#9336)qp.for_loopwith negative step sizes is now handled immediately during capture time instead of handling this withinfrom_plxpr, allowing for easier maintenance and organization offrom_plxpr. (#9299)With program capture, dynamic-shaped arrays returned from
qp.for_loopandqp.while_loopcan now be combined with other dynamic-shaped arrays returned fromqp.for_loopandqp.while_loop. (#9245)qp.vjpandqp.jvpare now compatible with program capture. (#8736) (#8788) (#9019)A
qp.capture.subroutinehas been added for jitting quantum subroutines with program capture. (#8912)qp.countsof mid-circuit measurement results is now compatible with program capture. (#9022)Program capture support for
StatePrepandBasisStatehas been enhanced to acceptstatearguments oflistortupletypes. (#9338)Catalyst Compatibility 🤝
BasisEmbeddingis now captured asBasisStatefor compatibility with Catalyst and program capture. (#9183)The
dynamic_one_shotandsplit_to_single_termstransforms are now compatible withqp.qjit. (#9129)BBQRAM,HybridQRAM,SelectOnlyQRAMandQROMnow accept their classical data as a 2-dimensional array data type, which increases compatibility with Catalyst. (#8791)There is now one single source of truth for documentation of Catalyst passes while still maintaining accessibility from both PennyLane and Catalyst. This includes the following transforms:
to_ppr,commute_ppr,merge_ppr_ppm,ppr_to_ppm,reduce_t_depth,decompose_arbitrary_ppr,ppm_compilation, andparity_synth. (#9020) (#9395) (#9444)The source code for these passes in PennyLane has been removed as part of this change. However, all transforms listed above can still be accessed from the
pennylane.transformsmodule as before (if Catalyst is installed:pip install pennylane-catalyst).qp.math.givens_decompositionandqp.BasisRotationare now compatible withqjitwhencaptureis disabled. (#9155)qp.value_and_gradis now available to simultaneously calculate the results and gradients in Catalyst. (#8814)Catalyst version information has been added to
about. (#9050)Other improvements
Support has been added to
assert_validfor decompositions that include mid-circuit measurements alongside better verification for the length of compared iterables. (#9378)A convenience function called
ceil_log2has been added, which computes the ceiling of the base-2 logarithm of its input and casts the result to anint. It is equivalent toint(np.ceil(np.log2(n))). (#8972) (#9069)A new function called
binary_decimalshas been added to enable easy translation of rotation angles to the binary representation of their decimals. This is important for discretization steps, for example via phase gradient decompositions. (#9117)The$\mathbb{Z}_2$ . (#8982)
binary_finite_reduced_row_echelonfunction was moved to a new file and now includes further linear algebraic functionalities overbinary_is_independentcomputes whether a vector is linearly independent of a basis of binary vectors overbinary_matrix_rankcomputes the rank overbinary_solve_linear_systemsolves a linear system of the formbinary_select_basisselects linearly independent columns out of a collection of binary column vectors. The result forms a basis for the columnspace of the input. The columns that are not selected are returned as well.A
PauliSentence.pruneandFermiSentence.prunemethod has been added, which removes terms with coefficients below a provided threshold. (#9278)Replaced the O(n²) incremental
@=operator chaining inqp.pauli.string_to_pauli_wordandqp.pauli.binary_to_pauliwith a singleqp.prod(*tuple_of_ops)call, collecting operators via generator expressions. These operators are now much faster for large Pauli strings. (#9271)Operations using
PauliSentenceare now much faster due to additional memorization inPauliWord.__hash__(#9261)ZX-related transforms are now compatible with
pyzxv0.10.0. (#9179)The
to_zxtransform is now compatible with the new graph-based decomposition system. (#8994)A new function called
qp.decomposition.reconstructhas been added, which reconstructs the original operator instance from(*op.data, op.wires, **op.resource_params). This enablesqjit-compatible symbolic decomposition rules that do not need to take an instance of the base operator as input. (#9188)The output of the
qp.while_loopcondition is now automatically converted to abool. (#9184)A function for setting up transform inputs, including setting default values and basic validation, can now be provided to
qp.transformviasetup_inputs. (#8732)The
unitary_to_rottransform now recursively decomposesQubitUnitaryoperations. This fixed a bug where two-qubit unitaries would decompose incorrectly to two single-qubit unitaries rather than their rotation decomposition. (#9144)Operations involving
FermiWordobjects are now significantly faster due to various performance enhancements made to the class. (#9283)MottonenStatePreparationnow supports parameter broadcasting in its decomposition. (#9148)Circuits containing
GlobalPhaseare now trainable without removing theGlobalPhase. (#8950)Quantum functions defining quantum operations can now be passed to the
compute_op,target_opanduncompute_oparguments ofchange_op_basis. (#9163)The
qp.estimator.Resourcesclass now has a better string representation in Jupyter Notebooks. (#8880)matrixcan now also be applied to a sequence of operators. (#8861)A
qp.workflow.get_compile_pipeline(qnode, level)(*args, **kwargs)function has been added to extract theCompilePipelineof a given QNode at a specific level. (#8979) (#9425)No unnecessary classical registers will be created now when using
qp.to_openqasmwithmeasure_all=False. (#9033)Both
"subroutines"and"custom_gates"are now always initialized in the QASM interpreter, resulting in more robust behaviour with PennyLane's QASM interpreter. (#9201)Applying
qp.ctrlonSnapshotno longer produces aControlled(Snapshot). Instead, it now returns the originalSnapshot. (#9001)The
default.qubitdevice now supports parameter-broadcastedGlobalPhaseoperations. (#9148)Global phases are now supported in
from_qasm3so that QASM including thegphaseinstruction can be interpreted. (#9247)Labs: a place for unified and rapid prototyping of research software 🧪
Added a new
labs.estimator_betafor experimental development of resource estimation tools. Added various classes and functions tolabs.estimator_betato support advanced qubit management for resource estimation. Removed existing resource estimation functionality from thelabs.resource_estimationmodule. (#8996) (#8868)Allocate, allows users to allocate qubits in a resource decomposition. -Deallocate, allows users to deallocate qubits in a resource decomposition. -MarkClean, allows users to mark the state of qubits as the zero state in a circuit. -MarkQubits, allows users to mark the state of qubits in a circuit. -estimate_wires_from_circuit, estimates the number of additional qubits required from a circuit. -estimate_wires_from_resources, estimates the number of additional qubits required from aResourcesobject.A new
labs.estimator_beta.estimate()function has been created, which extends the functionality ofqp.estimator.estimate()to utilize the advanced qubit management features for resource estimation. (#9139)Created a new
LabsQROMresource operator in labs and added multiple alternate decompositions in labs forMultiControlledXthat utilize the new qubit management features. (#9258)mcx_many_clean_aux_resource_decomp, uses multiple clean qubits to decompose. -mcx_one_clean_aux_resource_decomp, uses only one clean qubit to decompose. -mcx_one_dirty_aux_resource_decomp, uses only one dirty qubit to decompose.Added alternate decompositions for
CHandHadamardoperations inlabs.estimator_betato get optimal numbers. (#9178)Added comparator decompositions for
RegisterEqualityandOutOfPlaceIntegerComparatorinlabs.estimator_beta(#9220)Added alternate controlled decompositions for
PauliRotandSelectPauliRotoperations inlabs.estimator_betato get optimal numbers. (#9186)Added resource templates for state preparation operators, which include
LabsMottonenStatePreparation,LabsCosineWindow, andLabsSumOfSlatersPrep. (#9202)Added various alternate resource decomposition functions for operators which make use of the phase gradient trick to accurately track auxiliary qubits using the new qubit management features. (#9391)
Added custom phase gradient decomposition rules for
RZandSelectPauliRot.make_rz_to_phase_gradient_decompforRZ-make_selectpaulirot_to_phase_gradient_decompforSelectPauliRotTheir outputs can be passed as
fixed_decompsinqp.decomposeand are necessary for efficient discretization strategies in application algorithms. (#9115)The integration test for computing perturbation error of a compressed double-factorized (CDF) Hamiltonian in
labs.trotter_erroris upgraded to use a more realistic molecular geometry and a more reliable reference error. (#8790)Breaking changes 💔
The
num_x_wiresandnum_work_wiresarguments were added to theresource_keysandresource_paramsofSemiAdder. (#9293)With this breaking change, please note the following:
SemiAddernow require those arguments. - When registering a resource function (qp.register_resources) to a decomposition rule of an operator that containsSemiAdder, the resource representation ofSemiAddermust also receive these new arguments. - These changes are relevant only withenable_graph.All
Operatorclasses are now queued by default, unless they implement a customqueuemethod that changes this behaviour. (#8131) (#9029) (#9423)This change also affects operators commonly used for operator math:
Hermitian-SProd-Sum-SparseHamiltonian-Projector-BasisStateProjectorNote, however, that all
Operatorclasses that are used to construct new operators are de-queued, so the following example does not illustrate the changed behaviour (i.e., creatingBremovesAfrom the queue in the example below):However, if we convert an operator
Ato numerical data, from which a new operatorBis constructed, the chain of operator dependencies is broken and de-queuing will not work as previously expected:As we can see, the
Hamiltonianinstance assigned toAremained in the queue. In cases where such a conversion to numerical data is unavoidable, perform the conversion outside of the quantum circuit.Support for NumPy 1.x has been dropped following its end-of-life. NumPy 2.0 or higher is now required. (#8914) (#8954) (#9017) (#9167)
compute_qfunc_decompositionandhas_qfunc_decompositionhave been removed fromOperatorand all subclasses that implemented them. The graph decomposition system (enable_graph) should be used when capture is enabled. (#8922)The
pennylane.devices.preprocess.mid_circuit_measurementstransform has been removed. Instead, the device should determine which MCM method to use, and explicitly includedynamic_one_shotordefer_measurementsin its preprocess transforms if necessary. SeeDefaultQubit.setup_execution_configandDefaultQubit.preprocess_transformsfor an example. (#8926)The
custom_decompskeyword argument toqp.devicehas been removed. Instead, with the graph decomposition system (enable_graph), new decomposition rules can be defined as quantum functions with registered resources. Seepennylane.decompositionfor more details. (#8928)As an example, consider the case of running the following circuit, where we wish to convert
CNOTgates intoHadamardandCZgates.Instead of defining the
CNOTdecomposition as follows withcustom_decomps,the same result would now be obtained using:
The
pennylane.operation.Operator.is_hermitianproperty has been removed and replaced withpennylane.operation.Operator.is_verified_hermitian, as it better reflects the functionality of this property. Alternatively, consider using thepennylane.is_hermitianfunction instead as it provides a more reliable check for hermiticity. Please be aware that it comes with a higher computational cost. (#8919)Passing a function to the
gate_setargument inpennylane.decomposehas been removed. Thegate_setargument expects a static iterable of operator type and/or operator names, and the function should be passed to thestopping_conditionargument instead. (#8919)argnumhas been renamedargnumsinqp.grad,qp.jacobian,qp.jvp, andqp.vjpto better match Catalyst and JAX. (#8919)Access to the following functions and classes from the
pennylane.resourcesmodule has been removed. Instead, these functions must be imported from thepennylane.estimatormodule. (#8919)qp.estimator.estimate_shotsin favor ofqp.resources.estimate_shots-qp.estimator.estimate_errorin favor ofqp.resources.estimate_error-qp.estimator.FirstQuantizationin favor ofqp.resources.FirstQuantization-qp.estimator.DoubleFactorizationin favor ofqp.resources.DoubleFactorizationDeprecations 👋
The
pennylane.workflow.get_transform_programfunction has been deprecated and will be removed in v0.46. Instead, please use the improvedpennylane.workflow.get_compile_pipelineto retrieve the compilation pipeline of a QNode. (#9077)The
idkeyword argument to several classes has been renamed or removed entirely, and those changes will be official in v0.46. (#8951) (#9051)idkeyword argument toMeasureNodeandPrepareNodehas been renamed tonode_uid. - Theidkeyword argument toMidMeasurehas been renamed tomeas_uid. - Theidkeyword argument toMeasurementProcesswill be removed. - Theidkeyword argument toOperatorhas been deprecated and will be removed.The
idargument previously served two purposes: (1) adding custom labels to operator instances which were rendered in circuit drawings and (2) tagging encoding gates for Fourier spectrum analysis.These are now handled by dedicated functions:
.. warning::
Neither of these functions are supported in a
qjit-compiled circuit, as the original behaviour was never supported.Use
labelto attach a custom label to an operator instance for circuit drawing:Use
markto mark an operator as an input-encoding gate forcircuit_spectrum, andqnode_spectrum:Setting
_queue_category=Nonein an operator class in order to deactivate its instances being queued has been deprecated. Implement a customqueuemethod for the respective class instead. Operator classes that used to have_queue_category=Nonehave been updated to_queue_category="_ops", so that they are queued now. (#8131)The
BoundTransform.transformproperty has been deprecated. UseBoundTransform.tape_transforminstead. (#8985)expandand related functions (expand_tape,expand_tape_state_prep, andcreate_expand_trainable_multipar) have been deprecated and will be removed in v0.46. Instead, please use theqp.transforms.decomposetransform for decomposing circuits. (#8943) (#9438)Providing a value of
Nonetoaux_wireofqp.gradients.hadamard_gradwithmode="reversed"ormode="standard"has been deprecated and will no longer be supported in v0.46. Anaux_wirewill no longer be automatically assigned. (#8905)The
qp.transforms.create_expand_fnfunction has been deprecated and will be removed in v0.46. Instead, please use theqp.transforms.decomposefunction for decomposing circuits. (#8941) (#8977) [(Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.