PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Operators that have num_wires = AnyWires or num_wires = AllWires (such as qml.Barrier) are applied to all wires when instantiated with wires = []. This is the default behaviour for the qml.Barrier operation, but generally we want to raise an error when this happens.
Feature details
Operators that have
num_wires = AnyWires
ornum_wires = AllWires
(such asqml.Barrier
) are applied to all wires when instantiated withwires = []
. This is the default behaviour for theqml.Barrier
operation, but generally we want to raise an error when this happens.This feature request follows the issue https://github.com/PennyLaneAI/pennylane/issues/2496, which was solved by the PR https://github.com/PennyLaneAI/pennylane/pull/2826.
Implementation
See PR https://github.com/PennyLaneAI/pennylane/pull/2511.
How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
No response