|
109 | 109 | "id": "c3a31b4d-d679-4657-b372-ba19bcaf8eca",
|
110 | 110 | "metadata": {},
|
111 | 111 | "source": [
|
112 |
| - "# Part 1: Efficient SU2 Circuit\n", |
| 112 | + "## Part 1: Efficient SU2 Circuit\n", |
113 | 113 | "\n",
|
114 |
| - "## Step 1: Map classical inputs to a quantum problem\n", |
| 114 | + "### Step 1: Map classical inputs to a quantum problem\n", |
115 | 115 | "\n",
|
116 | 116 | "In this section, we explore the `efficient_su2` circuit, a hardware-efficient ansatz commonly used in variational quantum algorithms (such as VQE) and quantum machine-learning tasks. The circuit consists of alternating layers of single-qubit rotations and entangling gates arranged in a circular pattern, designed to explore the quantum state space effectively while maintaining manageable depth.\n",
|
117 | 117 | "\n",
|
|
153 | 153 | "id": "d6671456-9b17-42bb-b94a-d42a29e6fad9",
|
154 | 154 | "metadata": {},
|
155 | 155 | "source": [
|
156 |
| - "## Step 2: Optimize problem for quantum hardware execution\n", |
| 156 | + "### Step 2: Optimize problem for quantum hardware execution\n", |
157 | 157 | "\n",
|
158 | 158 | "This step is the main focus of the tutorial. Here, we aim to optimize quantum circuits for efficient execution on real quantum hardware. Our primary objective is to reduce circuit depth and gate count, which are key factors in improving execution fidelity and mitigating hardware noise.\n",
|
159 | 159 | "\n",
|
|
277 | 277 | "id": "a16c8082-d0f1-462f-ad10-ebd7d87a0d82",
|
278 | 278 | "metadata": {},
|
279 | 279 | "source": [
|
280 |
| - "### Transpile and capture metrics\n", |
| 280 | + "#### Transpile and capture metrics\n", |
281 | 281 | "\n",
|
282 | 282 | "To compare the performance of the compilation methods, we define a function that transpiles the input circuit and captures relevant metrics in a consistent manner. This includes the total circuit depth, overall gate count, and transpilation time.\n",
|
283 | 283 | "\n",
|
|
800 | 800 | "id": "167834f1-00a7-4190-99e4-d221d1952357",
|
801 | 801 | "metadata": {},
|
802 | 802 | "source": [
|
803 |
| - "### Results graph\n", |
| 803 | + "#### Results graph\n", |
804 | 804 | "\n",
|
805 | 805 | "As we define a function to consistently capture metrics, we will also define one to graph the metrics. Here, we will plot the two-qubit depth, gate count, and runtime for each compilation method across the circuits."
|
806 | 806 | ]
|
|
909 | 909 | "id": "f75e8e3a-803f-4386-a60a-b088faa3c81a",
|
910 | 910 | "metadata": {},
|
911 | 911 | "source": [
|
912 |
| - "### Analysis of SU2 circuit compilation results\n", |
| 912 | + "#### Analysis of SU2 circuit compilation results\n", |
913 | 913 | "\n",
|
914 | 914 | "In this experiment, we compare two transpilation methods — Qiskit's SABRE transpiler and the AI-powered transpiler — on a set of `efficient_su2` circuits. Since these circuits do not include any `PauliEvolutionGate` operations, the Rustiq plugin is not included in this comparison.\n",
|
915 | 915 | "\n",
|
|
928 | 928 | "id": "4c3b2aa8-8187-488a-8e5b-197cf26085bb",
|
929 | 929 | "metadata": {},
|
930 | 930 | "source": [
|
931 |
| - "# Part 2: Hamiltonian simulation circuit\n", |
| 931 | + "## Part 2: Hamiltonian simulation circuit\n", |
932 | 932 | "\n",
|
933 |
| - "## Step 1: Investigate circuits with `PauliEvolutionGate`\n", |
| 933 | + "### Step 1: Investigate circuits with `PauliEvolutionGate`\n", |
934 | 934 | "\n",
|
935 | 935 | "In this section, we investigate quantum circuits constructed using `PauliEvolutionGate`, which enables efficient simulation of Hamiltonians. We will analyze how different compilation methods optimize these circuits across various Hamiltonians.\n",
|
936 | 936 | "\n",
|
937 |
| - "### Hamiltonians used in the benchmark\n", |
| 937 | + "#### Hamiltonians used in the benchmark\n", |
938 | 938 | "\n",
|
939 | 939 | "The Hamiltonians used in this benchmark describe pairwise interactions between qubits, including terms such as $ZZ$, $XX$, and $YY$. These Hamiltonians are commonly used in quantum chemistry, condensed matter physics, and materials science, where they model systems of interacting particles.\n",
|
940 | 940 | "\n",
|
941 | 941 | "For reference, users can explore a broader set of Hamiltonians in this paper: [Efficient Hamiltonian Simulation on Noisy Quantum Devices](https://arxiv.org/pdf/2306.13126).\n",
|
942 | 942 | "\n",
|
943 |
| - "### Benchmark source: Hamlib and Benchpress\n", |
| 943 | + "#### Benchmark source: Hamlib and Benchpress\n", |
944 | 944 | "\n",
|
945 | 945 | "The circuits used in this benchmark are drawn from the [Hamlib benchmark repository](https://github.com/SRI-International/QC-App-Oriented-Benchmarks/tree/master/hamlib), which contains realistic Hamiltonian simulation workloads.\n",
|
946 | 946 | "\n",
|
|
1011 | 1011 | "id": "9690d94d-7d38-45d3-b37d-85eaf268dbd6",
|
1012 | 1012 | "metadata": {},
|
1013 | 1013 | "source": [
|
1014 |
| - "## Step 2: Optimize problem for quantum hardware execution\n", |
| 1014 | + "### Step 2: Optimize problem for quantum hardware execution\n", |
1015 | 1015 | "\n",
|
1016 | 1016 | "As in the previous example, we will use the same backend to ensure consistency in our comparisons. Since the pass managers (`pm_sabre`, `pm_ai`, and `pm_rustiq`) have already been initialized, we can directly proceed with transpiling the Hamiltonian circuits using each method.\n",
|
1017 | 1017 | "\n",
|
|
1535 | 1535 | "id": "e4f6aa23-d528-4d66-92e0-31d29c522792",
|
1536 | 1536 | "metadata": {},
|
1537 | 1537 | "source": [
|
1538 |
| - "### Analysis of Hamiltonian circuit compilation results\n", |
| 1538 | + "#### Analysis of Hamiltonian circuit compilation results\n", |
1539 | 1539 | "\n",
|
1540 | 1540 | "In this section, we evaluate the performance of three transpilation methods — SABRE, the AI-powered transpiler, and Rustiq — on quantum circuits constructed with `PauliEvolutionGate`, which are commonly used in Hamiltonian simulation tasks.\n",
|
1541 | 1541 | "\n",
|
|
1564 | 1564 | "id": "9a747477-1dc1-4706-b844-d29570fb5844",
|
1565 | 1565 | "metadata": {},
|
1566 | 1566 | "source": [
|
1567 |
| - "## Step 3: Execute using Qiskit primitives" |
| 1567 | + "### Step 3: Execute using Qiskit primitives" |
1568 | 1568 | ]
|
1569 | 1569 | },
|
1570 | 1570 | {
|
|
1580 | 1580 | "id": "bb4c4c67-a7e8-4ca1-a5d6-908a2e1d27e5",
|
1581 | 1581 | "metadata": {},
|
1582 | 1582 | "source": [
|
1583 |
| - "## Step 4: Post-process and return result in desired classical format" |
| 1583 | + "### Step 4: Post-process and return result in desired classical format" |
1584 | 1584 | ]
|
1585 | 1585 | },
|
1586 | 1586 | {
|
|
1597 | 1597 | "metadata": {},
|
1598 | 1598 | "source": [
|
1599 | 1599 | "## References\n",
|
| 1600 | + "\n", |
1600 | 1601 | "[1] \"LightSABRE: A Lightweight and Enhanced SABRE Algorithm\". H. Zou, M. Treinish, K. Hartman, A. Ivrii, J. Lishman et al. https://arxiv.org/abs/2409.08368\n",
|
1601 | 1602 | "\n",
|
1602 | 1603 | "[2] \"Practical and efficient quantum circuit synthesis and transpiling with Reinforcement Learning\". D. Kremer, V. Villar, H. Paik, I. Duran, I. Faro, J. Cruz-Benito et al. https://arxiv.org/abs/2405.13196\n",
|
|
0 commit comments