[docs](notebooks) Review / update pulse efficient transpilation tutorial#46
[docs](notebooks) Review / update pulse efficient transpilation tutorial#46beckykd wants to merge 19 commits intoqiskit-community:mainfrom
Conversation
|
Started some initial editing for consistency with other tutorials and added some questions / comments in-text |
There was a problem hiding this comment.
Hi @beckykd, thank you for the edits. Please find my response to your comments below.
-
Can we add some background? What is a pulse circuit? Why/when would you want to do this?
For the first question, I do not think the term 'pulse circuit' is explicitly used in the notebook, so I wrote a paragraph to explain what a pulse gate is instead)
What is a pulse gate? A quantum gate is an abstraction for the operation applied to qubits. In superconducting qubit architecture, its physical implementation typically involves applying microwave pulses - these are electromagnetic waves at specific frequencies with certain amplitudes and durations, to interact with qubits and control the qubit states. Those microwave pulses are pre-calibrated to implement a desired operation and serve as one of the standard native gates. Using theOpenPulsefeature, the pulse-level control is exposed to users so they can use pulse gates - gates that are specified by pulse schedules.
Why/When would you want to do this:
Pulse gates provide more flexibility in defining and fine-tuning qubit operations and could potentially be used to construct gates that have higher fidelities. In this notebook, we show that it is particularly true when translating circuits for quantum simulation with small trotterization time steps. -
Can we add some more explanation? Is it obvious to those who know what pulse gates are why this would serve as a native gate set?
The 'RZXGate' with an arbitrary rotation angle$\theta$ is implemented by turning on the two-qubit$Z\otimes X$ interaction by applying echoed cross-resonance pulses with varying duration, hence serving as a continuous gate set. It is a gate that is native to the hardware because its implementation does not require any further decomposition - it is implemented by directly specifying the pulse-level instruction schedule of the gate. -
is this a different technique, or the same technique described above?
It is the same technique as described above. -
the current implementation of what? The way it's implemented in this notebook?
Yes, the way it is implemented in this notebook. -
...KAK decomposition. can we link to a source?
An Introduction to Cartan's KAK Decomposition for QC Programmers -
Some code seems to be missing
The code that is missing is
from qiskit.visualization import plot_circuit_layout
plot_circuit_layout(cx_circ, backend, view='physical')
I deleted it since I was having some issue with plotting with graphviz within the virtual environment. You could either add this code back and display the circuit layout or choose to delete the paragraph "The transpiled circuit's layout information is stored, and we can visualize it by calling plot_circuit_layout. Below, we see our original circuit qc on a 1D spin chain is mapped to the backend, and the physical qubits used are marked in black."
-
Is 21 qubits big enough to show utility?
The largest example I have run so far is twenty-one qubits. If this notebook is valuable to our users and they would like to adopt it for their utility-scale work, we can consider prioritizing rerunning it on larger systems. -
Finally, a small typo in line 128: Cecompose -> Decompose
Thanks for all that information - it's very helpful ! In the above code, it complains that cx_circ isn't defined. I'll try to find it in your old PRs -- I replaced it with "ecr_circ" |
I couldn't get the plot to work because graphviz library is required and installing it on Windows seems to be quite a process. Since it was already removed previously, I think it's OK to remove for now. I'll investigate installing it later. :) |
haimeng-zhang
left a comment
There was a problem hiding this comment.
Hi @beckykd, thank you for another round of edits! I think the tutorial reads a lot clearer! My main concern is regarding the final output of the notebook from the hardware run since it does not clearly show the advantage of this pulse-efficient method. I suggest we double-check if we have done the transpilation correctly, and if we have picked the right circuit parameters - let's rerun the notebook and see if we can show, similar to the older version of the notebook, that the RZX method produces an expectation value closer to the exact compared with the standard ECR method.
Add QPU usage etc
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Pull Request Test Coverage Report for Build 9274940166Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
javabster
left a comment
There was a problem hiding this comment.
This is looking nice! left a few comments
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "The pulse-efficient transpilation has been shown to give more accurate results in the quantum approximate optimization algorithm applied to MAXCUT (see reference [here](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.043088)). This notebook demonstrate how to implement the described technique to transpile a relevant circuit in simulating quantum dynamics. The result from the hardware suggests that the `RZXGate` type of transpilation produces more accurate results." |
There was a problem hiding this comment.
| "The pulse-efficient transpilation has been shown to give more accurate results in the quantum approximate optimization algorithm applied to MAXCUT (see reference [here](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.043088)). This notebook demonstrate how to implement the described technique to transpile a relevant circuit in simulating quantum dynamics. The result from the hardware suggests that the `RZXGate` type of transpilation produces more accurate results." | |
| "The pulse-efficient transpilation has been shown to give more accurate results in the quantum approximate optimization algorithm applied to MAXCUT (see reference [here](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.043088)). This tutorial demonstrates how to implement the described technique to transpile a relevant circuit in simulating quantum dynamics. The result from the hardware suggests that the `RZXGate` type of transpilation produces more accurate results." |
In general could we use the term "tutorial" for consistency. For people just reading this tutorial in the website it might not be clear that this is a jupyter notebook.
There was a problem hiding this comment.
Also in this section, is there any way we can mention more explicitly how this is useful for utility scale work?
| "\n", | ||
| "### A larger example\n", | ||
| "Let's extend our example to a 1D spin chain of $N=21$ qubits. We follow the same steps to transpile into a basis gate set that includes either an `ecr` or a `rzx` gate. This is what the trotterized evolution circuit looks like." | ||
| "\n", | ||
| "Extend the example to a one-dimensional spin chain of $N=21$ qubits. Follow the previously described steps to transpile into a basis gate set that includes either an `ECR` or an `RZX` gate. This is what the Trotterized evolution circuit looks like:" |
There was a problem hiding this comment.
is there any way to increase N even more? or is 21 the limit?
Updating this tutorial for publication readiness.
FYI @pedrorrivero and @haimeng-zhang