I'm currently trying to make my own TransformationPass to use when compiling a QuantumCircuit for specific hardware, but I'm struggling to get things to work with the DAGCircuit that gets passed to the run(self, dag)
method that gets overridden. My main issue at the moment is trying to figure out which qubits each node in the graph actually operates on. I can access the wire for each node, but accessing the qubit index from there raises a DeprecationWarning.
I can simply ignore the warning, but it gives me the impression that I should be going about this another way.
Is there a formal method for accessing the qubit (either object or simply its index) given the DAG?