Implement comparison between QuantumScript
classes with qml.equal
#4894
Labels
good first issue
Good for newcomers
QuantumScript
classes with qml.equal
#4894
Currently, we can use
qml.equal
to compare operations and measurements:but we cannot currently compare our circuit object,
qml.tape.QuantumScript
.To add comparison support, we would need to register a new dispatch for the
_equal
single dispatch function:pennylane/pennylane/ops/functions/equal.py
Line 159 in deaf387
This function
Should return
True
if:trainable_params
are equal, see https://docs.pennylane.ai/en/stable/code/api/pennylane.tape.QuantumScript.html#pennylane.tape.QuantumScript.trainable_paramsAnd
False
otherwise.A PR implementing this should also update the docstring for
qml.equal
and include unit tests for comparison.Example of desired behavior:
The text was updated successfully, but these errors were encountered: