Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement automatic detector computation #199

Open
nelimee opened this issue Mar 22, 2024 · 4 comments
Open

Implement automatic detector computation #199

nelimee opened this issue Mar 22, 2024 · 4 comments
Assignees
Labels
backend Issue pertaining to the Python backend (tqec package) enhancement New feature or request, may not be in the task flow help wanted Extra attention is needed QOL Improves usability and functionality

Comments

@nelimee
Copy link
Contributor

nelimee commented Mar 22, 2024

Is your feature request related to a problem? Please describe.
Currently, the tqec library requires users to explicitly implement the detectors. To ease that process, detectors are automatically included in Plaquette instances for the "default" situation, when that makes sense. But this way of adding detector is not optimal:

  • the "default" detectors have been chosen arbitrarily, and are not a good fit for all possible codes,
  • requiring users to explicitly annotate detectors should remain a possibility, but is a tedious and error-prone process,
  • there are ways to find detectors automatically.

Describe the solution you'd like
We need to provide a way for users to automatically add detectors. This should be opt-in, as the automatic computation of detectors will likely, at least in the beginning, be driven by heuristics (i.e., not always correct/exhaustive), and because we want the library to provide the most control possible to the users that require it.

Describe alternatives you've considered
For the moment, I am not sure how this should be implemented. I have a theoretical reformulation that works generally, but that is not convenient to compute and may be made more efficient. We also have very localised information: propagated Paulis are, in the current setup in which we only consider surface codes, very much local and cannot spread globally (in the spatial dimension). There might be a way to use that feature by considering the QEC at the plaquette level, before generating the actual circuit.

Finally, we will likely require another abstraction: "layer". It seems reasonable, at the moment and (again) in the setup we are considering, that a QEC is composed of a sequence of layers, each following the scheme:

  • 0 or 1 Moment (in the cirq sense) of reset,
  • k Moments of computation with Clifford gates,
  • 0 or 1 Moment of measurement.

Additional context

@nelimee nelimee added enhancement New feature or request, may not be in the task flow help wanted Extra attention is needed backend Issue pertaining to the Python backend (tqec package) QOL Improves usability and functionality labels Mar 22, 2024
@afowler
Copy link

afowler commented Mar 22, 2024 via email

@inmzhang
Copy link
Contributor

I'll start working on this when I have time. As a starting point, I will try to implement exactly what Austin proposed, which I think should be sufficient for the near-term goal.

@inmzhang inmzhang self-assigned this Mar 25, 2024
@nelimee
Copy link
Contributor Author

nelimee commented May 7, 2024

@inmzhang any update on that issue?

@inmzhang
Copy link
Contributor

inmzhang commented May 7, 2024

Sorry for taking such a long time. I have done most of the work except for the anticommute grouping and several edge cases. Hopefully I'll complete the remaining stuff and start iterating on the design in this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issue pertaining to the Python backend (tqec package) enhancement New feature or request, may not be in the task flow help wanted Extra attention is needed QOL Improves usability and functionality
Projects
None yet
Development

No branches or pull requests

3 participants