Improve error message for mismatching unit ids when adding conditional gates #1580
Labels
classical-logic
issues related to classical logical expressions
enhancement
New feature or request
stale
The following method works fine for adding a condtional-X gate to a
Circuit
.Notice how I am passing the
Qubit
q[0]
into theCircuit.add_gate
method.However if I replace
q[0]
with0
....I get the following
RuntimeError
Its not at all obvoius from this error what has gone wrong here. This error message should make the fix clearer.
In fact, arguably this shouldn't give an error in pytket as in the current interface we support referencing qubits with
Qubit
s and integers. However not sure how practical overload merging would be.The text was updated successfully, but these errors were encountered: