Deprecations¶
Pending deprecations¶
The
get_operation
tape method is updated to return the operation index as well, changing its signature.The new signature is available by changing the arg
return_op_index
toTrue
in v0.29The old signature is replaced with the new one in v0.30
The
observables
argument inQubitDevice.statistics
is deprecated. Please usecircuit
instead. Using a list of observables inQubitDevice.statistics
is deprecated. Please use aQuantumTape
instead.Still accessible in v0.28, v0.29
Will be removed in v0.30
The
seed_recipes
argument inqml.classical_shadow
andqml.shadow_expval
is deprecated. A new argumentseed
has been added, which defaults toNone
and can contain an integer with the wanted seed.Still accessible in v0.28, v0.29
Will be removed in v0.30
The
grouping
module is deprecated. The functionality has been moved and reorganized in the newpauli
module underpauli/utils.py
orpauli/grouping/
.Still accessible in v0.27, v0.28, v0.29
Will be removed in v0.30
The functions from
grouping/pauli.py
,grouping/transformations.py
andgrouping/utils.py
have been moved topauli/utils.py
. The remaining functions have been consolidated in thepauli/grouping/
directory.qml.ExpvalCost
has been deprecated, and usage will now raise a warning.Deprecated in v0.24
Will be removed in v0.30
Instead, it is recommended to simply pass Hamiltonians to the
qml.expval
function inside QNodes:@qml.qnode(dev) def ansatz(params): some_qfunc(params) return qml.expval(Hamiltonian)
The
collections
module has been deprecated.Deprecated in v0.29
Will be removed in v0.31
qml.op_sum`
is deprecated. Users should useqml.sum
instead.Deprecated in v0.29.
Will be removed in v0.31.
A warning has been added in
Evolution
redirecting users toqml.evolve
. This was added because we want to change the behaviour ofEvolution
, adding a-1
to the given parameter.Deprecated in v0.29.
Will be removed in v0.30.
The
qml.utils.sparse_hamiltonian
function is deprecated.~.Hamiltonian.sparse_matrix
should be used instead.Deprecated in v0.29
Removed in v0.31
Completed deprecation cycles¶
qml.VQECost
is removed.Deprecated in 0.13
Removed in 0.29
In-place inversion —
op.inv()
andop.inverse=value
— is deprecated. Please useqml.adjoint
orqml.pow
instead.Still accessible in v0.27 and v0.28
Removed in v0.29
Don’t use:
>>> v1 = qml.PauliX(0).inv() >>> v2 = qml.PauliX(0) >>> v2.inverse = True
Instead, use:
>>> qml.adjoint(qml.PauliX(0)) Adjoint(PauliX(wires=[0])) >>> qml.pow(qml.PauliX(0), -1) PauliX(wires=[0])**-1 >>> qml.pow(qml.PauliX(0), -1, lazy=False) PauliX(wires=[0]) >>> qml.PauliX(0) ** -1 PauliX(wires=[0])**-1
The
qml.utils.decompose_hamiltonian()
method is removed. Please useqml.pauli_decompose()
.Still accessible in v0.27
Removed in v0.28
qml.tape.get_active_tape
is deprecated. Please useqml.QueuingManager.active_context()
instead.Deprecated in v0.27
Removed in v0.28
qml.transforms.qcut.remap_tape_wires
is deprecated. Please useqml.map_wires
instead.Deprecated in v0.27
Removed in v0.28
QuantumTape.inv()
is deprecated. Please useQuantumTape.adjoint()
instead. This method returns a new tape instead of modifying itself in-place.Deprecated in v0.27
Removed in v0.28
qml.tape.stop_recording
andQuantumTape.stop_recording
are moved toqml.QueuingManager.stop_recording
Deprecated in v0.27
Removed in v0.28
QueuingContext
is renamedQueuingManager
.Deprecated name
QueuingContext
in v0.27Removed in v0.28
QueuingManager.safe_update_info
andAnnotateQueue.safe_update_info
are removed.Deprecated in v0.27
Removed in v0.28
ObservableReturnTypes
Sample
,Variance
,Expectation
,Probability
,State
, andMidMeasure
are moved tomeasurements
fromoperation
.Deprecated in v0.23
Removed in v0.27
The
qml.utils.expand
function is deprecated.qml.math.expand_matrix
should be used instead.Deprecated in v0.24
Removed in v0.27
The
qml.Operation.get_parameter_shift
method is removed. Use the methods of thegradients
module for general parameter-shift rules instead.Deprecated in v0.22
Removed in v0.28
qml.transforms.measurement_grouping
has been removed. Please useqml.transforms.hamiltonian_expand
instead.Deprecated in v0.28
Removed in v0.29
qml.transforms.make_tape
was previously deprecated, but there is no longer a plan to remove it. It no longer raises a warning, and the functionality is unchanged.Deprecated in v0.28
Un-deprecated in v0.29