abdullahkhalids / qecft

The book A Methods Focused Guide to Quantum Error Correction and Fault-Tolerant Quantum Computation
Other
17 stars 7 forks source link

Implementation of surface codes #1

Closed abdullahkhalids closed 1 year ago

abdullahkhalids commented 1 year ago

A future chapter of the book will discuss surface codes.

Implement the syndrome measurements for the surface code in stac.

Please see how standard syndrome measurements are implemented.

This is a good opportunity to use coordinate based addressing of qubits: see last section of this guide.

  1. Create circ.physical_register manually and give each physical qubit the coordinates on a grid. The coordinates of each physical qubit is an int or a tuple of any length.
  2. Manually create circ.layout_map and map the virtual qubits to these physical qubits.
  3. Then use the circ.geo_append method to create the syndrome circuit.

To complete this issue, please create a .py file in the drafts folder that contains a function _surface_codes_syndrome_measurements.

JiQing000 commented 1 year ago

This issue looks particularly interesting! I will try to solve it during UnitaryHack 2023.

abdullahkhalids commented 1 year ago

@JiQing000 Should I assign you to this bounty then?

AbdullahKazi500 commented 1 year ago

@abdullahkhalids is this issue open

abdullahkhalids commented 1 year ago

@AbdullahKazi500 Lets wait till tomorrow to see if the first person still wants it. If not, then you can do it. Thanks for understanding.

AbdullahKazi500 commented 1 year ago

Okay then please do assign it later on Thank you

JiQing000 commented 1 year ago

@AbdullahKazi500 Lets wait till tomorrow to see if the first person still wants it. If not, then you can do it. Thanks for understanding.

Yes, please assign me to this bounty. Thank you.

JiQing000 commented 1 year ago

Okay then please do assign it later on Thank you

Sorry for taking this issue. If you want, we can work together.

AbdullahKazi500 commented 1 year ago

Yes if you want to @JiQing000

JiQing000 commented 1 year ago

Yes if you want to @JiQing000

Sounds great. How should we contact?

AbdullahKazi500 commented 1 year ago

UF Discord channel My Username is Ludwig Boltzmann

JiQing000 commented 1 year ago

@JiQing000 Should I assign you to this bounty then?

After careful evaluation, we decided to work separately. Please assign the bounty to me, and it would be very kind of you if you could assign @AbdullahKazi500 to another issue. Thank you.

JiQing000 commented 1 year ago

@abdullahkhalids may I ask for the surface encoder circuit, is the value of d specified? Shall I just assume that d = 3?

JiQing000 commented 1 year ago

@abdullahkhalids Hi, I have completed my solution. I used 4 data qubits and 3 ancilla qubits. The 3 ancilla qubits contain two Z-type ancilla and one X-type ancilla. But I could not upload the file to the drafts folder. Could you give me access? Thank you.

abdullahkhalids commented 1 year ago

After careful evaluation, we decided to work separately. Please assign the bounty to me, and it would be very kind of you if you could assign @AbdullahKazi500 to another issue. Thank you.

Thanks for letting me know. @AbdullahKazi500 Good luck.

@abdullahkhalids may I ask for the surface encoder circuit, is the value of d specified? Shall I just assume that d = 3?

@JiQing000 We want the code for arbitrary d. So you will have to put in some work.

But I could not upload the file to the drafts folder. Could you give me access? Thank you.

You are supposed to open a pull request. Please see the unitaryhack website which contains details instructions on how to do this.

JiQing000 commented 1 year ago

@abdullahkhalids Thank you for the clarification. May I ask whether I need to account for even distance and asymmetric surface code?

JiQing000 commented 1 year ago

@abdullahkhalids Hi, I have made a pull request via fork. My solution can create a circuit for symmetrical surface code with any odd value of d. Please let me know if I made any mistake or if any adjustment is required. Thank you!

abdullahkhalids commented 1 year ago

Hey! I don't see a pull request on my end. Please make sure you followed the process properly.

JiQing000 commented 1 year ago

Hey! I don't see a pull request on my end. Please make sure you followed the process properly.

Sorry for my mistake. Now you should be able to find it.

abdullahkhalids commented 1 year ago

Thanks, I see it now. I will test this tomorrow and get back to you.

If you used any particular references, can you kindly link them here.

JiQing000 commented 1 year ago

Thank you for the reply. I mainly refer to this article: Fowler, A.G., Mariantoni, M., Martinis, J.M., & Cleland, A.N. (2012). Surface codes: Towards practical large-scale quantum computation. Physical Review A, 86, 032324 for the theory. I also used the method in this GitHub tutorial to check the results of my code: https://github.com/yaleqc/qtcodes/blob/master/tutorials/xxzz/1-circuits.ipynb.

abdullahkhalids commented 1 year ago

@JiQing000 Thank you for finishing this task. Good luck with the rest of the hackathon.

JiQing000 commented 1 year ago

@abdullahkhalids Thank you and it has been a pleasure journey to work with you. Hope we will have more chances to collaborate in future!