qiskit
qiskit copied to clipboard
Granular exception hierarchy for TranspilerErrors
What should we add?
In order to handle different types of TranspilerErrors
dynamically, we need many more granular exception classes similar to what was done for CircuitTooWideForTarget
.
Basically, every instance of "raise TranspilerError(" should be instead be replaced with an exception class that extends TranspilerError
(this provides backwards compatibility for code already catching TranspilerError
). There are a lot of them, but my prioritized list would start with errors like:
-
TranspilerError: "Unknown operation type for DAGOpNode(op=Instruction(name='reset', num_qubits=1, num_clbits=0, params=[]), qargs=(Qubit(QuantumRegister(127, 'q'), 35),), cargs=()).
-
TranspilerError: 'The input circuit None is not scheduled. Call one of scheduling passes before running the ConstrainedReschedule pass.
-
TranspilerError: 'Conditional instruction measure is not supported in ALAP scheduler.
-
TranspilerError: 'Number of qubits greater than device.
-
TranspilerError: 'Conditional instruction reset is not supported in ALAP scheduler.
Hi, I keep getting the 1 st type of error listed above. Any idea why? The code used to work fine.
Can we get this issue prioritised ?
Adding to the list above is one more frequent error :-
TranspilerError: 'The length of the layout is different than the size of the circuit: 16 <> 133