@@ -81,7 +81,7 @@ def coloring_copied_nodes(
8181 node .id = getattr (n0 , "id" , id (n0 ))
8282
8383 @staticmethod
84- def copy (
84+ def copy_nodes (
8585 nodes : Sequence [tn .Node ],
8686 dangling : Optional [Sequence [tn .Edge ]] = None ,
8787 conj : Optional [bool ] = False ,
@@ -111,7 +111,7 @@ def copy(
111111 def _copy (
112112 self , conj : Optional [bool ] = False
113113 ) -> Tuple [List [tn .Node ], List [tn .Edge ]]:
114- return self .copy (self ._nodes , self ._front , conj )
114+ return self .copy_nodes (self ._nodes , self ._front , conj )
115115
116116 def apply_general_gate (
117117 self ,
@@ -171,7 +171,7 @@ def apply_general_gate(
171171 self ._front [index [0 ]] = n1 [0 ]
172172 self ._front [index [1 ]] = n2 [1 ]
173173 if self .is_dm :
174- [n1l , n2l ], _ = self .copy ([n1 , n2 ], conj = True )
174+ [n1l , n2l ], _ = self .copy_nodes ([n1 , n2 ], conj = True )
175175 n1l [1 ] ^ self ._front [index [0 ] + nq ]
176176 n2l [2 ] ^ self ._front [index [1 ] + nq ]
177177 self ._nodes .append (n1l )
@@ -186,7 +186,7 @@ def apply_general_gate(
186186 self ._front [index [0 ]] = n1 [0 ]
187187 self ._front [index [1 ]] = n2 [1 ]
188188 if self .is_dm :
189- [n1l , n2l ], _ = self .copy ([n1 , n2 ], conj = True )
189+ [n1l , n2l ], _ = self .copy_nodes ([n1 , n2 ], conj = True )
190190 n2l [1 ] ^ self ._front [index [0 ] + nq ]
191191 n1l [2 ] ^ self ._front [index [1 ] + nq ]
192192 self ._nodes .append (n1l )
@@ -203,7 +203,7 @@ def apply_general_gate(
203203 # gate.id = id(gate)
204204 self ._nodes .append (gate )
205205 if self .is_dm :
206- lgates , _ = self .copy ([gate ], conj = True )
206+ lgates , _ = self .copy_nodes ([gate ], conj = True )
207207 lgate = lgates [0 ]
208208 self ._nodes .append (lgate )
209209 for i , ind in enumerate (index ):
0 commit comments