Skip to content

Commit

Permalink
docs(notebook): format to follow Qiskit Patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
haimeng-zhang committed Mar 30, 2024
1 parent 11d4341 commit ce9984e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions docs/notebooks/pulse_efficient_transpilation_qsim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
"In this notebook, we show readers how to transpile circuits in a pulse-efficient way by transpiling the two-qubit gates into the [`RZXGate`](https://qiskit.org/documentation/stubs/qiskit.circuit.library.RZXGate.html). The 'RZXGate' is a continuous gate set native to the hardware. We show examples where this method results in shorter circuit depth and duration. Since qubits have a limited coherence time, a shorter total circuit duration is desirable. We demonstrate how to implement this technique to transpile a relevant circuit in simulating quantum dynamics. And the Runtime result from the hardware suggests that the `RZXGate` type of transpilation produces more accurate results."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Start"
]
},
{
"cell_type": "code",
"execution_count": 56,
Expand Down Expand Up @@ -74,7 +67,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Build\n",
"When running a generic quantum circuit on the hardware, the circuits need to be transpired into a basic set of gates so that it is compatible with a target backend. This process is handled by the [`qiskit.transpiler`](https://qiskit.org/documentation/apidoc/transpiler.html), and in the how-to guide, we will introduce two ways of defining the basis gate set."
]
},
Expand Down Expand Up @@ -107,8 +99,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example: Ising model\n",
"\n",
"# Qiskit Patterns Step 1: build trotterized evolution \n",
"Let's start by looking at a simple example circuit on two qubits. The circuit example we use here simulates the dynamics generated by the Hamiltonian $H = - J \\sum_{i,j}Z_i\\otimes Z_j + h\\sum_{i}X_i$. To approximate the dynamics, we implement its trotterized evolution using [`PauliEvolutionGate`](https://qiskit.org/documentation/stubs/qiskit.circuit.library.PauliEvolutionGate.html) pametrized by $J$, $h$ and the trotterized time step $t$."
]
},
Expand Down Expand Up @@ -156,7 +147,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Transpile"
"# Qiskit Patterns Step 2: Transpile"
]
},
{
Expand Down Expand Up @@ -579,7 +570,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Run"
"# Qiskit Patterns Step 3: execute"
]
},
{
Expand Down Expand Up @@ -630,6 +621,13 @@
" ecr_job_zz = estimator.run([(ecr_circ, ecr_obs)])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Qiskit Patterns Step 4: compare results"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit ce9984e

Please sign in to comment.