Free AI web copilot to create summaries, insights and extended knowledge, download it at here
3054
Abstract
mory to enable parametric compilation in QCS, which allows users to run all program variations with only one pass through the compiler, providing input parameters at run-time rather than compile-time. In the following notebook, we walk through how to define, compile, and rapidly execute parametric Quil programs on the QPU.</p>
<figure id="a3b9">
<div>
<div>
<iframe class="gist-iframe" src="/gist/karalekas/e6546ea3bcbb36dc7a2efd53497ee1a2.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure><h1 id="6b7c">Active qubit reset</h1><p id="be8b">At the beginning of each quantum computation, all qubits must be returned to some state |0⟩, which is typically the ground state. This reset typically happens passively, by waiting for the qubits to “relax” to |0⟩ over some period of time. As <a href="https://readmedium.com/better-quantum-chips-52c4dfe4ce64">qubit quality improves</a>, however, relaxation takes longer and this method becomes increasingly slow. For web API access models, the relaxation time is negligible compared with the overhead of sending quantum programs over the internet. But because we’ve eliminated this network latency with QCS, suddenly relaxation becomes the largest contributor to round-trip execution time. To drive down this time, we have implemented an active qubit reset protocol, which allows users to quickly set all qubits to the |0⟩ state at the end of a computation.</p><figure id="0625"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*MUqnRUfPlkEvnw9eckC18Q.png"><figcaption>Total execution time for 1000 shots of a small parametric program</figcaption></figure><p id="0075">Active reset decreases the delay between running successive programs on the QPU by an order of magnitude, and is a major contributor to the low-latency hybrid execution that is available in QCS. Additionally, because it is implemented by running programs that depend on the outcome of single-qubit measurements, active qubit reset is a stepping stone along the path toward arbitrary control flow and eventually quantum error correction. In the following notebook, we demonstrate how this feature can speed up your quantum programs, without having a material effect on overall performance.</p>
<figure id="699b">
<div>
<div>
<iframe class="gist-iframe" src="/gist/karalekas/123d2bef774881bfed6ebb13f8181a17.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure><h1 id="cba0">Max-Cut QAOA</h1><p id="f3be">Now that we have worked through some of the features available in QCS, we will tie them all together with a real-world example. One popular algorithm for near-term (<a href="https://arxiv.org/abs/1801.00862">NISQ</a>) devices is <a href="https://arxiv.org/abs/1411.
Options
4028">QAOA</a>, the quantum approximate optimization algorithm. QAOA works by alternating between two parameterized unitaries — one that encodes the problem trying to be solved and another that explores the space of potential solutions. It can be used for finding approximate solutions to combinatorial optimization problems (COPs), which often do not have an efficient classical solution, meaning that they quickly become intractable as the problem size grows. COPs are one area some believe will be the first to allow for the demonstration of quantum advantage.</p><figure id="ab8d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*HPaFqoXwCLWn48ePBURAVg.png"><figcaption>Max-Cut QAOA landscapes for three qubits on the QPU and QVM</figcaption></figure><p id="5e5d">Famous combinatorial optimization problems include the <a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem">Traveling Salesman</a> (TSP) and the <a href="https://en.wikipedia.org/wiki/Maximum_cut">Maximum Cut</a> (Max-Cut) problems. In Max-Cut, the goal is to find a partitioning of a graph that has the largest possible cut, which is the number of edges that separate the two partitions of the graph. Some familiar machine learning problems can also be formulated as a COP. For example, <a href="https://arxiv.org/abs/1712.05771">clustering</a> can be reduced to a weighted Max-Cut problem. The weighted Max-Cut problem is a small variant of Max-Cut, generalized for weighted graphs. In the following notebook we walk through how to run QAOA for weighted Max-Cut using the grid search optimizer, and show that the results from our <a href="https://www.rigetti.com/qpu">Aspen QPU</a> match the expected results from the QVM.</p>
<figure id="8486">
<div>
<div>
<iframe class="gist-iframe" src="/gist/karalekas/c63b0bb24f15109f1921cea5966ca518.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure><p id="81a9">By tightly integrating our classical and quantum resources and removing the need for recompiling or waiting for qubits to relax, QCS provides more than an order of magnitude speedup over web API models. Together, colocation, parametric compilation, and active qubit reset allow for rapid iteration in hybrid quantum-classical programs. For example, the above Max-Cut QAOA problem runs in less than a minute on QCS, compared to more than 25 minutes when using a web API. These improvements make Quantum Cloud Services the fastest and easiest platform for building quantum applications on near-term quantum hardware.</p><p id="e27e"><i>Peter Karalekas and Nikolas Tezak are Quantum Software Engineers at Rigetti Computing. This work represents a full-stack collaboration between the Software, Hardware, and Quantum Engineering teams at Rigetti.</i></p><p id="c6f3"><i>All of the Jupyter notebooks shared in this post come pre-loaded on every QMI.</i></p></article></body>