Skip to content

Commit

Permalink
Version 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seokhyung-lee committed Oct 27, 2023
1 parent eeb560a commit 7926407
Show file tree
Hide file tree
Showing 4 changed files with 1,094 additions and 223 deletions.
10 changes: 9 additions & 1 deletion docs/graph_tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,15 @@ <h1 class="title">Module <code>optgraphstate.graph_tools</code></h1>
return graph


def _get_parity_encoded_graph(logical_graph: ig.Graph, n, m, orientation=True):
def _get_parity_encoded_graph(logical_graph, n, m, orientation=True):
if isinstance(logical_graph, str):
if logical_graph in [&#39;3-star&#39;, &#39;3-linear&#39;]:
logical_graph = get_sample_graph(&#39;star&#39;, 3)
elif logical_graph in [&#39;6-ring&#39;, &#39;6-cycle&#39;]:
logical_graph = get_sample_graph(&#39;cycle&#39;, 6)
else:
raise ValueError(&#34;Unsupported logical graph&#34;)

logical_vcount = logical_graph.vcount()
vcount = logical_vcount * n * m
g = ig.Graph(vcount, vertex_attrs={&#34;clifford&#34;: None})
Expand Down
Loading

0 comments on commit 7926407

Please sign in to comment.