Skip to content

Commit

Permalink
Docs preview for PR #2152.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuda-quantum-bot committed Aug 27, 2024
1 parent c6fd0bd commit c0c0151
Show file tree
Hide file tree
Showing 86 changed files with 4,840 additions and 86 deletions.
Binary file added pr-2152/_images/shor_circuit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
898 changes: 898 additions & 0 deletions pr-2152/_sources/examples/python/tutorials/Shors.ipynb.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pr-2152/_sources/using/tutorials.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ Tutorials that give an in depth view of CUDA-Q and its applications in Python.
/examples/python/tutorials/vqe_water_active_space.ipynb
/examples/python/tutorials/Divisive_clustering.ipynb
/examples/python/tutorials/H2-MRQKS.ipynb
/examples/python/tutorials/Shors.ipynb
10 changes: 10 additions & 0 deletions pr-2152/api/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../examples/python/tutorials/H2-MRQKS.html">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/python/tutorials/Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../using/backends/backends.html"> Backends</a><ul>
Expand Down
10 changes: 10 additions & 0 deletions pr-2152/api/default_ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../examples/python/tutorials/H2-MRQKS.html">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/python/tutorials/Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../examples/python/tutorials/Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../using/backends/backends.html"> Backends</a><ul>
Expand Down
10 changes: 10 additions & 0 deletions pr-2152/api/languages/cpp_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../examples/python/tutorials/H2-MRQKS.html">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../examples/python/tutorials/Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using/backends/backends.html"> Backends</a><ul>
Expand Down
12 changes: 11 additions & 1 deletion pr-2152/api/languages/python_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../examples/python/tutorials/H2-MRQKS.html">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../examples/python/tutorials/Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../examples/python/tutorials/Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using/backends/backends.html"> Backends</a><ul>
Expand Down Expand Up @@ -2092,7 +2102,7 @@ <h2>Data Types<a class="headerlink" href="#data-types" title="Permalink to this
<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.SpinOperator.random" title="Permalink to this definition"></a></dt>
<dd><dl class="py function">
<dt class="sig sig-object py">
<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.12)"><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.12)"><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.12)"><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">2174353725</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.SpinOperator" title="cudaq.mlir._mlir_libs._quakeDialects.cudaq_runtime.SpinOperator"><span class="pre">cudaq.mlir._mlir_libs._quakeDialects.cudaq_runtime.SpinOperator</span></a></span></span></dt>
<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.12)"><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.12)"><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.12)"><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">617209315</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.SpinOperator" title="cudaq.mlir._mlir_libs._quakeDialects.cudaq_runtime.SpinOperator"><span class="pre">cudaq.mlir._mlir_libs._quakeDialects.cudaq_runtime.SpinOperator</span></a></span></span></dt>
<dd></dd></dl>

<p>Return a random <a class="reference internal" href="#cudaq.SpinOperator" title="cudaq.SpinOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">SpinOperator</span></code></a> on the given number of qubits (<code class="code docutils literal notranslate"><span class="pre">qubit_count</span></code>) and composed of the given number of terms (<code class="code docutils literal notranslate"><span class="pre">term_count</span></code>). An optional seed value may also be provided.</p>
Expand Down
10 changes: 10 additions & 0 deletions pr-2152/examples/python/tutorials/Divisive_clustering.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="H2-MRQKS.html">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../using/backends/backends.html"> Backends</a><ul>
Expand Down
16 changes: 13 additions & 3 deletions pr-2152/examples/python/tutorials/H2-MRQKS.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="CUDA-Q Backends" href="../../../using/backends/backends.html" />
<link rel="next" title="Factoring Integers With Shor’s Algorithm" href="Shors.html" />
<link rel="prev" title="Divisive Clustering With Coresets Using CUDA-Q" href="Divisive_clustering.html" />
</head>

Expand Down Expand Up @@ -221,6 +221,16 @@
</ul>
</li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Multi-Reference Quantum Krylov Algorithm (H2 Example)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Shors.html">Factoring Integers With Shor’s Algorithm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Shors.html#Shor's-algorithm">Shor’s algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Solving-the-order-finding-problem-classically">Solving the order-finding problem classically</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Solving-the-order-finding-problem-with-a-quantum-algorithm">Solving the order-finding problem with a quantum algorithm</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Determining-the-order-from-the-measurement-results-of-the-phase-kernel">Determining the order from the measurement results of the phase kernel</a></li>
<li class="toctree-l4"><a class="reference internal" href="Shors.html#Postscript">Postscript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../using/backends/backends.html"> Backends</a><ul>
Expand Down Expand Up @@ -561,7 +571,7 @@
</li>
</ul><div class="rst-breadcrumbs-buttons" role="navigation" aria-label="Sequential page navigation">
<a href="Divisive_clustering.html" class="btn btn-neutral float-left" title="Divisive Clustering With Coresets Using CUDA-Q" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../../../using/backends/backends.html" class="btn btn-neutral float-right" title="CUDA-Q Backends" accesskey="n">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Shors.html" class="btn btn-neutral float-right" title="Factoring Integers With Shor’s Algorithm" accesskey="n">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
</div>
Expand Down Expand Up @@ -980,7 +990,7 @@ <h1>Multi-Reference Quantum Krylov Algorithm (H2 Example)<a class="headerlink" h
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Divisive_clustering.html" class="btn btn-neutral float-left" title="Divisive Clustering With Coresets Using CUDA-Q" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../../../using/backends/backends.html" class="btn btn-neutral float-right" title="CUDA-Q Backends" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Shors.html" class="btn btn-neutral float-right" title="Factoring Integers With Shor’s Algorithm" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
Loading

0 comments on commit c0c0151

Please sign in to comment.