File tree Expand file tree Collapse file tree
source/pip/qsharp/qre/application/magnets/geometry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,40 +148,3 @@ def edge_coloring(self) -> HypergraphEdgeColoring:
148148 i , j = edge .vertices
149149 coloring .add_edge (edge , (i + j - m ) % n )
150150 return coloring
151-
152- # Color edges based on the second vertex index to create n parallel partitions
153- # for i in range(m):
154- # for j in range(m, m + n):
155- # self.color[(i, j)] = (
156- # i + j - m
157- # ) % n # Color edges based on second vertex index
158-
159- # Edge coloring for parallel updates
160- # The even case: n-1 colors are needed
161- # if n % 2 == 0:
162- # m = n - 1
163- # for i in range(m):
164- # self.color[(i, n - 1)] = (
165- # i # Connect vertex n-1 to all others with unique colors
166- # )
167- # for j in range(1, (m - 1) // 2 + 1):
168- # a = (i + j) % m
169- # b = (i - j) % m
170- # if a < b:
171- # self.color[(a, b)] = i
172- # else:
173- # self.color[(b, a)] = i
174-
175- # The odd case: n colors are needed
176- # This is the round-robin tournament scheduling algorithm for odd n
177- # Set m = n for ease of reading
178- # else:
179- # m = n
180- # for i in range(m):
181- # for j in range(1, (m - 1) // 2 + 1):
182- # a = (i + j) % m
183- # b = (i - j) % m
184- # if a < b:
185- # self.color[(a, b)] = i
186- # else:
187- # self.color[(b, a)] = i
You can’t perform that action at this time.
0 commit comments