Skip to content

Commit

Permalink
Deploying to gh-pages from @ ef0bad4 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsp-ibm committed Jan 24, 2024
1 parent 3264334 commit 316a7a8
Show file tree
Hide file tree
Showing 295 changed files with 191,257 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +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: a854d428f49551f4fff5b7464ff1c0e2
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
Binary file added _images/quantum_kernel.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 added _images/tutorials_01_neural_networks_14_2.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 added _images/tutorials_01_neural_networks_6_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/tutorials_03_quantum_kernel_10_0.png
Binary file added _images/tutorials_03_quantum_kernel_17_0.png
Binary file added _images/tutorials_03_quantum_kernel_29_0.png
Binary file added _images/tutorials_03_quantum_kernel_33_0.png
Binary file added _images/tutorials_03_quantum_kernel_40_0.png
Binary file added _images/tutorials_03_quantum_kernel_50_0.png
Binary file added _images/tutorials_04_torch_qgan_11_1.png
Binary file added _images/tutorials_04_torch_qgan_29_0.png
Binary file added _images/tutorials_04_torch_qgan_33_0.png
Binary file added _images/tutorials_04_torch_qgan_7_0.png
Binary file added _images/tutorials_05_torch_connector_11_1.png
Binary file added _images/tutorials_05_torch_connector_17_1.png
Binary file added _images/tutorials_05_torch_connector_20_0.png
Binary file added _images/tutorials_05_torch_connector_26_0.png
Binary file added _images/tutorials_05_torch_connector_33_0.png
Binary file added _images/tutorials_05_torch_connector_41_0.png
Binary file added _images/tutorials_05_torch_connector_48_0.png
Binary file added _images/tutorials_05_torch_connector_4_0.png
Binary file added _images/tutorials_05_torch_connector_6_1.png
Binary file added _images/tutorials_07_pegasos_qsvc_16_0.png
Binary file added _images/tutorials_10_effective_dimension_24_0.png
Binary file added _images/tutorials_10_effective_dimension_41_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_25_1.png
Binary file added _images/tutorials_12_quantum_autoencoder_30_1.png
Binary file added _images/tutorials_12_quantum_autoencoder_37_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_43_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_46_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_54_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_54_1.png
Binary file added _images/tutorials_12_quantum_autoencoder_56_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_64_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_66_0.png
Binary file added _images/tutorials_12_quantum_autoencoder_66_1.png
491 changes: 491 additions & 0 deletions _modules/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

549 changes: 549 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/classifiers/qsvc.html

Large diffs are not rendered by default.

636 changes: 636 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/classifiers/vqc.html

Large diffs are not rendered by default.

675 changes: 675 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/objective_functions.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

544 changes: 544 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/regressors/qsvr.html

Large diffs are not rendered by default.

598 changes: 598 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/regressors/vqr.html

Large diffs are not rendered by default.

520 changes: 520 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/serializable_model.html

Large diffs are not rendered by default.

763 changes: 763 additions & 0 deletions _modules/qiskit_machine_learning/algorithms/trainable_model.html

Large diffs are not rendered by default.

722 changes: 722 additions & 0 deletions _modules/qiskit_machine_learning/circuit/library/qnn_circuit.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

798 changes: 798 additions & 0 deletions _modules/qiskit_machine_learning/connectors/torch_connector.html

Large diffs are not rendered by default.

730 changes: 730 additions & 0 deletions _modules/qiskit_machine_learning/datasets/ad_hoc.html

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions _modules/qiskit_machine_learning/exceptions.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

616 changes: 616 additions & 0 deletions _modules/qiskit_machine_learning/kernels/base_kernel.html

Large diffs are not rendered by default.

727 changes: 727 additions & 0 deletions _modules/qiskit_machine_learning/kernels/fidelity_quantum_kernel.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

583 changes: 583 additions & 0 deletions _modules/qiskit_machine_learning/kernels/trainable_kernel.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

749 changes: 749 additions & 0 deletions _modules/qiskit_machine_learning/neural_networks/estimator_qnn.html

Large diffs are not rendered by default.

782 changes: 782 additions & 0 deletions _modules/qiskit_machine_learning/neural_networks/neural_network.html

Large diffs are not rendered by default.

892 changes: 892 additions & 0 deletions _modules/qiskit_machine_learning/neural_networks/sampler_qnn.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.algorithms.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-algorithms:

.. automodule:: qiskit_machine_learning.algorithms
:no-members:
:no-inherited-members:
:no-special-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-circuit-library:

.. automodule:: qiskit_machine_learning.circuit.library
:no-members:
:no-inherited-members:
:no-special-members:
6 changes: 6 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.connectors.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-connectors:

.. automodule:: qiskit_machine_learning.connectors
:no-members:
:no-inherited-members:
:no-special-members:
6 changes: 6 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.datasets.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-datasets:

.. automodule:: qiskit_machine_learning.datasets
:no-members:
:no-inherited-members:
:no-special-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-kernels-algorithms:

.. automodule:: qiskit_machine_learning.kernels.algorithms
:no-members:
:no-inherited-members:
:no-special-members:
6 changes: 6 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.kernels.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-kernels:

.. automodule:: qiskit_machine_learning.kernels
:no-members:
:no-inherited-members:
:no-special-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-neural_networks:

.. automodule:: qiskit_machine_learning.neural_networks
:no-members:
:no-inherited-members:
:no-special-members:
10 changes: 10 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
=====================================
Qiskit Machine Learning API Reference
=====================================

.. _qiskit-machine-learning:

.. automodule:: qiskit_machine_learning
:no-members:
:no-inherited-members:
:no-special-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-utils-loss_functions:

.. automodule:: qiskit_machine_learning.utils.loss_functions
:no-members:
:no-inherited-members:
:no-special-members:
6 changes: 6 additions & 0 deletions _sources/apidocs/qiskit_machine_learning.utils.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-machine-learning-utils:

.. automodule:: qiskit_machine_learning.utils
:no-members:
:no-inherited-members:
:no-special-members:
126 changes: 126 additions & 0 deletions _sources/getting_started.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
:orphan:

###############
Getting started
###############

Installation
============

Qiskit Machine Learning depends on Qiskit, which has its own
`Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__ detailing
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 Machine Learning.

Qiskit Machine Learning has some functions that have been made optional where the dependent code and/or
support program(s) are not (or cannot be) installed by default. Those are PyTorch and Sparse.
See :ref:`optional_installs` for more information.

.. tab-set::

.. 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>`__

In your virtual environment, where you installed Qiskit, install Qiskit Machine Learning as follows:

.. code:: sh
pip install qiskit-machine-learning
.. note::

As Qiskit Machine Learning depends on Qiskit, you can though simply install it into your
environment, as above, and pip will automatically install a compatible version of Qiskit
if one is not already installed.

.. tab-item:: Install from source

Installing Qiskit Machine Learning from source allows you to access the most recently
updated version under development instead of using the version in the Python Package
Index (PyPI) repository. This will give you the ability to inspect and extend
the latest version of the Qiskit Machine Learning code more efficiently.

Since Qiskit Machine Learning 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>`__

.. raw:: html

<h2>Installing Qiskit Machine Learning from Source</h2>

Using the same development environment that you installed Qiskit in you are ready to install
Qiskit Machine Learning.

1. Clone the Qiskit Machine Learning repository.

.. code:: sh
git clone https://github.com/qiskit-community/qiskit-machine-learning.git
2. Cloning the repository creates a local folder called ``qiskit-machine-learning``.

.. code:: sh
cd qiskit-machine-learning
3. If you want to run tests or linting checks, install the developer requirements.

.. code:: sh
pip install -r requirements-dev.txt
4. Install ``qiskit-machine-learning``.

.. code:: sh
pip install .
If you want to install it in editable mode, meaning that code changes to the
project don't require a reinstall to be applied, you can do this with:

.. code:: sh
pip install -e .
.. _optional_installs:

Optional installs
=================

* **PyTorch**, may be installed either using command ``pip install 'qiskit-machine-learning[torch]'`` to install the
package or refer to PyTorch `getting started <https://pytorch.org/get-started/locally/>`__. When PyTorch
is installed, the `TorchConnector` facilitates its use of quantum computed networks.

* **Sparse**, may be installed using command ``pip install 'qiskit-machine-learning[sparse]'`` to install the
package. Sparse being installed will enable the usage of sparse arrays/tensors.

----

Ready to get going?...
======================

.. raw:: html

<div class="tutorials-callout-container">
<div class="row">

.. qiskit-call-to-action-item::
:description: Find out about Qiskit Machine Learning.
:header: Dive into the tutorials
:button_link: ./tutorials/index.html
:button_text: Qiskit Machine Learning tutorials

.. raw:: html

</div>
</div>


.. Hiding - Indices and tables
:ref:`genindex`
:ref:`modindex`
:ref:`search`
89 changes: 89 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#####################################
Qiskit Machine Learning overview
#####################################

Overview
==============

Qiskit Machine Learning introduces fundamental computational building blocks - such as Quantum Kernels
and Quantum Neural Networks - used in different applications, including classification and regression.
On the one hand, this design is very easy to use and allows users to rapidly prototype a first model
without deep quantum computing knowledge. On the other hand, Qiskit Machine Learning is very flexible,
and users can easily extend it to support cutting-edge quantum machine learning research.

Qiskit Machine Learning provides the :class:`~qiskit_machine_learning.kernels.FidelityQuantumKernel`
class class that makes use of the :class:`~qiskit_algorithms.state_fidelities.BaseStateFidelity` algorithm
introduced in Qiskit and can be easily used to directly compute kernel matrices for given datasets
or can be passed to a Quantum Support Vector Classifier
(:class:`~qiskit_machine_learning.algorithms.QSVC`) or
Quantum Support Vector Regressor (:class:`~qiskit_machine_learning.algorithms.QSVR`)
to quickly start solving classification or regression problems.
It also can be used with many other existing kernel-based machine learning algorithms from established
classical frameworks.

Qiskit Machine Learning defines a generic interface for neural networks that is implemented by different
quantum neural networks. Two core implementations are readily provided, such as the
:class:`~qiskit_machine_learning.neural_networks.EstimatorQNN`
and the :class:`~qiskit_machine_learning.neural_networks.SamplerQNN`.
The :class:`~qiskit_machine_learning.neural_networks.EstimatorQNN` leverages
the :class:`~qiskit.primitives.BaseEstimator` primitive from Qiskit and allows users to combine
parametrized quantum circuits with quantum mechanical observables. The circuits can be constructed
using, for example, building blocks from Qiskit's circuit library, and the QNN's output is given
by the expected value of the observable.
The :class:`~qiskit_machine_learning.neural_networks.SamplerQNN` leverages another primitive
introduced in Qiskit, the :class:`~qiskit.primitives.BaseSampler` primitive. This neural network
translates quasi-probabilities of bitstrings estimated by the primitive into a desired output. This
translation step can be used to interpret a given bitstring in a particular context, e.g.
translating it into a set of classes.

The neural networks include the functionality to evaluate them for a given input as well as to compute the
corresponding gradients, which is important for efficient training. To train and use neural networks,
Qiskit Machine Learning provides a variety of learning algorithms such as the
:class:`~qiskit_machine_learning.algorithms.NeuralNetworkClassifier` and
:class:`~qiskit_machine_learning.algorithms.NeuralNetworkRegressor`.
Both take a QNN as input and then use it in a classification or regression context.
To allow an easy start, two convenience implementations are provided - the Variational Quantum Classifier
(:class:`~qiskit_machine_learning.algorithms.VQC`)
as well as the Variational Quantum Regressor (:class:`~qiskit_machine_learning.algorithms.VQR`).
Both take just a feature map and an ansatz and construct the underlying QNN automatically.

In addition to the models provided directly in Qiskit Machine Learning, it has the
:class:`~qiskit_machine_learning.connectors.TorchConnector`,
which allows users to integrate all of our quantum neural networks directly into the
`PyTorch <https://pytorch.org>`__
open source machine learning library. Thanks to Qiskit Algorithm's gradient algorithms,
this includes automatic
differentiation - the overall gradients computed by `PyTorch <https://pytorch.org>`__
during the backpropagation take into
account quantum neural networks, too. The flexible design also allows the building of connectors
to other packages in the future.



Next Steps
=================================

`Getting started <getting_started.html>`_

`Migration Guide <migration/index.html>`_

`Tutorials <tutorials/index.html>`_

.. toctree::
:hidden:

Overview <self>
Getting Started <getting_started>
Migration Guide <migration/index>
Tutorials <tutorials/index>
API Reference <apidocs/qiskit_machine_learning>
Release Notes <release_notes>
GitHub <https://github.com/qiskit-community/qiskit-machine-learning>



.. Hiding - Indices and tables
:ref:`genindex`
:ref:`modindex`
:ref:`search`
Loading

0 comments on commit 316a7a8

Please sign in to comment.