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
Copy file name to clipboardexpand all lines: pr-2735/applications/python/adapt_qaoa.html
+1-1
Original file line number
Diff line number
Diff line change
@@ -774,7 +774,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
774
774
parameter</p>
775
775
<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>
776
776
<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>
836
836
<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>
880
880
<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>
881
881
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
Copy file name to clipboardexpand all lines: pr-2735/examples/python/performance_optimizations.html
+2-2
Original file line number
Diff line number
Diff line change
@@ -759,9 +759,9 @@ <h1>Optimizing Performance<a class="headerlink" href="#Optimizing-Performance" t
759
759
<sectionid="Gate-Fusion">
760
760
<h2>Gate Fusion<aclass="headerlink" href="#Gate-Fusion" title="Permalink to this heading">¶</a></h2>
761
761
<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