# Qiskit predecessor and successor map of DAG circuits

I am trying to figure out how to use the functions "_make_pred_succ_maps". Here is a description of the function from Github:

def _make_pred_succ_maps(self, n):
"""Return predecessor and successor dictionaries.
Args:
n (int): reference to self.multi_graph node id
Returns:
tuple(dict): tuple(predecessor_map, successor_map)
These map from wire (Register, int) to predecessor (successor)
nodes of n.
"""


Nevertheless, I do not understand how to interpret outputs like the following:

>>> circuit_name._make_pred_succ_maps(1)
({}, {(QuantumRegister(3, 'a'), 0): 10})

>>> circuit_name._make_pred_succ_maps(2)
({(QuantumRegister(3, 'a'), 0): 41}, {})


What do the individual numbers mean?

• I'm not familar with this function, but QuantumRegister(3, 'a') describes a register of three qubits, with the register assigned the name 'a'. – James Wootton Mar 8 at 15:20
• @JamesWootton Thank you for this info. Do you know what the other numbers mean? – Samuel Bosch Mar 9 at 16:06

(QuantumRegister(3, 'a'), 0) means the 0th qubit in a QuantumRegister called 'a' of size 3.
So what ({(QuantumRegister(3, 'a'), 0): 41}, {}) is saying is there is an edge from node 41 along wire (QuantumRegister(3, 'a'), 0) that ends at node 2 (the node you provided) and that this node has no successors as the second dict is empty.