Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fc53848
Add probabilistic error cancellation with shaded lightcones tutorial
henryzou50 Jun 4, 2026
20d2cac
Update PEC with shaded lightcones tutorial with rerun results
henryzou50 Jun 5, 2026
d3ce799
Rerun PEC+SLC tutorial on ibm_fez and harden learning-depth selection
henryzou50 Jun 22, 2026
e74bfe8
Recompute noise-learning depth from ISA 2q depth
henryzou50 Jun 24, 2026
695c0d7
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
3569fb9
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
743c238
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
938c8f5
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
d693794
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
317009a
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
8d4ee0a
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
2999e59
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
81e38b3
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
51b4486
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
b92bf70
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
779592d
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
67d083c
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
4692921
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
d19ff9c
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
43a9baa
Update docs/tutorials/pec-with-shaded-lightcones.ipynb
henryzou50 Jun 26, 2026
1fde7c6
Notes markdown revision
henryzou50 Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/tutorials/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@
"title": "Combine error mitigation options with the Estimator primitive",
"url": "/docs/tutorials/combine-error-mitigation-techniques"
},
{
"title": "Probabilistic error cancellation with shaded lightcones",
"url": "/docs/tutorials/pec-with-shaded-lightcones"
},
{
"title": "Real-time benchmarking for qubit selection",
"url": "/docs/tutorials/real-time-benchmarking-for-qubit-selection"
Expand Down
2 changes: 2 additions & 0 deletions docs/tutorials/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ Error mitigation addresses the challenge of noise without full fault tolerance b

* [Combine error mitigation options with the Estimator primitive](/docs/tutorials/combine-error-mitigation-techniques)

* [Probabilistic error cancellation with shaded lightcones](/docs/tutorials/pec-with-shaded-lightcones)

* [Real-time benchmarking for qubit selection](/docs/tutorials/real-time-benchmarking-for-qubit-selection)


Expand Down
1,805 changes: 1,805 additions & 0 deletions docs/tutorials/pec-with-shaded-lightcones.ipynb

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

trade a bounded residual bias for lower sampling overhead

Technically speaking, it is possible to retain a zero-bias estimate and still reduce the sampling overhead (geometric lightcone). But it is true that the shading is what allows you a further trading. Might be worth pointing out though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that this gets mentioned further down, but am wondering if this single line needs some adjusting. Up to you

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How to learn layer noise with NoiseLearnerV3 and inject anti-noise through samplomatic and the Executor primitive

I suggest typesetting Executor as code to be consistent with the typesetting of NLv3 and samplomatic

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that upper-bounds the susceptibility of the observable to that error.

Very much a nit-pick, but: we are bouding the susceptibility of the observable's expectation value to that error. In the backward bounds case, that also depends on the chosen initial state of the circuit (all-zero in typical workflows and sufficient for the purposes of this tutorial).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the case of our mirrored Ising circuit

I find it a bit odd, that the first time this gets mentioned is during the Post-processing overview. The phrasing suggests that this has already been established before but it has not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pip install 'qiskit-addon-utils'

Nit-pick: this is the only dependency that is typeset with surrounding quotes although that is not strictly necessary

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

namely, we should measure an observable of 1

Similar nit-pick as before: the phrasing is misleading since not the observable is 1, but its expectation value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Because we run a mirror circuit, for every gate in the second half of the circuit there is an inverse gate in the first half. As the measured observable
has non-Z-basis measurements, and Executor accounts for the desired basis at the end of the circuit, we provide a prepare_basis function that inserts the appropriate gates at the start of the mirror circuit. This detail is specific to our mirror-circuit demonstration. We use the get_measurement_bases function to identify which gates are needed and where to append them, while keeping track of qubit-index subtleties arising from box annotation conventions, as discussed in the section on preparing canonical basis measurements.

I think this whole paragraph can be improved. We motivate that the mirror circuit is what gives us the known exp val of 1, but truly that depends on the observable. This paragraph is trying to argue that the mirror circuit requires us to insert the prepare_basis gates for the observable, but in reality we require that because we want the exp val to be 1 for this particular combination of observable and mirror circuit.

All that is to say: I feel like the argument in this paragraph is a bit reversed. Can this be rewritten somewhat to more clearly motivate this:

  1. we choose to perform time evolution under Ising
  2. we want an observable which has one X and one Z component (because this is nice for highlighting the SLC bounds on different errors)
  3. we want a known exp val of 1
  4. that requires us to prepend some gates to the circuit to ensure that XZ gets measured in the +1 eigenstate at the end of the mirror circuit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code blocks In[3] - In[9] can probably cleaned up somewhat.

  • we should comment on free parameters (like num-trotter_steps and rx_angle)
  • we can remove unused code paths from the functions defined in In[7] to make this less "daunting"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

backend = service.least_busy(operational=True, simulator=False)

The intro claims to run on a Heron device, but this does not get enforced. Is this of concern to you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we hand-select our qubits based on evaluation of the highest quality chain.

This is unlikely to be accurate given that the backend gets fetched based on least_busy as well as this hand-picked set being outdated quickly. I would remove this from the notebook since it sets a false precedent for users.

Instead, we should comment on the importance of layouting and suggest hand-picking (ideally point to a resource/tutorial where users can learn on how to run some quick experiments to inform their selection) but for the purposes of this tutorial it is probably best to rely on the Qiskit transpiler to select a layout, given the chosen backend's coupling map and current calibration data.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

alt="Output of the previous code cell"

These meta-texts for the images are probably useless. Is there no way of adjusting these?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For In[14] (the boxes_pm setup) it is important to know, that SLC currently assumes that the InjectNoise annotations use site="after": Qiskit/qiskit-addon-slc#33

Also be aware of samplomatic's default value changing for this: Qiskit/samplomatic#372

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

*before*

I think this is unintentional formatting in the Workflow for lightcone shading... section

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Predict to-be-learned noise-model Paulis

Is the explanation of generate_noise_model_paulis really clear? To me it makes sense, but I have gotten feedback offline that this can be fairly confusing for someone new to the concept of noise learning. Would be good to get a sanity check on this section being clear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

slc_atol = 1e-8
slc_eigval_max_qubits = 18
slc_evolution_max_terms = 1000
slc_num_processes = 8
slc_timeout = 60

I think it is improtant that these settings be explained in more detail.

Also:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

which tracks how the observable spreads backward through the circuit and uses that spread to place upper bounds on the effect of each noise operator

I think it may be useful to be more concrete and refer to the bound exploiting the limited speed at which information can spread.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can further tighten the bounds by accounting for lightcone limitation. In principle, this gives us a smoother transition from the computed bounds to the trivial bounds set forth after the timeout was reached. Here, the effect is not as visible because the lightcones have already reached the edge of the circuit.

This feels a bit redundant to the previous paragraph.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The point to switch from forward to backward bounds depends on the learned noise rates.

Yes, but at this point our noise_model_rates are initialized to None which assumes even rates and is meant just as a preview. This should be clarified.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions qiskit_bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ notifications:
"docs/tutorials/combine-error-mitigation-techniques":
- "`@nathanearnestnoble`"
- "`@ibrahim-shehzad`"
"docs/tutorials/pec-with-shaded-lightcones":
- "@henryzou50"
"docs/tutorials/nishimori-phase-transition":
- "`@nathanearnestnoble`"
- "@kevinsung"
Expand Down
1 change: 1 addition & 0 deletions scripts/config/notebook-testing.toml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ notebooks = [
"docs/tutorials/wire-cutting.ipynb",
"docs/tutorials/krylov-quantum-diagonalization.ipynb",
"docs/tutorials/probabilistic-error-amplification.ipynb",
"docs/tutorials/pec-with-shaded-lightcones.ipynb",
"docs/tutorials/sample-based-quantum-diagonalization.ipynb",
"docs/tutorials/pauli-correlation-encoding-for-qaoa.ipynb",
"docs/tutorials/nishimori-phase-transition.ipynb",
Expand Down
Loading