You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of shots for a kernel execution can be set through the ``shots_count``
273
+
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
274
+
set to 100.
275
+
276
+
.. code:: cpp
277
+
278
+
auto evolution_result = cudaq::evolve(cudaq::rydberg_hamiltonian(...), schedule, 1000);
279
+
280
+
To see a complete example for using Pasqal's backend, take a look at our :doc:`C++ examples <../../examples/hardware_providers>`.
228
281
229
-
To see a complete example for using Pasqal's backend, take a look at our :doc:`Python examples <../../examples/hardware_providers>`.
230
282
231
283
.. note::
232
284
@@ -261,47 +313,81 @@ Alternatively, users can set the following environment variables.
261
313
export AWS_SECRET_ACCESS_KEY="<access_key>"
262
314
export AWS_SESSION_TOKEN="<token>"
263
315
264
-
Submission from Python
316
+
About Aquila
265
317
`````````````````````````
266
318
267
-
The target to which quantum kernels are submitted
268
-
can be controlled with the ``cudaq::set_target()`` function.
269
-
270
-
.. code:: python
271
-
272
-
cudaq.set_target('quera')
273
-
274
-
By default, analog Hamiltonian will be submitted to the Aquila system.
275
-
276
319
Aquila is a "field programmable qubit array" operated as an analog
277
320
Hamiltonian simulator on a user-configurable architecture, executing
278
321
programmable coherent quantum dynamics on up to 256 neutral-atom qubits.
279
322
Refer to QuEra's `whitepaper <https://cdn.prod.website-files.com/643b94c382e84463a9e52264/648f5bf4d19795aaf36204f7_Whitepaper%20June%2023.pdf>`__ for details.
280
323
281
-
Due to the nature of the underlying hardware, this target only supports the
282
-
``evolve`` and ``evolve_async`` APIs.
283
-
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. Only
284
-
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).
324
+
Submitting
325
+
`````````````````````````
326
+
.. tab:: Python
327
+
328
+
The target to which quantum kernels are submitted
329
+
can be controlled with the ``cudaq::set_target()`` function.
330
+
331
+
.. code:: python
285
332
286
-
For example,
333
+
cudaq.set_target('quera')
287
334
288
-
.. code:: python
335
+
Due to the nature of the underlying hardware, this target only supports the
336
+
``evolve`` and ``evolve_async`` APIs.
337
+
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. Only
338
+
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).
Copy file name to clipboardexpand all lines: pr-2711/applications/python/adapt_qaoa.html
+1-1
Original file line number
Diff line number
Diff line change
@@ -790,7 +790,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
790
790
parameter</p>
791
791
<p>3- Optimize all parameters currently in the Ansatz <spanclass="math notranslate nohighlight">\(\beta_m, \gamma_m = 1, 2, ...k\)</span> such that <spanclass="math notranslate nohighlight">\(\braket{\psi (k)|H_C|\psi(k)}\)</span> is minimized, and return to the second step.</p>
792
792
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
<p>Suppose we have <spanclass="math notranslate nohighlight">\(f(x): \{0,1\} \longrightarrow \{0,1\}\)</span>. We can compute this function on a quantum computer using oracles which we treat as black box functions that yield the output with an appropriate sequence of logical gates.</p>
852
852
<p>Above you see an oracle represented as <spanclass="math notranslate nohighlight">\(U_f\)</span> which allows us to transform the state <spanclass="math notranslate nohighlight">\(\ket{x}\ket{y}\)</span> into:</p>
<h2>Deutsch’s Algorithm:<aclass="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading">¶</a></h2>
896
896
<p>Our aim is to find out if <spanclass="math notranslate nohighlight">\(f: \{0,1\} \longrightarrow \{0,1\}\)</span> is a constant or a balanced function? If constant, <spanclass="math notranslate nohighlight">\(f(0) = f(1)\)</span>, and if balanced, <spanclass="math notranslate nohighlight">\(f(0) \neq f(1)\)</span>.</p>
897
897
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
<h2>Quantum Probability Image Encoding (QPIE):<aclass="headerlink" href="#Quantum-Probability-Image-Encoding-(QPIE):" title="Permalink to this heading">¶</a></h2>
829
829
<p>Lets take as an example a classical 2x2 image (4 pixels). We can label each pixel with its position</p>
</div><p>Each pixel will have its own color intensity represented along with its position label as an 8-bit black and white color. To convert the pixel intensity to probability amplitudes of a quantum state</p>
Copy file name to clipboardexpand all lines: pr-2711/examples/python/performance_optimizations.html
+2-2
Original file line number
Diff line number
Diff line change
@@ -775,9 +775,9 @@ <h1>Optimizing Performance<a class="headerlink" href="#Optimizing-Performance" t
775
775
<sectionid="Gate-Fusion">
776
776
<h2>Gate Fusion<aclass="headerlink" href="#Gate-Fusion" title="Permalink to this heading">¶</a></h2>
777
777
<p>Gate fusion is an optimization technique where consecutive gates are combined into a single gate operation to improve the efficiency of the simulation (See figure below). By targeting the <codeclass="docutils literal notranslate"><spanclass="pre">nvidia-mgpu</span></code> backend and setting the <codeclass="docutils literal notranslate"><spanclass="pre">CUDAQ_MGPU_FUSE</span></code> environment variable, you can select the degree of fusion that takes place. A full command line example would look like <codeclass="docutils literal notranslate"><spanclass="pre">CUDAQ_MGPU_FUSE=4</span><spanclass="pre">python</span><spanclass="pre">c2h2VQE.py</span><spanclass="pre">--target</span><spanclass="pre">nvidia</span><spanclass="pre">--target-option</span><spanclass="pre">fp64,mgpu</span></code></p>
<p>The importance of gate fusion is system dependent, but can have a large influence on the performance of the simulation. See the example below for a 24 qubit VQE experiment where changing the fusion level resulted in significant performance boosts.</p>
0 commit comments