Skip to content

Update transpilation optimizations with SABRE tutorial to new template#4970

Open
henryzou50 wants to merge 2 commits intoQiskit:mainfrom
henryzou50:update-tows
Open

Update transpilation optimizations with SABRE tutorial to new template#4970
henryzou50 wants to merge 2 commits intoQiskit:mainfrom
henryzou50:update-tows

Conversation

@henryzou50
Copy link
Copy Markdown
Collaborator

Summary

Revised transpilation-optimizations-with-sabre.ipynb to follow the Tutorial_Template structure, splitting the tutorial into a small-scale simulator walkthrough and a large-scale hardware comparison of SABRE routing heuristics.

Key changes from the old notebook:

  • Removed Qiskit Serverless dependency: The old notebook relied on qiskit_serverless and qiskit-ibm-catalog for Part II. The revised version runs everything locally using standard Qiskit transpiler APIs
  • Split into simulator + hardware sections: Replaced the old Part I (110-qubit SABRE parameter tuning) and Part II (serverless heuristic comparison) with a small-scale simulator example (15 qubits, Qiskit Aer) and a large-scale hardware example comparing routing heuristics on real hardware
  • Added noisy simulator validation: The small-scale section uses qiskit_aer with a real backend noise model to measure execution fidelity across three SabreLayout configurations, demonstrating how parameter tuning affects actual expectation values
  • Added SABRE heuristic comparison: The large-scale section compares basic, decay, and lookahead routing heuristics on real hardware, replacing the old serverless-based approach
  • Improved visualizations: Bar charts with percentage-improvement annotations, grouped comparisons, and cleaner layout replacing the old 3x1 stacked subplots
  • Streamlined code: Consolidated separate transpile/measure/print cells into loop-based patterns, reducing code duplication
  • Updated dependencies: Bumped to Qiskit SDK v2.0+, added Qiskit Aer dependency, switched backend from ibm_boston to least_busy()
  • Template compliance: Added learning outcomes, prerequisites, structured background, and next steps sections following the standard tutorial template

Tutorial structure:

  • Small-scale simulator example (15 qubits): Configure SabreLayout parameters (layout_trials, swap_trials, max_iterations), transpile a star-topology GHZ circuit, and validate fidelity improvements with an Aer noise model
  • Large-scale hardware example: Compare SABRE routing heuristics (basic, decay, lookahead) at scale on real hardware with execution and analysis

Restructure the tutorial to match the standard template format with
learning outcomes, prerequisites, and the four-step Qiskit patterns
workflow. Key changes:

- Remove qiskit_serverless content (runtime performance issues, will
  revisit separately)
- Add small-scale simulator section using qiskit_aer with noise model
  from real backend, running 10 trials with error bars for statistical
  reliability
- Add large-scale hardware section comparing basic, decay, and
  lookahead SABRE heuristics across multiple seeds
- Improve plots with percentage annotations, value labels, and
  side-by-side fidelity bar charts
- Use consistent "2Q depth" labeling throughout
- Add analysis commentary connecting transpilation quality to execution
  fidelity
- Update requirements to Qiskit SDK v2.0+ and add qiskit-aer
- Add next steps with links to custom transpiler pass, transpiler
  plugins, and DAG representation guides
- Ran tox -e fix
@henryzou50 henryzou50 requested a review from a team April 10, 2026 09:31
@qiskit-bot
Copy link
Copy Markdown
Contributor

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

  • @henryzou50
  • @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

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.

2 participants