Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #511 from manoelmarques/stable-0.5.0
Browse files Browse the repository at this point in the history
Stable 0.5.0
  • Loading branch information
manoelmarques authored May 3, 2019
2 parents 7426e0c + c12a209 commit ca7c792
Show file tree
Hide file tree
Showing 455 changed files with 24,107 additions and 19,296 deletions.
57 changes: 42 additions & 15 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,46 @@ you need to have some libraries, which can be installed in this way:
pip install -r requirements.txt
pip install -r requirements-dev.txt
To install Qiskit Aqua locally, execute the following command from the `qiskit-aqua` root
directory on your machine:
To better contribute to Qiskit Aqua, we recommend that you clone the Qiskit Aqua repository
and then install Qiskit Aqua from source. This will give you the ability to inspect and extend
the latest version of the Aqua code more efficiently. The version of Qiskit Aqua in the repository's ``master``
branch is typically ahead of the version in the Python Package Index (PyPI) repository, and
we strive to always keep Aqua in sync with the development versions of the Qiskit elements,
each available in the ``master`` branch of the corresponding repository. Therefore,
all the Qiskit elements and relevant components should be installed from source. This can be
correctly achieved by first uninstalling them from the Python environment in which you
have Qiskit (if they were previously installed),
using the ``pip uninstall`` command for each of them. Next, clone the
`Qiskit Terra <https://github.com/Qiskit/qiskit-terra>`__, `Qiskit Aer <https://github.com/Qiskit/qiskit-aer>`__,
`Qiskit IBMQ Provider <https://github.com/Qiskit/qiskit-ibmq-provider>`__,
`Qiskit Ignis <https://github.com/Qiskit/qiskit-ignis>`__ and
`Qiskit Aqua <https://github.com/Qiskit/qiskit-aqua>`__ repositories and
install them in this order from source in the same Python environment.
Qiskit Terra, Qiskit IBMQ Provider and Qiskit Aqua can be installed by issuing the following commands
in the root directories of the repositoriy clones:

.. code:: sh
$ pip install -r requirements.txt
$ pip install -r requirements-dev.txt
$ pip install -e .
Installing Aqua will automatically install `Terra <https://github.com/Qiskit/qiskit-terra>`__
as one of its dependencies. We recommend that you also set up
`Aer <https://github.com/Qiskit/qiskit-aer>`__ to get more advanced simulators.
Refer to the installation instructions of both Terra and Aer for more details.
To install Qiskit Aer use:

.. code:: sh
$ pip install -r requirements-dev.txt
$ python3 setup.py bdist_wheel
$ cd dist
$ pip install qiskit_aer-<...>.whl
See the
`contribution guidelines of Qiskit Aer <https://github.com/Qiskit/qiskit-aer/blob/master/.github/CONTRIBUTING.md>`__
for more precise instructions.

Make sure to respect the order specified above: Qiskit Terra, Qiskit Aer, Qiskit IBMQ Provider, and Qiskit Aqua.
All the other dependencies will be installed automatically. This process may have to be repeated often
as the ``master`` branch of Aqua is updated frequently.

Style guide
~~~~~~~~~~~
Expand All @@ -197,22 +226,20 @@ your changes respect the style guidelines, run the next commands (all platforms)
Documentation
-------------

The documentation for the project is in the ``doc`` directory. The
documentation for the python SDK is auto-generated from python
docstrings using `Sphinx <http://www.sphinx-doc.org>`_ for generating the
documentation. Please follow `Google's Python Style
The documentation source code for the project is located in the ``docs`` directory of the general
`Qiskit repository <https://github.com/Qiskit/qiskit>`__ and automatically rendered on the
`Qiskit documentation Web site <https://qiskit.org/documentation/>`__. The
documentation for the Python SDK is auto-generated from Python
docstrings using `Sphinx <http://www.sphinx-doc.org>`_. Please follow `Google's Python Style
Guide <https://google.github.io/styleguide/pyguide.html?showone=Comments#Comments>`_
for docstrings. A good example of the style can also be found with
`sphinx's napolean converter
`Sphinx's napolean converter
documentation <http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html>`_.

To generate the documentation, we need to invoke CMake first in order to generate
To generate the documentation, you need to invoke CMake first in order to generate
all specific files for our current platform.
See the `instructions <https://github.com/Qiskit/qiskit-terra/blob/master/.github/CONTRIBUTING.rst#dependencies>`__
in the Terra repository for details on how to install and run CMake.
The docunentation can then be built using the instructions available in the
`docs folder's README file <../docs/README.md>`__.


Development Cycle
-----------------
Expand Down
27 changes: 0 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,6 @@ instance/

# Sphinx documentation
docs/_build/
docs/*.rst
#Allow
!docs/qiskit-aqua.rst
!docs/index.rst
!docs/aqua.rst
!docs/library.rst
!docs/overview.rst
!docs/installation.rst
!docs/execution.rst
!docs/extending.rst
!docs/algorithms.rst
!docs/optimizers.rst
!docs/variational_forms.rst
!docs/oracles.rst
!docs/iqfts.rst
!docs/initial_states.rst
!docs/feature_extractions.rst
!docs/aqua_chemistry_*.rst
!docs/aqua_ai.rst
!docs/aqua_optimization.rst
!docs/aqua_tutorials.rst
!docs/aqua_finance.rst
!docs/qiskit_aqua_chemistry.rst
!docs/random_distributions.rst
!docs/uncertainty_problems.rst
!docs/multiclass_extensions.rst
!docs/release_history.rst

# PyBuilder
target/
Expand Down
42 changes: 31 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Copyright 2018, IBM.
# This code is part of Qiskit.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

notifications:
on_success: change
Expand Down Expand Up @@ -29,21 +36,34 @@ stage_dependencies: &stage_dependencies
- g++-7

before_install:
- |
INIT_FILE="$TRAVIS_BUILD_DIR/qiskit/__init__.py"
if [ -f $INIT_FILE ]; then
# stops travis if __init__.py exists under qiskit
echo "File '$INIT_FILE' found. It should not exist, since this repo extends qiskit namespace.";
travis_terminate 1;
fi
- pip install --upgrade pip setuptools wheel
# download Qiskit Terra master and unzip it only if forced from master or not stable branch, otherwise use the pypi version
- |
if [ ${MASTER_BRANCH_DEPENDENCIES} = "true" ] || [ ${TRAVIS_BRANCH} != "stable" ]; then
# Download github Terra
wget https://codeload.github.com/Qiskit/qiskit-terra/zip/master -O /tmp/qiskit-terra.zip
unzip /tmp/qiskit-terra.zip -d /tmp/
# Install Qiskit Terra requirements.
pip install -U -r /tmp/qiskit-terra-master/requirements.txt
pip install -U -r /tmp/qiskit-terra-master/requirements-dev.txt
pip install -U -r /tmp/qiskit-terra-master/requirements-dev.txt --progress-bar off
# Install local Qiskit Terra
pip install -e /tmp/qiskit-terra-master
pip install -e /tmp/qiskit-terra-master --progress-bar off
# Download github Ignis
wget https://codeload.github.com/Qiskit/qiskit-ignis/zip/master -O /tmp/qiskit-ignis.zip
unzip /tmp/qiskit-ignis.zip -d /tmp/
# Install local Qiskit Ignis
pip install -e /tmp/qiskit-ignis-master --progress-bar off
fi
install:
# install Aqua and dev requirements
- pip install -e $TRAVIS_BUILD_DIR
- pip install -U -r requirements-dev.txt
# install Aqua and dev requirements
- pip install -e $TRAVIS_BUILD_DIR --progress-bar off
- pip install -U -r requirements-dev.txt --progress-bar off

# Define the order of the stages.
stages:
Expand All @@ -55,9 +75,9 @@ jobs:
- stage: test first half
<<: *stage_dependencies
script:
- python test/customtests.py 0 -end 21
- python test/custom_tests.py 0 -end 34

- stage: test second half
<<: *stage_dependencies
script:
- python test/customtests.py 21
- python test/custom_tests.py 34
75 changes: 71 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,80 @@ The format is based on `Keep a Changelog`_.
`UNRELEASED`_
=============

`0.5.0`_ - 2019-05-02
=====================

Added
-----

- Implementation of the HHL algorithm supporting ``LinearSystemInput``.
- Pluggable component ``Eigenvalues`` with variant ``EigQPE``.
- Pluggable component ``Reciprocal`` with variants ``LookupRotation`` and ``LongDivision``.
- Multiple-Controlled U1 and U3 operations ``mcu1`` and ``mcu3``.
- Pluggable component ``QFT`` derived from component ``IQFT``.
- Summarize the transpiled circuits at the DEBUG logging level.
- ``QuantumInstance`` accepts ``basis_gates`` and ``coupling_map`` again.
- Support to use ``cx`` gate for the entangement in ``RY`` and ``RYRZ`` variational form. (``cz`` is the default choice.)
- Support to use arbitrary mixer Hamiltonian in ``QAOA``. This allows to use QAOA in constrained optimization problems [arXiv:1709.03489].
- Added variational algorithm base class ``VQAlgorithm``, implemented by ``VQE`` and ``QSVMVariational``.
- Added ``ising/docplex.py`` for automatically generating Ising Hamiltonian from optimization models of DOcplex.
- Added ``'basic-dirty-ancilla'`` mode for ``mct``.
- Added ``mcmt`` for Multi-Controlled, Multi-Target gate.
- Exposed capabilities to generate circuits from logical AND, OR, DNF (disjunctive normal forms), and CNF (conjunctive normal forms) formulae.
- Added the capability to generate circuits from ESOP (exclusive sum of products) formulae with optional optimization based on Quine-McCluskey and ExactCover.
- Added ``LogicalExpressionOracle`` for generating oracle circuits from arbitrary boolean logic expressions (including DIMACS support) with optional optimization capability.
- Added ``TruthTableOracle`` for generating oracle circuits from truth-tables with optional optimization capability.
- Added ``CustomCircuitOracle`` for generating oracle from user specified circuits.
- Added implementation of the Deutsch-Jozsa algorithm.
- Added implementation of the Bernstein-Vazirani algorithm.
- Added implementation of the Simon's algorithm.
- Added implementation of the Shor's algorithm.
- Added optional capability for ``Grover``'s algorithm to take a custom initial state (as opposed to the default uniform superposition)
- Added capability to create a ``Custom`` initial state using existing circuit.
- Added the ADAM (and AMSGRAD) optimization algorithm
- Multivariate distributions added, so uncertainty models now have univariate and multivariate distribution components.
- Added option to include or skip the swaps operations for qft and iqft circuit constructions.
- Added classical linear system solver ``ExactLSsolver``.
- Added parameters ``auto_hermitian`` and ``auto_resize`` to ``HHL`` algorithm to support non-hermititan and non 2**n sized matrices by default.
- Added another feature map, ``RawFeatureVector``, that directly maps feature vectors to qubits' states for classification.
- ``SVM_Classical`` can now load models trained by ``QSVM``.
- Added CompleteMeasFitter for mitigating measurement error when jobs are run on a real device or noise simulation.

Removed
-------

- ``QuantumInstance`` does not take ``memory`` anymore.
- Moved Command line and GUI interfaces to separate repo (qiskit_aqua_uis).
- Removed the ``SAT``-specific oracle (now supported by ``LogicalExpressionOracle``).


Changed
-------

- Changed the type of ``entanger_map`` used in ``FeatureMap`` and ``VariationalForm`` to list of list.
- Fixed package setup to correctly identify namespace packages using ``setuptools.find_namespace_packages``.
- Changed ``advanced`` mode implementation of ``mct``: using simple ``h`` gates instead of ``ch``, and fixing the old recursion step in ``_multicx``.
- Components ``random_distributions`` renamed to ``uncertainty_models``.
- Reorganized the constructions of various common gates (``ch``, ``cry``, ``mcry``, ``mct``, ``mcu1``, ``mcu3``, ``mcmt``, ``logic_and``, and ``logic_or``) and circuits (``PhaseEstimationCircuit``, ``BooleanLogicCircuits``, ``FourierTransformCircuits``, and ``StateVectorCircuits``) under the ``circuits`` directory.
- Renamed the algorithm ``QSVMVariational`` to ``VQC``, which stands for Variational Quantum Classifier.
- Renamed the algorithm ``QSVMKernel`` to ``QSVM``.
- Renamed the class ``SVMInput`` to ``ClassificationInput``.
- Renamed problem type ``'svm_classification'`` to ``'classification'``

Fixed
-----

- Fixed ``ising/docplex.py`` to correctly multiply constant values in constraints


`0.4.1`_ - 2019-01-09
=====================

Added
-----

- Optimizers now have most relevant options on constructor for ease of programming. Options may still be set via set_options.
- Provider is now explicilty named and the named backend is created from that named provider. Backend being selected from the first of the internally known set of providers is deprecated.
- Provider is now explicitly named and the named backend is created from that named provider. Backend being selected from the first of the internally known set of providers is deprecated.
- Improve operation with Aer provider/backends.
- Registration to Aqua of externally provided pluggable algorithms and components altered to setuptools entry point support for plugins. The prior registration mechanism has been removed.
- A flag ``before_04`` in the ``load_from_dict(file)`` method is added to support to load operator in the old format. We encourage to save the operator in the new format from now on.
Expand All @@ -44,11 +110,11 @@ Added
- Transparent parallelization for gradient-based optimizers
- Multiple-Controlled-NOT (cnx) operation
- Pluggable algorithmic component ``RandomDistribution``
- Concrete implementations of ``RandomDistribution``: ``BernoulliDistribution``, ``LogNormalDistribution``,
- Concrete implementations of ``RandomDistribution``: ``BernoulliDistribution``, ``LogNormalDistribution``,
``MultivariateDistribution``, ``MultivariateNormalDistribution``, ``MultivariateUniformDistribution``, ``NormalDistribution``,
``UniformDistribution``, and ``UnivariateDistribution``
- Pluggable algorithmic component:
- Concrete implementations of ``UncertaintyProblem``: ``FixedIncomeExpectedValue``, ``EuropeanCallExpectedValue``, and
- Concrete implementations of ``UncertaintyProblem``: ``FixedIncomeExpectedValue``, ``EuropeanCallExpectedValue``, and
``EuropeanCallDelta``
- Amplitude Estimation algorithm
- Qiskit Optimization: New Ising models for optimization problems exact cover, set packing, vertex cover, clique, and graph partition
Expand Down Expand Up @@ -187,7 +253,8 @@ Changed
- Updated qiskit minimum version in setup.py.
- Fixed links in readme.me.

.. _UNRELEASED: https://github.com/Qiskit/qiskit-aqua/compare/0.4.1...HEAD
.. _UNRELEASED: https://github.com/Qiskit/qiskit-aqua/compare/0.5.0...HEAD
.. _0.5.0: https://github.com/Qiskit/qiskit-aqua/compare/0.4.1...0.5.0
.. _0.4.1: https://github.com/Qiskit/qiskit-aqua/compare/0.4.0...0.4.1
.. _0.4.0: https://github.com/Qiskit/qiskit-aqua/compare/0.3.1...0.4.0
.. _0.3.1: https://github.com/Qiskit/qiskit-aqua/compare/0.3.0...0.3.1
Expand Down
11 changes: 9 additions & 2 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,34 @@ levels:

- `Panagiotis Barkoutsos <https://researcher.watson.ibm.com/researcher/view.php?person=zurich-BPA>`__
- Sergey Bravyi
- David Bucher
- Chun-Fu (Richard) Chen
- `Antonio Córcoles-Gonzalez <https://researcher.watson.ibm.com/researcher/view.php?person=us-adcorcol>`__
- Albert Frisch
- `Jay Gambetta <https://researcher.watson.ibm.com/researcher/view.php?person=us-jay.gambetta>`__
- Jennifer Glick
- `Donny Greenberg <https://researcher.watson.ibm.com/researcher/view.php?person=ibm-donny>`__
- Tanvi Gujarati
- Isabel Haide
- `Shaohan Hu <https://researcher.watson.ibm.com/researcher/view.php?person=ibm-Shaohan.Hu>`__
- `Takashi Imamichi <https://researcher.watson.ibm.com/researcher/view.php?person=jp-IMAMICHI>`__
- Tal Kachman
- `Gawel Kus <https://www.tudelft.nl/en/ae/organisation/departments/aerospace-structures-and-materials/novel-aerospace-materials/people/personal-pages-novam/students/g-kus-gawel/>`__
- `Peng Liu <https://researcher.watson.ibm.com/researcher/view.php?person=us-liup>`__
- `Jakub Marecek <http://researcher.ibm.com/person/ie-jakub.marecek>`__
- Manoel Marques
- `Martin Mevissen <https://researcher.watson.ibm.com/researcher/view.php?person=ie-MARTMEVI>`__
- Antonio Mezzacapo
- `Nikolaj Moll <https://researcher.watson.ibm.com/researcher/view.php?person=zurich-NIM>`__
- Jan Müggenburg
- `Giacomo Nannicini <https://researcher.watson.ibm.com/researcher/view.php?person=us-nannicini>`__
- Pauline Ollitrault
- `Anna Phan <https://researcher.watson.ibm.com/researcher/view.php?person=au1-anna.phan>`__
- `Marco Pistoia <https://researcher.watson.ibm.com/researcher/view.php?person=us-pistoia>`__
- `Julia Rice <https://researcher.watson.ibm.com/researcher/view.php?person=us-jrice>`__
- `Raymond Harry Putra Rudy <https://researcher.watson.ibm.com/researcher/view.php?person=jp-RUDYHAR>`__
- `Kanav Setia <https://physics.dartmouth.edu/people/kanav-setia>`__
- `Andrea Simonetto <https://researcher.watson.ibm.com/researcher/view.php?person=ibm-Andrea.Simonetto>`__
- Igor Sokolov
- `Ivano Tavernelli <https://researcher.watson.ibm.com/researcher/view.php?person=zurich-ITA>`__
- `Stephen Wood <https://researcher.watson.ibm.com/researcher/view.php?person=us-woodsp>`__
- `Stefan Woerner <https://researcher.watson.ibm.com/researcher/view.php?person=zurich-wor>`__
- `Christa Zoufal <https://researcher.watson.ibm.com/researcher/view.php?person=zurich-OUF>`__
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
recursive-include qiskit_aqua *.json
recursive-include qiskit_aqua_ui *.json
recursive-include qiskit/aqua *.json *.txt
31 changes: 0 additions & 31 deletions Makefile

This file was deleted.

Loading

0 comments on commit ca7c792

Please sign in to comment.