Skip to content

Commit

Permalink
Update Tutorial section names (#1241)
Browse files Browse the repository at this point in the history
* The transpilation tutorial has been updated to use the new runtime transpilation passes, and Batch

* Fix style checker

* Updated names

* Updated section names for transpiled tutorial

* Updated grover

* Fixed consistency

* Final updates

---------

Co-authored-by: Kevin Tian <[email protected]>
  • Loading branch information
pandasa123 and kt474 authored Dec 5, 2023
1 parent 6cb18d0 commit d0600cb
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 2,587 deletions.
15 changes: 4 additions & 11 deletions docs/tutorials/chsh_with_estimator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"id": "66d5e2e2",
"metadata": {},
"source": [
"## Map the problem to a quantum-native format"
"## Step 1: Map classical inputs to a quantum problem"
]
},
{
Expand Down Expand Up @@ -240,7 +240,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Optimize the circuits and operators\n",
"## Step 2: Optimize problem for quantum execution.\n",
"\n",
"For this example, the circuit and the operators are simple, so no optimizations are needed."
]
Expand All @@ -250,7 +250,7 @@
"id": "b7194399",
"metadata": {},
"source": [
"## Execute using a quantum primitive function\n",
"## Step 3: Execute using Qiskit Primitives.\n",
"\n",
"In order to execute the entire experiment in one call to the [`Estimator`](https://docs.quantum-computing.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.Estimator#estimator) we need to batch the circuit and operators together, repeating each for the requested `number_of_phases` points."
]
Expand Down Expand Up @@ -322,7 +322,7 @@
"id": "ace7dc90",
"metadata": {},
"source": [
"## Analyze the results\n",
"## Step 4: Post-process, return result in classical format.\n",
"\n",
"After running the circuits, we need to build the CHSH witness functions. We first build the quantities $\\langle AB \\rangle$, $\\langle Ab \\rangle$, $\\langle aB \\rangle$, and $\\langle ab \\rangle$, by looking at the parity of the outcomes for the four families of circuits we built (two measurement bases for each of the two qubits). Then we use those quantities to build the witness functions as defined previously."
]
Expand Down Expand Up @@ -447,13 +447,6 @@
"\n",
"qiskit.version.get_version_info()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/grover_with_sampler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"id": "d4845f4d",
"metadata": {},
"source": [
"## Map the problem to a quantum-native format\n",
"## Step 1: Map classical inputs to a quantum problem\n",
"\n",
"Grover's algorithm requires an [oracle](https://learning.quantum-computing.ibm.com/course/fundamentals-of-quantum-algorithms/grovers-algorithm) that specifies one or more marked computational basis states, where \"marked\" means a state with a phase of -1. A controlled-Z gate, or its multi-controlled generalization over $N$ qubits, marks the $2^{N}-1$ state (`'1'`*$N$ bit-string). Marking basis states with one or more `'0'` in the binary representation requires applying X-gates on the corresponding qubits before and after the controlled-Z gate; equivalent to having an open-control on that qubit. In the following code, we define an oracle that does just that, marking one or more input basis states defined through their bit-string representation. The `MCMT` gate is used to implement the multi-controlled Z-gate."
]
Expand Down Expand Up @@ -260,7 +260,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Optimize the circuits and operators\n",
"## Step 2: Optimize problem for quantum execution.\n",
"\n",
"For this example, the circuit the operators are simple, so no optimizations are needed."
]
Expand All @@ -271,7 +271,7 @@
"id": "c5edec73",
"metadata": {},
"source": [
"## Execute using a quantum primitive function\n",
"## Step 3: Execute using Qiskit Primitives.\n",
"\n",
"Amplitude amplification is a sampling problem that is suitable for execution with the [`Sampler`](https://docs.quantum-computing.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.Sampler#sampler) runtime primitive. Because we have a single circuit, we instantiate the [`Batch`](https://docs.quantum-computing.ibm.com/run/run-primitives-batch) context manager to run our non-iterative workload."
]
Expand All @@ -295,7 +295,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Analyze the results"
"## Step 4: Post-process, return result in classical format."
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/qaoa_with_primitives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Map the problem to a quantum-native format\n",
"## Step 1: Map classical inputs to a quantum problem\n",
"\n",
"To demonstrate max-cut, we'll create a graph using the [rustworkx library](https://github.com/Qiskit/rustworkx), and create Pauli Hamiltonian that encodes the cost in a manner such that the minimum expectation value of the operator corresponds to the maximum number of edges between the nodes in two different groups."
]
Expand Down Expand Up @@ -179,7 +179,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Optimize the circuits and operators\n",
"## Step 2: Optimize problem for quantum execution.\n",
"\n",
"We can schedule a series of [qiskit.transpiler](https://docs.quantum-computing.ibm.com/api/qiskit/transpiler) passes to optimize our circuit for a selected backend. This includes a few components:\n",
"\n",
Expand Down Expand Up @@ -273,7 +273,7 @@
"id": "b58c33dc",
"metadata": {},
"source": [
"## Execute using a quantum primitive function"
"## Step 3: Execute using Qiskit Primitives."
]
},
{
Expand Down Expand Up @@ -420,7 +420,7 @@
"id": "d162e690",
"metadata": {},
"source": [
"## Analyze the results"
"## Step 4: Post-process, return result in classical format."
]
},
{
Expand Down
Loading

0 comments on commit d0600cb

Please sign in to comment.