Skip to content

Add "Automated spacetime Pauli checks with qiskit-paulice" tutorial#5312

Open
henryzou50 wants to merge 7 commits into
mainfrom
error-detection
Open

Add "Automated spacetime Pauli checks with qiskit-paulice" tutorial#5312
henryzou50 wants to merge 7 commits into
mainfrom
error-detection

Conversation

@henryzou50

Copy link
Copy Markdown
Collaborator

Summary

Adds a new Error detection tutorial that uses the qiskit-paulice package to
automatically find and insert spacetime Pauli checks into Clifford circuits, then boosts the fidelity of a sampled distribution by postselecting on the check syndromes.

It started as the simulation-only guide in the qiskit-paulice repo (https://github.com/Qiskit/qiskit-paulice/blob/main/docs/guides/low_overhead_error_detection_using_spacetime_codes.ipynb) and has been reworked into a full tutorial: restructured to the tutorial template, rewritten in the IBM style (second person, active voice, no em dashes), and extended with a real-hardware section.

Relationship to the existing spacetime-codes tutorial

This sits alongside the existing ghz-spacetime-codes tutorial ("Low-overhead error detection with spacetime codes") rather than replacing it:

  • ghz-spacetime-codes is the conceptual intro, which builds a coherent Pauli
    check by hand, understand phase kickback, prepare a GHZ state.
  • This new tutorial is the production counterpart, which automates check discovery (add_pauli_checks), noise-model scoring, and Clifford-sampling fidelity boost via postselection.

The two are cross-linked in both directions (Prerequisites/Next steps here, and a forward link added to the GHZ tutorial's Next steps).

Changes

  • docs/tutorials/automated-spacetime-pauli-checks.ipynb - new tutorial
  • docs/tutorials/_toc.json, docs/tutorials/index.mdx - register under Error detection (marked isNew)
  • qiskit_bot.yaml - add owner
  • scripts/config/notebook-testing.toml - exclude from notebook test runs
  • docs/tutorials/ghz-spacetime-codes.ipynb - forward cross-link in Next steps
  • public/docs/images/tutorials/automated-spacetime-pauli-checks/ - extracted plot outputs

Notes

The first run was executed on ibm_marrakesh (Heron r2) and the postselection results are weaker than expected. The hardcoded qubit layout ([68, 69, 78, …]) is hand-picked for ibm_boston (Heron r3) connectivity, so it does not map cleanly onto marrakesh.

Before merge, I will need to rerun on ibm_boston to Investigate and fix the poor results, and then see how I can improve this for other backends.

Add a new Error detection tutorial that uses the qiskit-paulice package to
automatically find and insert spacetime Pauli checks into Clifford circuits,
then boosts sampled-distribution fidelity by postselecting on check syndromes.
It conforms to the tutorial template (Learning outcomes, Prerequisites,
Background, Requirements, Setup, small-scale simulator example with Steps 1-4,
large-scale hardware example, Next steps, References) and is framed as an
extension of the existing ghz-spacetime-codes tutorial, with bidirectional
cross-links between the two.

Changes:
- docs/tutorials/automated-spacetime-pauli-checks.ipynb: new tutorial
- docs/tutorials/_toc.json, docs/tutorials/index.mdx: register under
  "Error detection" (marked isNew)
- qiskit_bot.yaml: add owner
- scripts/config/notebook-testing.toml: exclude from notebook test runs
- docs/tutorials/ghz-spacetime-codes.ipynb: add forward cross-link in
  Next steps
- public/docs/images/tutorials/automated-spacetime-pauli-checks/: extracted
  plot outputs

Note: this run was executed on ibm_marrakesh (Heron r2) and the postselection
results are weaker than expected. The qubit layout is hand-picked for
ibm_boston (Heron r3) connectivity, so the tutorial needs to be rerun on
ibm_boston (or another suitable backend) to investigate the poor results and
finalize the outputs, commentary, and usage estimate.
@henryzou50 henryzou50 self-assigned this Jun 29, 2026
@henryzou50 henryzou50 requested a review from a team June 29, 2026 17:34
@qiskit-bot

Copy link
Copy Markdown
Contributor

One or more of the following people are relevant to this code:

  • @MeltemTolunay
  • @nathanearnestnoble

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@henryzou50

Copy link
Copy Markdown
Collaborator Author

Note to self, will update this to replace old tutorial instead of adding a new one.

Rework the "Low-overhead error detection with spacetime codes" tutorial
(docs/tutorials/ghz-spacetime-codes.ipynb) in place rather than adding a
separate notebook. The tutorial now uses the qiskit-paulice package to
automatically find and insert spacetime Pauli checks into Clifford circuits
and boosts sampled-distribution fidelity by postselecting on check syndromes,
replacing the previous hand-built-check / GHZ-preparation content. The title
and URL (/docs/tutorials/ghz-spacetime-codes) are unchanged.

- docs/tutorials/ghz-spacetime-codes.ipynb: new qiskit-paulice content,
  conforming to the tutorial template (Learning outcomes, Prerequisites,
  Background, Requirements, Setup, small-scale simulator example with
  Steps 1-4, large-scale hardware example, Next steps, References)
- docs/tutorials/automated-spacetime-pauli-checks.ipynb: removed (the
  short-lived separate notebook); its extracted images moved to the
  ghz-spacetime-codes image folder
- public/docs/images/tutorials/error-detection: removed (old GHZ outputs)
- docs/tutorials/_toc.json, docs/tutorials/index.mdx: drop the extra entry;
  mark the refreshed tutorial isNew
- qiskit_bot.yaml: add @henryzou50 as an owner of ghz-spacetime-codes
- scripts/config/notebook-testing.toml: drop the extra exclusion entry

The committed outputs are from a run on ibm_marrakesh, where the hardcoded
ibm_boston layout maps onto bad edges and produces an unrealistic noise model
(~19% gate noise). This breaks the demonstration: postselection does not
improve fidelity and the postselection rate collapses to under 1%. Rerun on
ibm_boston (or another Heron r3 backend) to restore a sane noise model and
regenerate the outputs, then reconcile the prose (currently "Heron r3 QPU
ibm_boston") and the usage estimate with the backend actually used.
beckykd
beckykd previously approved these changes Jul 1, 2026

@beckykd beckykd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work!

Comment thread docs/tutorials/ghz-spacetime-codes.ipynb Outdated
Comment thread docs/tutorials/ghz-spacetime-codes.ipynb Outdated
Comment thread docs/tutorials/ghz-spacetime-codes.ipynb Outdated
Comment thread docs/tutorials/ghz-spacetime-codes.ipynb Outdated
Comment thread docs/tutorials/ghz-spacetime-codes.ipynb Outdated
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
henryzou50 and others added 2 commits July 1, 2026 17:11
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
henryzou50 and others added 2 commits July 1, 2026 17:12
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
@henryzou50

Copy link
Copy Markdown
Collaborator Author

Thanks @beckykd for the review and suggestions! One note before this is fully ready, I am still currently waiting on the job results for ibm_boston, which should improve the results significantly.

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants