Skip to content

Commit

Permalink
Deploying to gh-pages from @ 59a4bf9 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsp-ibm committed Feb 13, 2024
1 parent f1c4d19 commit 2312220
Show file tree
Hide file tree
Showing 63 changed files with 1,632 additions and 1,311 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a24491ae6015d5dcc4e2ba7c9b006e91
config: 7c74910c02476fcddefacab4e321669e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified _images/tutorials_09_credit_risk_analysis_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/tutorials_09_credit_risk_analysis_13_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/tutorials_09_credit_risk_analysis_14_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/tutorials_10_qgan_option_pricing_7_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/tutorials_11_time_series_22_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.circuit.library.payoff_functions.european_call_pricing_objective</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2018, 2023.</span>
<span class="c1"># (C) Copyright IBM 2018, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand Down Expand Up @@ -413,7 +413,7 @@ <h1>Source code for qiskit_finance.circuit.library.payoff_functions.european_cal
<span class="p">)</span>

<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">european_call</span><span class="o">.</span><span class="n">qregs</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;ECEV&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_data</span> <span class="o">=</span> <span class="n">european_call</span><span class="o">.</span><span class="n">data</span>
<span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">european_call</span><span class="o">.</span><span class="n">data</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_european_call</span> <span class="o">=</span> <span class="n">european_call</span>

<div class="viewcode-block" id="EuropeanCallPricingObjective.post_processing"><a class="viewcode-back" href="../../../../../stubs/qiskit_finance.circuit.library.EuropeanCallPricingObjective.html#qiskit_finance.circuit.library.EuropeanCallPricingObjective.post_processing">[docs]</a> <span class="k">def</span> <span class="nf">post_processing</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">scaled_value</span><span class="p">:</span> <span class="nb">float</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">float</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.circuit.library.probability_distributions.lognormal</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2017, 2023.</span>
<span class="c1"># (C) Copyright IBM 2017, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand All @@ -373,7 +373,10 @@ <h1>Source code for qiskit_finance.circuit.library.probability_distributions.log

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Optional</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>

<span class="kn">from</span> <span class="nn">qiskit.circuit</span> <span class="kn">import</span> <span class="n">QuantumCircuit</span>
<span class="kn">from</span> <span class="nn">qiskit.circuit.library</span> <span class="kn">import</span> <span class="n">Initialize</span><span class="p">,</span> <span class="n">Isometry</span>

<span class="kn">from</span> <span class="nn">.normal</span> <span class="kn">import</span> <span class="n">_check_bounds_valid</span><span class="p">,</span> <span class="n">_check_dimensions_match</span>


Expand Down Expand Up @@ -521,13 +524,10 @@ <h1>Source code for qiskit_finance.circuit.library.probability_distributions.log
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">inner</span><span class="o">.</span><span class="n">qregs</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">)</span>

<span class="c1"># use default the isometry (or initialize w/o resets) algorithm to construct the circuit</span>
<span class="c1"># pylint: disable=no-member</span>
<span class="k">if</span> <span class="n">upto_diag</span><span class="p">:</span>
<span class="n">inner</span><span class="o">.</span><span class="n">isometry</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">inner</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">Isometry</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">),</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">inner</span><span class="o">.</span><span class="n">to_instruction</span><span class="p">(),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">)</span> <span class="c1"># Isometry is not a Gate</span>
<span class="k">else</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">qiskit.extensions</span> <span class="kn">import</span> <span class="n">Initialize</span> <span class="c1"># pylint: disable=cyclic-import</span>

<span class="n">initialize</span> <span class="o">=</span> <span class="n">Initialize</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">))</span>
<span class="n">circuit</span> <span class="o">=</span> <span class="n">initialize</span><span class="o">.</span><span class="n">gates_to_uncompute</span><span class="p">()</span><span class="o">.</span><span class="n">inverse</span><span class="p">()</span>
<span class="n">inner</span><span class="o">.</span><span class="n">compose</span><span class="p">(</span><span class="n">circuit</span><span class="p">,</span> <span class="n">inplace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.circuit.library.probability_distributions.normal</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2017, 2023.</span>
<span class="c1"># (C) Copyright IBM 2017, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand All @@ -373,7 +373,9 @@ <h1>Source code for qiskit_finance.circuit.library.probability_distributions.nor

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Any</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>

<span class="kn">from</span> <span class="nn">qiskit.circuit</span> <span class="kn">import</span> <span class="n">QuantumCircuit</span>
<span class="kn">from</span> <span class="nn">qiskit.circuit.library</span> <span class="kn">import</span> <span class="n">Initialize</span><span class="p">,</span> <span class="n">Isometry</span>


<div class="viewcode-block" id="NormalDistribution"><a class="viewcode-back" href="../../../../../stubs/qiskit_finance.circuit.library.NormalDistribution.html#qiskit_finance.circuit.library.NormalDistribution">[docs]</a><span class="k">class</span> <span class="nc">NormalDistribution</span><span class="p">(</span><span class="n">QuantumCircuit</span><span class="p">):</span>
Expand Down Expand Up @@ -567,13 +569,10 @@ <h1>Source code for qiskit_finance.circuit.library.probability_distributions.nor
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">inner</span><span class="o">.</span><span class="n">qregs</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">)</span>

<span class="c1"># use default the isometry (or initialize w/o resets) algorithm to construct the circuit</span>
<span class="c1"># pylint: disable=no-member</span>
<span class="k">if</span> <span class="n">upto_diag</span><span class="p">:</span>
<span class="n">inner</span><span class="o">.</span><span class="n">isometry</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">inner</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">Isometry</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">),</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">inner</span><span class="o">.</span><span class="n">to_instruction</span><span class="p">(),</span> <span class="n">inner</span><span class="o">.</span><span class="n">qubits</span><span class="p">)</span> <span class="c1"># Isometry is not a Gate</span>
<span class="k">else</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">qiskit.extensions</span> <span class="kn">import</span> <span class="n">Initialize</span> <span class="c1"># pylint: disable=cyclic-import</span>

<span class="n">initialize</span> <span class="o">=</span> <span class="n">Initialize</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">normalized_probabilities</span><span class="p">))</span>
<span class="n">circuit</span> <span class="o">=</span> <span class="n">initialize</span><span class="o">.</span><span class="n">gates_to_uncompute</span><span class="p">()</span><span class="o">.</span><span class="n">inverse</span><span class="p">()</span>
<span class="n">inner</span><span class="o">.</span><span class="n">compose</span><span class="p">(</span><span class="n">circuit</span><span class="p">,</span> <span class="n">inplace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.data_providers._base_data_provider</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2019, 2023.</span>
<span class="c1"># (C) Copyright IBM 2019, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand Down Expand Up @@ -400,7 +400,7 @@ <h1>Source code for qiskit_finance.data_providers._base_data_provider</h1><div c
<span class="sd"> Doing so requires that the required driver interface is implemented.</span>

<span class="sd"> To use the subclasses, please see</span>
<span class="sd"> https://qiskit.org/ecosystem/finance/tutorials/11_time_series.html</span>
<span class="sd"> https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html</span>

<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.data_providers.data_on_demand_provider</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2019, 2023.</span>
<span class="c1"># (C) Copyright IBM 2019, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand Down Expand Up @@ -389,7 +389,7 @@ <h1>Source code for qiskit_finance.data_providers.data_on_demand_provider</h1><d
<span class="w"> </span><span class="sd">&quot;&quot;&quot;NASDAQ Data on Demand data provider.</span>

<span class="sd"> Please see:</span>
<span class="sd"> https://qiskit.org/ecosystem/finance/tutorials/11_time_series.html</span>
<span class="sd"> https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html</span>
<span class="sd"> for instructions on use, which involve obtaining a NASDAQ DOD access token.</span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.data_providers.exchange_data_provider</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2019, 2023.</span>
<span class="c1"># (C) Copyright IBM 2019, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand All @@ -386,7 +386,7 @@ <h1>Source code for qiskit_finance.data_providers.exchange_data_provider</h1><di
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Exchange data provider.</span>

<span class="sd"> Please see:</span>
<span class="sd"> https://qiskit.org/ecosystem/finance/tutorials/11_time_series.html</span>
<span class="sd"> https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html</span>
<span class="sd"> for instructions on use, which involve obtaining a Nasdaq Data Link access token.</span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.data_providers.wikipedia_data_provider</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2019, 2023.</span>
<span class="c1"># (C) Copyright IBM 2019, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand All @@ -386,7 +386,7 @@ <h1>Source code for qiskit_finance.data_providers.wikipedia_data_provider</h1><d
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Wikipedia data provider.</span>

<span class="sd"> Please see:</span>
<span class="sd"> https://qiskit.org/ecosystem/finance/tutorials/11_time_series.html</span>
<span class="sd"> https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html</span>
<span class="sd"> for instructions on use.</span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
<h1>Source code for qiskit_finance.data_providers.yahoo_data_provider</h1><div class="highlight"><pre>
<span></span><span class="c1"># This code is part of a Qiskit project.</span>
<span class="c1">#</span>
<span class="c1"># (C) Copyright IBM 2020, 2023.</span>
<span class="c1"># (C) Copyright IBM 2020, 2024.</span>
<span class="c1">#</span>
<span class="c1"># This code is licensed under the Apache License, Version 2.0. You may</span>
<span class="c1"># obtain a copy of this license in the LICENSE.txt file in the root directory</span>
Expand Down Expand Up @@ -395,7 +395,7 @@ <h1>Source code for qiskit_finance.data_providers.yahoo_data_provider</h1><div c
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Yahoo data provider.</span>

<span class="sd"> Please see:</span>
<span class="sd"> https://qiskit.org/ecosystem/finance/tutorials/11_time_series.html</span>
<span class="sd"> https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html</span>
<span class="sd"> for instructions on use.</span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
9 changes: 4 additions & 5 deletions _sources/getting_started.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Installation
============

Qiskit Finance depends on Qiskit, which has its own
`Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__ detailing the
`installation instructions <https://docs.quantum.ibm.com/start/install>`__ detailing the
installation options and its supported environments/platforms. You should refer to
that first. Then the information here can be followed which focuses on the additional installation
specific to Qiskit Finance.
Expand All @@ -17,10 +17,9 @@ specific to Qiskit Finance.

.. tab-item:: Start locally

The simplest way to get started is to first follow the `getting started 'Start locally' guide for
Qiskit <https://qiskit.org/documentation/getting_started.html>`__
The simplest way to get started is to follow the installation guide for Qiskit `here <https://docs.quantum.ibm.com/start/install>`__

In your virtual environment, where you installed Qiskit, install Qiskit Finance as follows:
In your virtual environment, where you installed Qiskit, install ``qiskit-finance`` as follows:

.. code:: sh
Expand All @@ -41,7 +40,7 @@ specific to Qiskit Finance.

Since Qiskit Finance depends on Qiskit, and its latest changes may require new or changed
features of Qiskit, you should first follow Qiskit's `"Install from source"` instructions
here `Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__
`here <https://docs.quantum.ibm.com/start/install-qiskit-source>`__

.. raw:: html

Expand Down
Loading

0 comments on commit 2312220

Please sign in to comment.