Skip to content

Commit

Permalink
deploy: 5953cce
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijc committed Oct 18, 2023
1 parent fa0d782 commit f9f08ae
Show file tree
Hide file tree
Showing 32 changed files with 115 additions and 96 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
36 changes: 35 additions & 1 deletion _modules/qiskit_braket_provider/providers/braket_backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ <h1>Source code for qiskit_braket_provider.providers.braket_backend</h1><div cla
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Iterable</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">List</span>

<span class="kn">from</span> <span class="nn">braket.aws</span> <span class="kn">import</span> <span class="n">AwsDevice</span><span class="p">,</span> <span class="n">AwsQuantumTaskBatch</span><span class="p">,</span> <span class="n">AwsQuantumTask</span>
<span class="kn">from</span> <span class="nn">braket.aws.queue_information</span> <span class="kn">import</span> <span class="n">QueueDepthInfo</span>
<span class="kn">from</span> <span class="nn">braket.circuits</span> <span class="kn">import</span> <span class="n">Circuit</span>
<span class="kn">from</span> <span class="nn">braket.devices</span> <span class="kn">import</span> <span class="n">LocalSimulator</span>
<span class="kn">from</span> <span class="nn">braket.tasks.local_quantum_task</span> <span class="kn">import</span> <span class="n">LocalQuantumTask</span>
Expand Down Expand Up @@ -262,6 +263,39 @@ <h1>Source code for qiskit_braket_provider.providers.braket_backend</h1><div cla
<span class="c1"># TODO: fetch information from device.properties.provider # pylint: disable=fixme</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span>

<span class="k">def</span> <span class="nf">queue_depth</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">QueueDepthInfo</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Task queue depth refers to the total number of quantum tasks currently waiting</span>
<span class="sd"> to run on a particular device.</span>

<span class="sd"> Returns:</span>
<span class="sd"> QueueDepthInfo: Instance of the QueueDepth class representing queue depth</span>
<span class="sd"> information for quantum jobs and hybrid jobs.</span>
<span class="sd"> Queue depth refers to the number of quantum jobs and hybrid jobs queued on a particular</span>
<span class="sd"> device. The normal tasks refers to the quantum jobs not submitted via Hybrid Jobs.</span>
<span class="sd"> Whereas, the priority tasks refers to the total number of quantum jobs waiting to run</span>
<span class="sd"> submitted through Amazon Braket Hybrid Jobs. These tasks run before the normal tasks.</span>
<span class="sd"> If the queue depth for normal or priority quantum tasks is greater than 4000, we display</span>
<span class="sd"> their respective queue depth as &#39;&gt;4000&#39;. Similarly, for hybrid jobs if there are more</span>
<span class="sd"> than 1000 jobs queued on a device, display the hybrid jobs queue depth as &#39;&gt;1000&#39;.</span>
<span class="sd"> Additionally, for QPUs if hybrid jobs queue depth is 0, we display information about</span>
<span class="sd"> priority and count of the running hybrid job.</span>

<span class="sd"> Example:</span>
<span class="sd"> Queue depth information for a running hybrid job.</span>
<span class="sd"> &gt;&gt;&gt; device = AWSBraketProvider().get_backend(&quot;SV1&quot;)</span>
<span class="sd"> &gt;&gt;&gt; print(device.queue_depth())</span>
<span class="sd"> QueueDepthInfo(quantum_tasks={&lt;QueueType.NORMAL: &#39;Normal&#39;&gt;: &#39;0&#39;,</span>
<span class="sd"> &lt;QueueType.PRIORITY: &#39;Priority&#39;&gt;: &#39;1&#39;}, jobs=&#39;0 (1 prioritized job(s) running)&#39;)</span>

<span class="sd"> If more than 4000 quantum jobs queued on a device.</span>
<span class="sd"> &gt;&gt;&gt; device = AWSBraketProvider().get_backend(&quot;SV1&quot;)</span>
<span class="sd"> &gt;&gt;&gt; print(device.queue_depth())</span>
<span class="sd"> QueueDepthInfo(quantum_tasks={&lt;QueueType.NORMAL: &#39;Normal&#39;&gt;: &#39;&gt;4000&#39;,</span>
<span class="sd"> &lt;QueueType.PRIORITY: &#39;Priority&#39;&gt;: &#39;2000&#39;}, jobs=&#39;100&#39;)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_device</span><span class="o">.</span><span class="n">queue_depth</span><span class="p">()</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">dtm</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">float</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span>
Expand Down Expand Up @@ -388,7 +422,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
39 changes: 38 additions & 1 deletion _modules/qiskit_braket_provider/providers/braket_job.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ <h1>Source code for qiskit_braket_provider.providers.braket_job</h1><div class="
<span class="kn">from</span> <span class="nn">warnings</span> <span class="kn">import</span> <span class="n">warn</span>

<span class="kn">from</span> <span class="nn">braket.aws</span> <span class="kn">import</span> <span class="n">AwsQuantumTask</span>
<span class="kn">from</span> <span class="nn">braket.aws.queue_information</span> <span class="kn">import</span> <span class="n">QuantumTaskQueueInfo</span>
<span class="kn">from</span> <span class="nn">braket.tasks</span> <span class="kn">import</span> <span class="n">GateModelQuantumTaskResult</span>
<span class="kn">from</span> <span class="nn">braket.tasks.local_quantum_task</span> <span class="kn">import</span> <span class="n">LocalQuantumTask</span>
<span class="kn">from</span> <span class="nn">qiskit.providers</span> <span class="kn">import</span> <span class="n">BackendV2</span><span class="p">,</span> <span class="n">JobStatus</span><span class="p">,</span> <span class="n">JobV1</span>
Expand Down Expand Up @@ -161,6 +162,42 @@ <h1>Source code for qiskit_braket_provider.providers.braket_job</h1><div class="
<span class="k">def</span> <span class="nf">submit</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span>

<span class="k">def</span> <span class="nf">queue_position</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">QuantumTaskQueueInfo</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The queue position details for the quantum job.</span>

<span class="sd"> Returns:</span>
<span class="sd"> QuantumTaskQueueInfo: Instance of QuantumTaskQueueInfo class</span>
<span class="sd"> representing the queue position information for the quantum job.</span>
<span class="sd"> The queue_position is only returned when quantum job is not in</span>
<span class="sd"> RUNNING/CANCELLING/TERMINAL states, else queue_position is returned as None.</span>
<span class="sd"> The normal tasks refers to the quantum jobs not submitted via Hybrid Jobs.</span>
<span class="sd"> Whereas, the priority tasks refers to the total number of quantum jobs waiting to run</span>
<span class="sd"> submitted through Amazon Braket Hybrid Jobs. These tasks run before the normal tasks.</span>
<span class="sd"> If the queue position for normal or priority quantum tasks is greater than 2000,</span>
<span class="sd"> we display their respective queue position as &#39;&gt;2000&#39;.</span>

<span class="sd"> Note: We don&#39;t provide queue information for the LocalQuantumTasks.</span>

<span class="sd"> Examples:</span>
<span class="sd"> job status = QUEUED and queue position is 2050</span>
<span class="sd"> &gt;&gt;&gt; task.queue_position()</span>
<span class="sd"> QuantumTaskQueueInfo(queue_type=&lt;QueueType.NORMAL: &#39;Normal&#39;&gt;,</span>
<span class="sd"> queue_position=&#39;&gt;2000&#39;, message=None)</span>

<span class="sd"> job status = COMPLETED</span>
<span class="sd"> &gt;&gt;&gt; task.queue_position()</span>
<span class="sd"> QuantumTaskQueueInfo(queue_type=&lt;QueueType.NORMAL: &#39;Normal&#39;&gt;,</span>
<span class="sd"> queue_position=None, message=&#39;Task is in COMPLETED status. AmazonBraket does</span>
<span class="sd"> not show queue position for this status.&#39;)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">task</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_tasks</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">task</span><span class="p">,</span> <span class="n">LocalQuantumTask</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span>
<span class="s2">&quot;We don&#39;t provide queue information for the LocalQuantumTask.&quot;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">AwsQuantumTask</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">task_id</span><span class="p">())</span><span class="o">.</span><span class="n">queue_position</span><span class="p">()</span>

<span class="k">def</span> <span class="nf">task_id</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return a unique id identifying the task.&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_task_id</span>
Expand Down Expand Up @@ -307,7 +344,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
~AWSBraketBackend.drive_channel
~AWSBraketBackend.measure_channel
~AWSBraketBackend.qubit_properties
~AWSBraketBackend.queue_depth
~AWSBraketBackend.retrieve_job
~AWSBraketBackend.run
~AWSBraketBackend.set_options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
~AmazonBraketTask.done
~AmazonBraketTask.in_final_state
~AmazonBraketTask.job_id
~AmazonBraketTask.queue_position
~AmazonBraketTask.result
~AmazonBraketTask.running
~AmazonBraketTask.status
Expand Down
2 changes: 1 addition & 1 deletion apidocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion apidocs/providers.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion how_tos/0_how_to_access_AWS_Braket_devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion how_tos/1_how_to_run_circuits_on_Braket_devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion how_tos/2_how_to_retrieve_results_from_backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion how_tos/3_how_to_qiskit_hybrid_job.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion how_tos/4_how_to_verbatim_circuits.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion how_tos/5_how_to_run_circuits_on_Braket_local_backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
29 changes: 1 addition & 28 deletions how_tos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,6 @@
<div class="body" role="main">

<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="0_how_to_access_AWS_Braket_devices.html">How-to: access AWS Braket devices</a><ul>
<li class="toctree-l2"><a class="reference internal" href="0_how_to_access_AWS_Braket_devices.html#Exploring-all-backends-by-Braket-provider">Exploring all backends by Braket provider</a></li>
<li class="toctree-l2"><a class="reference internal" href="0_how_to_access_AWS_Braket_devices.html#Quering-for-specific-backend">Quering for specific backend</a></li>
<li class="toctree-l2"><a class="reference internal" href="0_how_to_access_AWS_Braket_devices.html#Query-options">Query options</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="1_how_to_run_circuits_on_Braket_devices.html">How-to: run circuit on Braket devices</a></li>
<li class="toctree-l1"><a class="reference internal" href="2_how_to_retrieve_results_from_backend.html">How-to: retrieve results from backend</a></li>
<li class="toctree-l1"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html">How-to: Qiskit Hybrid Job</a><ul>
<li class="toctree-l2"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Prepare-files">Prepare files</a><ul>
<li class="toctree-l3"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Prepare-Hybrid-job-script">Prepare Hybrid job script</a></li>
<li class="toctree-l3"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Prepare-docker-image">Prepare docker image</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Prepare-env">Prepare env</a><ul>
<li class="toctree-l3"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Login-to-AWS-CLI-and-docker">Login to AWS CLI and docker</a></li>
<li class="toctree-l3"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Create-ECR-repo">Create ECR repo</a></li>
<li class="toctree-l3"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Build-docker-image">Build docker image</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="3_how_to_qiskit_hybrid_job.html#Running-your-job">Running your job</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4_how_to_verbatim_circuits.html">How-to: run circuit on Braket device using verbatim mode</a></li>
<li class="toctree-l1"><a class="reference internal" href="5_how_to_run_circuits_on_Braket_local_backend.html">How-to: run circuit on Braket local backend</a></li>
</ul>
<div class="nbsphinx-gallery">
<a class="reference internal" href="0_how_to_access_AWS_Braket_devices.html">
<div><img alt="" src="../_static/nbsphinx-no-thumbnail.svg"></div>
Expand Down Expand Up @@ -174,7 +147,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
Expand Down
2 changes: 1 addition & 1 deletion py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3>Related Topics</h3>
&copy;2022.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit f9f08ae

Please sign in to comment.