def _swap_ops_from_edge(edge, layout):
device_qreg = QuantumRegister(len(layout.get_physical_bits()), '<STR_LIT:q>')<EOL>qreg_edge = [(device_qreg, i) for i in edge]<EOL>return [<EOL>DAGNode({'<STR_LIT>': SwapGate(), '<STR_LIT>': qreg_edge, '<STR_LIT>': [], '<STR_LIT:type>': '<STR_LIT>'})<EOL>]<EOL>
Generate list of ops to implement a SWAP gate along a coupling edge.