Skip to content

Commit c6b67fc

Browse files
Docs preview for PR #2683.
1 parent beaa93f commit c6b67fc

10 files changed

+16
-16
lines changed

pr-2683/applications/python/adapt_qaoa.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
783783
parameter</p>
784784
<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>
785785
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
786-
<div><p><img alt="dcca9fef4d334e1ca61404bde97e7fc7" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 600px;" /></p>
786+
<div><p><img alt="284b8ea11af24078bd88ebd8f434c692" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 600px;" /></p>
787787
</div><div class="nbinput nblast docutils container">
788788
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
789789
</pre></div>

pr-2683/applications/python/deutschs_algorithm.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
840840
</section>
841841
<section id="Quantum-oracles">
842842
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
843-
<p><img alt="d2ff19a4d69346fe9c09ec669899bf7c" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
843+
<p><img alt="2dc1c2e423a742288c8d84d6533a3238" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
844844
<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>
845845
<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>
846846
<div class="math notranslate nohighlight">
@@ -888,7 +888,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
888888
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
889889
<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>
890890
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
891-
<p><img alt="92aca8e57da4425d8c6675b1cc80b5d7" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
891+
<p><img alt="2874a5fcd49249528e4819f63ce970a1" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
892892
<div class="math notranslate nohighlight">
893893
\[\ket{\psi_0} = \ket{01}
894894
\tag{1}\]</div>

pr-2683/applications/python/quantum_transformer.html

+5-5
Large diffs are not rendered by default.

pr-2683/examples/python/performance_optimizations.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ <h1>Optimizing Performance<a class="headerlink" href="#Optimizing-Performance" t
768768
<section id="Gate-Fusion">
769769
<h2>Gate Fusion<a class="headerlink" href="#Gate-Fusion" title="Permalink to this heading"></a></h2>
770770
<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 <code class="docutils literal notranslate"><span class="pre">nvidia-mgpu</span></code> backend and setting the <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="pre">CUDAQ_MGPU_FUSE=4</span> <span class="pre">python</span> <span class="pre">c2h2VQE.py</span> <span class="pre">--target</span> <span class="pre">nvidia</span> <span class="pre">--target-option</span> <span class="pre">fp64,mgpu</span></code></p>
771-
<p><img alt="42803aef33014f1899b78b11440da3bf" src="../../_images/gate-fuse.png" /></p>
771+
<p><img alt="fdac1fbc679940468f2560de79cef046" src="../../_images/gate-fuse.png" /></p>
772772
<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>
773-
<p><img alt="4977970f9a61445088bd70e85171d403" src="../../_images/gatefusion.png" /></p>
773+
<p><img alt="fe69aaddb9ba4ca5b663adb72f14df32" src="../../_images/gatefusion.png" /></p>
774774
</section>
775775
</section>
776776

pr-2683/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-2683/sphinx/examples/cpp/dynamics/cavity_qed.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
// subsystem 0 (atom) has 2 levels (ground and excited states).
2424
// subsystem 1 (cavity) has 10 levels (Fock states, representing photon number
2525
// states).
26-
std::map<int, int> dimensions{{0, 2}, {1, 10}};
26+
cudaq::dimension_map dimensions{{0, 2}, {1, 10}};
2727

2828
// For the cavity subsystem 1
2929
// We create the annihilation (a) and creation (a+) operators.

pr-2683/sphinx/examples/cpp/dynamics/cross_resonance.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main() {
6969
// Each qubit is a 2-level system (dimension 2).
7070
// The composite system (two qubits) has a total Hilbert space dimension of 2
7171
// * 2 = 4.
72-
std::map<int, int> dimensions{{0, 2}, {1, 2}};
72+
cudaq::dimension_map dimensions{{0, 2}, {1, 2}};
7373

7474
// Build the initial state
7575
// psi_00 represents the state |00> (both qubits in the ground state).

pr-2683/sphinx/examples/cpp/dynamics/heisenberg_model.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main() {
2121

2222
// Set up a 9-spin chain, where each spin is a two-level system.
2323
const int num_spins = 9;
24-
std::map<int, int> dimensions;
24+
cudaq::dimension_map dimensions;
2525
for (int i = 0; i < num_spins; i++) {
2626
dimensions[i] = 2; // Each spin (site) has dimension 2.
2727
}

pr-2683/sphinx/examples/cpp/dynamics/qubit_control.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int main() {
5252
omega_x * cudaq::scalar_operator(mod_func) * cudaq::spin_operator::x(0);
5353

5454
// A single qubit with dimension 2.
55-
std::map<int, int> dimensions = {{0, 2}};
55+
cudaq::dimension_map dimensions = {{0, 2}};
5656

5757
// The qubit starts in the |0> state, represented by the vector [1, 0].
5858
std::vector<std::complex<double>> initial_state_vec = {1.0, 0.0};

pr-2683/sphinx/examples/cpp/dynamics/qubit_dynamics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main() {
2424
auto hamiltonian = 2.0 * M_PI * 0.1 * cudaq::spin_operator::x(0);
2525

2626
// Dimensions: one subsystem of dimension 2 (a two-level system).
27-
const std::map<int, int> dimensions = {{0, 2}};
27+
const cudaq::dimension_map dimensions = {{0, 2}};
2828

2929
// Initial state: ground state
3030
std::vector<std::complex<double>> initial_state_vec = {1.0, 0.0};

0 commit comments

Comments
 (0)