qml.templates.utils.check_wires

check_wires(wires)[source]

Checks that wires is either a non-negative integer or a list of non-negative integers.

If wires is an integer, wrap it by a list.

Parameters

wires (int or list[int]) – (subset of) wires of a quantum node

Returns

list of wire indices

Return type

list

Raises

ValueError – if the wires argument is invalid