microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
samples/qre/README.md
44lines · modecode
| 1 | # Quantum Resource Estimation Samples |
| 2 | |
| 3 | This directory contains a series of Jupyter notebooks that teach you how to use |
| 4 | the **Quantum Resource Estimator (QRE)** from the `qdk[qre]` Python package. The |
| 5 | estimator takes a quantum program and a hardware model and returns |
| 6 | Pareto-optimal configurations that trade off physical qubit count against |
| 7 | runtime within a given error budget. |
| 8 | |
| 9 | ## Who is this for? |
| 10 | |
| 11 | These notebooks are aimed at quantum software engineers and researchers who want |
| 12 | to: |
| 13 | |
| 14 | - Understand the physical cost of running a quantum algorithm on various architectural assumptions. |
| 15 | - Compare resource requirements across different error-correction codes, |
| 16 | magic-state factories, and hardware assumptions. |
| 17 | - Build custom hardware and protocol models and plug them into the estimator. |
| 18 | |
| 19 | Familiarity with basic quantum computing concepts (qubits, gates, error |
| 20 | correction) is helpful but not required; each notebook is self-contained and |
| 21 | introduces the relevant ideas as it goes. |
| 22 | |
| 23 | ## Suggested reading order |
| 24 | |
| 25 | | # | Notebook | What you will learn | |
| 26 | |---|----------|---------------------| |
| 27 | | 0 | [Getting Started](0_getting_started.ipynb) | End-to-end workflow: define a Q# application, choose a target architecture, run the estimator, inspect the Pareto frontier, and compare runs across different error rates. | |
| 28 | | 1 | [Importing Quantum Programs](1_qre_input.ipynb) | How to import programs from Q#, Cirq, QIR, and OpenQASM, and how to build a custom `Application` subclass with trace parameters that QRE explores automatically. | |
| 29 | | 2 | [Analysing Results](2_analysing_results.ipynb) | Deep dive into the estimation output: statistics, result properties, the instruction source graph, magic-state factories, custom table columns, and Pareto-frontier plots. | |
| 30 | | 3 | [Building Your Own Models](3_building_your_own_models.ipynb) | How to write custom `Architecture`, QEC, and factory models to explore hypothetical hardware, and how to compose them with built-in models. | |
| 31 | |
| 32 | Start with notebook 0 to learn the core concepts and API. Notebooks 1 and 2 |
| 33 | can be read in either order depending on whether you need to bring in programs |
| 34 | from other frameworks first or want to understand the output in more detail. |
| 35 | Notebook 3 is the most advanced and assumes familiarity with the material in the |
| 36 | earlier notebooks. |
| 37 | |
| 38 | ## Prerequisites |
| 39 | |
| 40 | Install the `qdk` Python package with the `qre` extras: |
| 41 | |
| 42 | ```bash |
| 43 | pip install qdk[qre] |
| 44 | ``` |
| 45 | |