Skip to content

Clifford hierarchy demo#1723

Open
drdren wants to merge 56 commits intomasterfrom
dren-Clifford-hierarchy
Open

Clifford hierarchy demo#1723
drdren wants to merge 56 commits intomasterfrom
dren-Clifford-hierarchy

Conversation

@drdren
Copy link
Copy Markdown
Contributor

@drdren drdren commented Mar 16, 2026

Before submitting

Please complete the following checklist when submitting a PR:

  • Ensure that your tutorial executes correctly, and conforms to the
    guidelines specified in the README.

  • Remember to do a grammar check of the content you include.

  • All tutorials conform to
    PEP8 standards.
    To auto format files, simply pip install black, and then
    run black -l 100 path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Title:

Summary:

Relevant references:

Possible Drawbacks:

Related GitHub Issues:


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?

    Eg. Promote a new PL feature or show a PL implementation of a recent paper.

  • AUDIENCE — Who is this for?

    Eg. Chemistry researchers, PL educators, beginners in quantum computing.

  • KEYWORDS — What words should be included in the marketing post?

  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

@drdren drdren requested review from a team as code owners March 16, 2026 18:44
@github-actions
Copy link
Copy Markdown

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

Your preview is ready 🎉!

You can view your changes here

Deployed at: 2026-04-01 21:10:55 UTC

@drdren drdren requested a review from dwierichs March 25, 2026 17:29
Copy link
Copy Markdown
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work @drdren! It was really easy to follow and the scope, structure and flow really work out very nicely! 🎉
I had a serious of comments and questions, but nothing dramatic/major :)
I think the "largest" is that the semi-Clifford section could use some additional connectors to the remaining demo; 1) anticipate its usefulness for the question "Why T gates?" and 2) highlight that the cheaper teleportation circuit can be used for $T$ gates.


The `T gate <https://docs.pennylane.ai/en/stable/code/api/pennylane.T.html>`__ applies a :math:`45^{\circ}` rotation about the $Z$ axis. On the surface, this doesn’t seem too special. But with the additional of a non-Clifford gate, the `Solovay-Kitaev theorem <https://en.wikipedia.org/wiki/Solovay%E2%80%93Kitaev_theorem>`__ guarantees that any state can be reached by a finite sequence of gates, and the gate sequence can be found with the Solovay-Kitaev algorithm [#SK_alg]_ or gridsynth algorithms [#gridsynth]_. So, you can finally obtain, say, a :math:`1^{\circ}` rotation about the $Z$ axis to a :math:`10^{-2}` error with a sequence of $T$, $H$, and $S$ gates.

But to achieve fault-tolerant universal quantum computing, quantum states must be encoded with quantum error correction (QEC) codes. Many QEC codes such as the `CSS <https://pennylane.ai/qml/demos/tutorial_stabilizer_codes>`__, colour, surface, and qLDPC [link to Utkarsh's upcoming demo] codes have transversal (therefore fault-tolerant) implementations of Clifford gates. However, the `Eastin-Knill theorem <https://arxiv.org/pdf/0811.4262>`__ dictates that there can be no quantum error correction code that can implement both Clifford and non-Clifford gates transversally. Therefore, it appears that universal quantum computing is impossible to do with error correction.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having some background knowledge, I understand this paragraph. However, to a reader less familiar with the topic, it might not be clear at this point what transversality is, and whether/why it would be the only way to get fault tolerance.
Maybe you could spend one more sentence on introducing transversality, not on a technical level but in terms of its properties: they're simple realization of logic gates that do not propagate errors too quickly, so they are an easy way to get a fault-tolerant gate.

Connected to this:
Currently, with the little knowledge a reader might have, they might be confused by the strong premise

Therefore, it appears that universal quantum computing is impossible to do with error correction.

Following up on the above change, maybe the twist can be more like "what other way could there be to include non-Clifford gates if Eastin-Knill tells us it can't be transversal? -> If only there was some relationship..."

Copy link
Copy Markdown
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work @drdren! It was really easy to follow and the scope, structure and flow really work out very nicely! 🎉
I had a serious of comments and questions, but nothing dramatic/major :)
I think the "largest" is that the semi-Clifford section could use some additional connectors to the remaining demo; 1) anticipate its usefulness for the question "Why T gates?" and 2) highlight that the cheaper teleportation circuit can be used for $T$ gates.

drdren and others added 3 commits March 26, 2026 17:28
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
drdren and others added 10 commits March 26, 2026 18:16
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Copy link
Copy Markdown
Contributor Author

@drdren drdren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update based on David's comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants