TeamGraphix / graphix

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

Measurement pattern for error-corrected MBQC #48

Closed shinich1 closed 2 months ago

shinich1 commented 1 year ago

Implement the fault-tolerant MBQC as a function or class that generates a graphix.Pattern object. Please implement it in a new file graphix/topological.py.

Please visualize the graph state using Pattern.get_graph() and networkx and see that the graph state indeed forms the RHG lattice.

Optionally, please implement some basic logical qubit operations such as single-qubit Clifford operations.

Please see our contribution guide before starting, and do not forget to comment on this issue to show your interest. We are always happy to answer questions, so do not hesitate to ask on this page.

Thank you for your interest, and good luck!

shinich1 commented 1 year ago

@AbdullahKazi500 as discussed on the other issue page, we need to wait until there's PR ready to merge to assign an issue - please have a go at this, we're looking forward to your PR!

Gopal-Dahale commented 1 year ago

@shinich1 I am trying to understand the graphix library, especially the QAOA example. Qiskit also has a similar example. There, they use an optimizer for optimizing the parameters of the quantum circuit and then get the desired state. I am unable to understand how this works in graphix?

shinich1 commented 1 year ago

@Gopal-Dahale the qiskit example uses scipy.optimize.minimize to do the classical part of the optimization. The same would work for Graphix - we define a function to generate a pattern from parameters and sample the result, and then put the function into minimise function. Since the shape of the circuit (pattern) is always the same in every step, #45 would help speed this process up because we would then only need to compile pattern once.