QCHackers / tqec

Design automation software tools for Topological Quantum Error Correction
https://qchackers.github.io/tqec/
Apache License 2.0
60 stars 17 forks source link

Implement `TemplateGrid` #245

Closed nelimee closed 3 months ago

nelimee commented 3 months ago

This PR implements a generic TemplateGrid that can be used to generate a grid of templates representing logical qubits (for example).

Closes #244

nelimee commented 3 months ago

This is ready for review.

nelimee commented 3 months ago

I don't quite get the use case for DenseQubitSquareTemplate, could you explain more on this?

QubitSquareTemplate is not complete enough. For example, when gluing two logical qubits into a larger patch, some of the corners should be assigned a plaquette, which is not possible with QubitSquareTemplate because these corners are not included in the template.

As a side note, it allows even and odd logical qubits, we might want to restrict that in the future according to the norm we want to use.

afowler commented 3 months ago

Just as a comment, while we are definitely moving towards having an even convention for our surface code and standardizing the global 3D structure, there will be cases where we need to build specialized structures at a lower level, so we do need to maintain generality. For example, implementing the latest state distillation factory, which we will talk about in due course, will require very custom layers of scalable circuits. The idea is that the entire factory will become a block available in our 3D template and this block will be carefully constructed using all techniques available.

Best, Austin.

On Tue, Jun 25, 2024, 11:48 PM Adrien Suau @.***> wrote:

I don't quite get the use case for DenseQubitSquareTemplate, could you explain more on this?

QubitSquareTemplate is not complete enough. For example, when gluing two logical qubits into a larger patch, some of the corners should be assigned a plaquette, which is not possible with QubitSquareTemplate because these corners are not included in the template.

As a side note, it allows even and odd logical qubits, we might want to restrict that in the future according to the norm we want to use.

— Reply to this email directly, view it on GitHub https://github.com/QCHackers/tqec/pull/245#issuecomment-2190941402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAXTEMXHWJ5KLVNCR5JMTZJJP3DAVCNFSM6AAAAABI4ETOB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQHE2DCNBQGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>