TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
60 stars 21 forks source link

Support extraction of clusters from graph state #87

Closed king-p3nguin closed 1 year ago

king-p3nguin commented 1 year ago

Before submitting, please check the following:

Then, please fill in below:

Context (if applicable):

86

Description of the change:

Related issue: Related to #86

also see that checks (github actions) pass. If lint check keeps failing, try installing black==22.8.0 as behavior seems to vary across versions.

shinich1 commented 1 year ago

@king-p3nguin could you add API docs?

shinich1 commented 1 year ago

Perhaps an example too?

shinich1 commented 1 year ago

do we want to mention fusion-based QC ref or something similar in the docstring?

king-p3nguin commented 1 year ago

I made the following changes:

king-p3nguin commented 1 year ago

I also modified some docs to resolve sphinx errors.

shinich1 commented 1 year ago

@king-p3nguin looks good to me, please squash and merge! let's use commit message fusion network extraction for graph state generation (#87). after this is merged, I will change some names e.g. extract_clusters_from_graph because cluster state sounds like it's larger than graph states in general and extract_fusion_network may make more sense. what do you think?

king-p3nguin commented 1 year ago

@shinich1 Thank you for reviewing! I will merge this now. Come to think of it, as you mentioned, the word "cluster" may create confusion by making people think of cluster states rather than mini clusters in the graph state. Maybe get_fusion_network or get_fusion_network_from_graph_state will be nicer, since the size of the fusion network is similar to the graph state.

shinich1 commented 1 year ago

@king-p3nguin your suggestions look good! I will make these changes and get new release out soon, so that we can put the new version in the graphix-Perceval's requirements.