You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature you'd like
Currently a gate cannot be called with an empty list of target qubits. It might be nice for this to be allowed, but to generate no instructions in the resulting program.
How would this feature be used? Please describe.
A circuit may be built programmatically, with gates added to lists of qubits that are determined dynamically. If some of these lists are empty, it may be convenient to still call the function to add the gate, rather than first checking to see if the list is empty.
Describe alternatives you've considered
A user could work around this by ensuring that they do not call gates with an empty list of target qubits.
Additional context
See comment thread here: #993 (comment)
The text was updated successfully, but these errors were encountered:
rmshaffer
changed the title
Evaluate whether an empty register is valid gate input
Consider allowing gates to be called with an empty list of target qubits
Jun 18, 2024
Describe the feature you'd like
Currently a gate cannot be called with an empty list of target qubits. It might be nice for this to be allowed, but to generate no instructions in the resulting program.
How would this feature be used? Please describe.
A circuit may be built programmatically, with gates added to lists of qubits that are determined dynamically. If some of these lists are empty, it may be convenient to still call the function to add the gate, rather than first checking to see if the list is empty.
Describe alternatives you've considered
A user could work around this by ensuring that they do not call gates with an empty list of target qubits.
Additional context
See comment thread here:
#993 (comment)
The text was updated successfully, but these errors were encountered: