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
<p>Stores the final expectation values, that is the results produced by calls to <a class="reference internal" href="#cudaq.observe" title="cudaq.observe"><code class="xref py py-func docutils literal notranslate"><span class="pre">observe()</span></code></a>, triggered by a call to <a class="reference internal" href="#cudaq.evolve" title="cudaq.evolve"><code class="xref py py-func docutils literal notranslate"><span class="pre">evolve()</span></code></a>. Each entry corresponds to one observable provided in the <a class="reference internal" href="#cudaq.evolve" title="cudaq.evolve"><code class="xref py py-func docutils literal notranslate"><span class="pre">evolve()</span></code></a> call. This value will be None if no observables were specified in the call.</p>
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
@@ -796,7 +796,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
796
796
parameter</p>
797
797
<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>
798
798
<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>
858
858
<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>
902
902
<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>
903
903
<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>
835
835
<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
@@ -781,9 +781,9 @@ <h1>Optimizing Performance<a class="headerlink" href="#Optimizing-Performance" t
781
781
<sectionid="Gate-Fusion">
782
782
<h2>Gate Fusion<aclass="headerlink" href="#Gate-Fusion" title="Permalink to this heading">¶</a></h2>
783
783
<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