abdullahkhalids / qecft

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

Toric Code Syndrome circuit #16

Closed pandey-tushar closed 1 year ago

pandey-tushar commented 1 year ago

Trying Toric Code syndrome circuit built upon the surface code syndrome circuit

abdullahkhalids commented 1 year ago

Hey! I am a little confused about why you have opened this issue. Were you a unitaryhack participant? That is over, and we already completed the issue related to the surface code.

pandey-tushar commented 1 year ago

Hi @abdullahkhalids This is not for unitary hack. I am interested in Surface codes and topological codes in general. I know the theory of it but never got a chance to implement it. After seeing the surface code implementation, I understood how to build the syndrome circuits. If the file for the surface code is good (i.e. works), then the file for Toric code version should also work, as it only adds the boundary condition by taking the neighbors modulo the row and the column length in the appropriate directions.

I was wondering if you could check whether this idea (or program) is correct? I didn't have any other mode of contact for you, so decided to add the Toric code file, just in case someone can look at it and verify.

This is not for the unitary hack event, but just for my interest and in the domain of error correction as well, that's why I put it up here.

abdullahkhalids commented 1 year ago

Sorry it took me forever to reply. Been a busy few days.

I am glad you learned more about surface codes from these circuits.

I believe you have imposed the correct condition to create the toric code.

But there is a problem. You can't create arbitrary sized lattices on a torus (the row and col arguments). Note that, when you take the lattice off a torus and flatten it out, the left boundary must match the right. What this means is that if the left most column is a $X$-type stabilizer syndrome qubits column, the right most column would be a $Z$-type stabilizer syndrome qubits column. Similarly for top and bottom.

This means, you can't just pass arbitrary row and col arguments. You have to impose some constraints on them as well.


Now there is another administrative issue with your pull request. Your code comments state that

This is built upon the surface code version of this file using Bing AI

I am trying to write a book. Books usually have copyright attached with them. Currently the copyright status of material generated by AIs is not clear. There are even court cases going on in several countries, through which it might be decided who owns the copyright of the material generated by AI.

As such, I can't really accept your pull request, as I don't want to include any material in the book over which I don't have a copyright claim.

Once again, I appreciate the initiative you have taken.. If you have more questions about quantum error correction, the best place to ask is https://quantumcomputing.stackexchange.com/ I regularly answer questions there.

pandey-tushar commented 1 year ago

Hi @abdullahkhalids. Thank you for the comments. It took me some time to realize what you meant. I have changed the code accordingly. It does not include anything from AI generated material. Now, the right side of the lattice and the bottom side of the lattice is glued to the left and top side, so, there has to be even number of rows and columns making the structure of the lattice a little more rigid.

I don't know if you would like to have a look at it or include it, but it's fine either way. Can I put it on my github BTW? Thank you

abdullahkhalids commented 1 year ago

Its your code. You can of course put it on your own github.