I have QAOA Quantum Circuit.
qubit_gate_idx={}
dag = circuit_to_dag(qc)
for qubit in dag.qubits:
qubit_gate_idx[qubit] = 0
for vertex in dag.topological_op_nodes():
if len(vertex.qargs) == 0:
continue # Skip vertices with no qargs
elif len(vertex.qargs) == 1:
arg0 = vertex.qargs[0]
how to access the register name and index from qubits i.e. Qubit(QuantumRegister(5, 'q'), 0)
in Qiskit SDK 1.0