Skip to content

Commit 2cc1d81

Browse files
Docs preview for PR #3514.
1 parent 7ad6bde commit 2cc1d81

27 files changed

+392
-108
lines changed

pr-3514/_sources/using/backends/hardware/superconducting.rst.txt

Lines changed: 83 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -287,20 +287,19 @@ Quantum Circuits, Inc.
287287

288288
.. _qci-backend:
289289

290-
As part of its first phase of integration with CUDA-Q,
291-
`Quantum Circuits <https://quantumcircuits.com/>`__ offers users the ability to simulate CUDA-Q
292-
programs using its simulator, AquSim. AquSim is the first simulator that models error detection and
293-
real-time control of Quantum Circuits' Dual-Rail Cavity Qubit systems, and uses a Monte Carlo
294-
approach to do so on a shot-by-shot basis.
295-
296-
In this first phase, the supported features include all of the single and two-qubit gates offered by
297-
CUDA-Q, together with real-time conditional logic enabled by feed-forward capability. AquSim is
298-
currently wired to support ideal simulations only and noise models will be added in future
299-
iterations.
300-
301-
With C++ and Python programming supported, users are able to prototype, test and explore quantum
302-
applications in CUDA-Q in preparation for upcoming releases targeting Quantum Circuits QPUs.
303-
Examples are provided to get started.
290+
As part of the integration with CUDA-Q, `Quantum Circuits <https://quantumcircuits.com/>`__
291+
provides the ability to simulate CUDA-Q programs using its AquSim simulator or
292+
execute them on the Seeker QPU. AquSim is the first simulator to model error
293+
detection and real-time control of Quantum Circuits' Dual-Rail Cavity Qubit
294+
systems, using a Monte Carlo approach for shot-by-shot simulation. Seeker, the
295+
industry's first Dual-Rail Cavity Qubit quantum computing system, supports all
296+
core operations of a universal quantum computer.
297+
298+
In the initial phase, the supported features include all of the single and
299+
two-qubit gates offered by CUDA-Q, together with real-time conditional logic
300+
enabled by feed-forward capability. With C++ and Python programming supported,
301+
users are able to prototype, test and explore quantum applications in CUDA-Q
302+
targeting Quantum Circuits QPUs. Examples are provided to get started.
304303

305304
Users who wish to get started with running CUDA-Q on AquSim should visit our
306305
`Explore <https://quantumcircuits.com/explore/>`__ page to learn more about the Quantum Circuits
@@ -333,11 +332,43 @@ named :code:`QCI_AUTH_TOKEN` before running your CUDA-Q program.
333332
[... your Python here]
334333
335334
To run on AquSim, simply execute the script using your Python interpreter.
335+
336+
To specify which QCI machine to use, set the :code:`machine` parameter:
337+
338+
.. code:: python
339+
340+
# The default machine is AquSim
341+
cudaq.set_target('qci', machine='AquSim')
342+
# or
343+
cudaq.set_target('qci', machine='Seeker')
344+
345+
You can control the execution method using the :code:`method` parameter:
346+
347+
.. code:: python
348+
349+
# For simulation (default)
350+
cudaq.set_target('Seeker', method='simulate')
351+
# For hardware execution
352+
cudaq.set_target('Seeker', method='execute')
353+
354+
For noisy simulation, you can enable the :code:`noisy` parameter:
355+
356+
.. code:: python
357+
358+
cudaq.set_target('qci', noisy=True)
359+
360+
When collecting shots, you can ensure the requested number of shots are obtained
361+
by enabling the :code:`repeat_until_shots_requested` parameter:
362+
363+
.. code:: python
364+
365+
cudaq.set_target('qci', repeat_until_shots_requested=True)
366+
336367
337368
.. tab:: C++
338369

339370
When executing programs in C++, they must first be compiled using the
340-
CUDA-Q nvq++ compiler, and then submitted to run on AquSim.
371+
CUDA-Q nvq++ compiler, and then submitted to run on the device.
341372

342373
Note that your token is fetched from your environment at run time, not at compile time.
343374

@@ -351,5 +382,42 @@ named :code:`QCI_AUTH_TOKEN` before running your CUDA-Q program.
351382
nvq++ example.cpp --target qci -o example.x
352383
./example.x
353384
385+
To specify which QCI machine to use, pass the ``--qci-machine`` flag:
386+
387+
.. code:: bash
388+
389+
# The default machine is AquSim
390+
nvq++ --target qci --qci-machine AquSim src.cpp -o example.x
391+
# or
392+
nvq++ --target qci --qci-machine Seeker src.cpp -o example.x
393+
394+
You can control the execution method using the ``--qci-method`` flag:
395+
396+
.. code:: bash
397+
398+
# For simulation (default)
399+
nvq++ --target qci --qci-machine Seeker --qci-method simulate src.cpp -o example.x
400+
# For hardware execution
401+
nvq++ --target qci --qci-machine Seeker --qci-method execute src.cpp -o example.x
402+
403+
For noisy simulation, you can set the ``--qci-noisy`` argument to `true`:
404+
405+
.. code:: bash
406+
407+
nvq++ --target qci --qci-noisy true src.cpp -o example.x
408+
409+
When collecting shots, you can ensure the requested number of shots are obtained
410+
with the ``--qci-repeat_until_shots_requested`` argument:
411+
412+
.. code:: bash
413+
414+
nvq++ --target qci --qci-repeat_until_shots_requested true src.cpp -o example.x
415+
416+
.. note::
417+
By default, only successful shots are presented to the user and may be fewer than the
418+
requested number. Enabling :code:`repeat_until_shots_requested` ensures the full
419+
requested shot count is collected, at the cost of increased execution time.
420+
421+
354422
To see a complete example of using Quantum Circuits' backends, please take a look at the
355423
:ref:`Quantum Circuits examples <quantum-circuits-examples>`.

pr-3514/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
24462446
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cudaq.operators.spin.SpinOperator.random" title="Permalink to this definition">¶</a></dt>
24472447
<dd><dl class="py function">
24482448
<dt class="sig sig-object py">
2449-
<span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">qubit_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">term_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1577681192</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cudaq.operators.spin.SpinOperator" title="cudaq.operators.spin.SpinOperator"><span class="pre">SpinOperator</span></a></span></span></dt>
2449+
<span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">qubit_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">term_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">3063169483</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cudaq.operators.spin.SpinOperator" title="cudaq.operators.spin.SpinOperator"><span class="pre">SpinOperator</span></a></span></span></dt>
24502450
<dd></dd></dl>
24512451

24522452
<p>Return a random spin operator with the given number of terms (<code class="code docutils literal notranslate"><span class="pre">term_count</span></code>) where each term acts on all targets in the open range [0, qubit_count). An optional seed value may also be provided.</p>

pr-3514/api/languages/python_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3624,7 +3624,7 @@ aria-hidden="true"}](../default_ops.html "Quantum Operations"){.btn
36243624

36253625
:
36263626

3627-
[[random]{.pre}]{.sig-name .descname}[(]{.sig-paren}*[[qubit_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[term_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[1577681192]{.pre}]{.default_value}*[)]{.sig-paren} [[→]{.sig-return-icon} [[[SpinOperator]{.pre}](#cudaq.operators.spin.SpinOperator "cudaq.operators.spin.SpinOperator"){.reference .internal}]{.sig-return-typehint}]{.sig-return}
3627+
[[random]{.pre}]{.sig-name .descname}[(]{.sig-paren}*[[qubit_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[term_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[3063169483]{.pre}]{.default_value}*[)]{.sig-paren} [[→]{.sig-return-icon} [[[SpinOperator]{.pre}](#cudaq.operators.spin.SpinOperator "cudaq.operators.spin.SpinOperator"){.reference .internal}]{.sig-return-typehint}]{.sig-return}
36283628

36293629
:
36303630

pr-3514/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
10121012
parameter</p>
10131013
<p>3- Optimize all parameters currently in the Ansatz <span class="math notranslate nohighlight">\(\beta_m, \gamma_m = 1, 2, ...k\)</span> such that <span class="math notranslate nohighlight">\(\braket{\psi (k)|H_C|\psi(k)}\)</span> is minimized, and return to the second step.</p>
10141014
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1015-
<div><p><img alt="3d4277dc7b9d4bd8a392601bac163a66" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1015+
<div><p><img alt="9a0350baa470402b8dd0768c187da5d0" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
10161016
</div><div class="nbinput nblast docutils container">
10171017
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
10181018
</pre></div>

pr-3514/applications/python/adapt_qaoa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ explained above.
17771777

17781778
<div>
17791779

1780-
![3d4277dc7b9d4bd8a392601bac163a66](../../_images/adapt-qaoa.png){.no-scaled-link
1780+
![9a0350baa470402b8dd0768c187da5d0](../../_images/adapt-qaoa.png){.no-scaled-link
17811781
style="width: 1000px;"}
17821782

17831783
</div>

pr-3514/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
10091009
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
10101010
<p>8- go to step 4</p>
10111011
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1012-
<div><p><img alt="5d267f50980c4c9eaa5fda6378ba4e2e" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1012+
<div><p><img alt="5a4ca4796c2b4f22a9b71af749905e9d" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
10131013
</div><div class="nbinput docutils container">
10141014
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
10151015
</pre></div>

pr-3514/applications/python/adapt_vqe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ Below is a Schematic depiction of the ADAPT-VQE algorithm
17451745

17461746
<div>
17471747

1748-
![5d267f50980c4c9eaa5fda6378ba4e2e](../../_images/adapt-vqe.png){.no-scaled-link
1748+
![5a4ca4796c2b4f22a9b71af749905e9d](../../_images/adapt-vqe.png){.no-scaled-link
17491749
style="width: 800px;"}
17501750

17511751
</div>

pr-3514/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
10691069
</section>
10701070
<section id="Quantum-oracles">
10711071
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1072-
<p><img alt="250d9e0756974bf9801949b6fc27f253" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1072+
<p><img alt="8eb20595f26f4258b09e5ed83bbcde84" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
10731073
<p>Suppose we have <span class="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>
10741074
<p>Above you see an oracle represented as <span class="math notranslate nohighlight">\(U_f\)</span> which allows us to transform the state <span class="math notranslate nohighlight">\(\ket{x}\ket{y}\)</span> into:</p>
10751075
<div class="math notranslate nohighlight">
@@ -1117,7 +1117,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
11171117
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
11181118
<p>Our aim is to find out if <span class="math notranslate nohighlight">\(f: \{0,1\} \longrightarrow \{0,1\}\)</span> is a constant or a balanced function? If constant, <span class="math notranslate nohighlight">\(f(0) = f(1)\)</span>, and if balanced, <span class="math notranslate nohighlight">\(f(0) \neq f(1)\)</span>.</p>
11191119
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1120-
<p><img alt="34bdb9cc895a4b928b77db6a7a76cf79" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1120+
<p><img alt="be1bd3ff1c504e84b34215d666e91496" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
11211121
<div class="math notranslate nohighlight">
11221122
\[\ket{\psi_0} = \ket{01}
11231123
\tag{1}\]</div>

pr-3514/applications/python/deutsch_algorithm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ number, the result is 0 otherwise 1.
18261826
::: {#Quantum-oracles .section}
18271827
## Quantum oracles[](#Quantum-oracles "Permalink to this heading"){.headerlink}
18281828

1829-
![250d9e0756974bf9801949b6fc27f253](../../_images/oracle.png){.no-scaled-link
1829+
![8eb20595f26f4258b09e5ed83bbcde84](../../_images/oracle.png){.no-scaled-link
18301830
style="width: 300px; height: 150px;"}
18311831

18321832
Suppose we have [\\(f(x): \\{0,1\\} \\longrightarrow \\{0,1\\}\\)]{.math
@@ -1932,7 +1932,7 @@ balanced function? If constant, [\\(f(0) = f(1)\\)]{.math .notranslate
19321932
We step through the circuit diagram below and follow the math after the
19331933
application of each gate.
19341934

1935-
![34bdb9cc895a4b928b77db6a7a76cf79](../../_images/deutsch.png){.no-scaled-link
1935+
![be1bd3ff1c504e84b34215d666e91496](../../_images/deutsch.png){.no-scaled-link
19361936
style="width: 500px; height: 210px;"}
19371937

19381938
::: {.math .notranslate .nohighlight}

pr-3514/applications/python/edge_detection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ <h2>Image<a class="headerlink" href="#Image" title="Permalink to this heading">
10491049
<section id="Quantum-Probability-Image-Encoding-(QPIE):">
10501050
<h2>Quantum Probability Image Encoding (QPIE):<a class="headerlink" href="#Quantum-Probability-Image-Encoding-(QPIE):" title="Permalink to this heading"></a></h2>
10511051
<p>Lets take as an example a classical 2x2 image (4 pixels). We can label each pixel with its position</p>
1052-
<div><p><img alt="2861d996290242f7858d9ac544a2c602" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
1052+
<div><p><img alt="631d4529fc2e4b6994b72df53f30394a" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
10531053
</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>
10541054
<div class="math notranslate nohighlight">
10551055
\[c_i = \frac{I_{yx}}{\sqrt(\sum I^2_{yx})}\]</div>

0 commit comments

Comments
 (0)