
    z	i                         S r SSKJr  SS jrg)z@Helper function for converting a dag circuit to a dag dependency    )DAGDependencyc                    [        5       nU R                  Ul        U R                  Ul        UR                  U R                  5        UR                  U R                  5        U R                  R                  5        H  nUR                  U5        M     U R                  R                  5        H  nUR                  U5        M     U R                  5        HC  nUR                  R                  5       nUR                  XTR                   UR"                  5        ME     U(       a   UR%                  5         UR'                  5         U R(                  Ul        U$ )a1  Build a ``DAGDependency`` object from a ``DAGCircuit``.

Args:
    dag (DAGCircuit): the input dag.
    create_preds_and_succs (bool): whether to construct lists of
        predecessors and successors for every node.

Return:
    DAGDependency: the DAG representing the input circuit as a dag dependency.
)r   namemetadata
add_qubitsqubits
add_clbitsclbitsqregsvaluesadd_qregcregsadd_cregtopological_op_nodesopcopyadd_op_nodeqargscargs_add_predecessors_add_successorsglobal_phase)dagcreate_preds_and_succsdagdependencyregisternodeinsts         `/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/converters/dag_to_dagdependency.pydag_to_dagdependencyr       s    "OMM \\MSZZ(SZZ(II$$&x( ' II$$&x( ' ((*ww||~!!$

DJJ? +
 '')%%' "%!1!1M    N)T)__doc__qiskit.dagcircuit.dagdependencyr   r     r!   r   <module>r%      s    G 9%r!   