diff --git a/CHANGELOG.md b/CHANGELOG.md index ec99b9ab8e..1b828e15a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,11 +24,11 @@ Added - NFT optimizer, part of a project of Qiskit Camp Asia 2019 (#729) - Algorithm interface and result classes (#849) - Chemistry FCIDump file driver (#859) -- Chemistry stack automatic Z2 symmetry reduction (#870) -- Ising Optimization: The 0-1 Knapsack problem (#878) +- Automatic Z2 symmetry reduction in the chemistry module (#870) +- Ising optimization: The 0-1 Knapsack problem (#878) - VQE, VQC and QSVM accept `QuantumCircuit`s as variational forms/feature maps (#905) - New `GSLS` (Gaussian Smoothing Line Search) optimizer for variational algorithms (#877) -- Qiskit optimization, an application stack for solving quadratic programs (#877) +- Qiskit's optimization module: a full toolset for solving quadratic programs (#877) - QuadraticProblem: A class representing quadratic programs with quadratic and linear objective and constraints - OptimizationAlgorithm: A base class for optimization algorithm - OptimizationResult: A base class for optimization results diff --git a/README.md b/README.md index a1bfb730fa..9d36c2be7b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Aqua includes domain application support for: * [Machine Learning](#machine-learning) * [Optimization](#optimization) -_**Note**: the Chemistry application stack was the first domain worked on. At the time of writing +_**Note**: the chemistry module was the first domain worked on. At the time of writing the other domains have some logic in them but are not as fully realised. Future work is expected to build out functionality in all application areas._ @@ -143,16 +143,16 @@ excited states and dipole moments of molecule, both open and closed-shell. The code comprises chemistry drivers, which when provided with a molecular configuration will return one and two-body integrals as well as other data that is efficiently computed classically. This output data from a driver can then be used as input to the chemistry -application stack that contains logic which is able to translate this into a form that is suitable +module that contains logic which is able to translate this into a form that is suitable for quantum algorithms. The conversion first creates a FermionicOperator which must then be mapped, e.g. by a Jordan Wigner mapping, to a qubit operator in readiness for the quantum computation. ### Optional Installs -To run chemistry experiments using Qiskit Chemistry, it is recommended that you to install a -classical computation chemistry software program/library interfaced by Qiskit Chemistry. +To run chemistry experiments using Qiskit's chemistry module, it is recommended that you to install +a classical computation chemistry software program/library interfaced by Qiskit. Several, as listed below, are supported, and while logic to interface these programs is supplied by -Qiskit Chemistry via the above pip installation, the dependent programs/libraries themselves need +the chemistry module via the above pip installation, the dependent programs/libraries themselves need to be installed separately. Note: As `PySCF` can be installed via pip the installation of Qiskit (Aqua) will install PySCF @@ -166,8 +166,8 @@ whether this might be possible manually. ### HDF5 Driver -A useful functionality integrated into Qiskit Chemistry is its ability to serialize a file in -Hierarchical Data Format 5 (HDF5) format representing all the output data from a chemistry driver. +A useful functionality integrated into Qiskit's chemistry module is its ability to serialize a file +in hierarchical Data Format 5 (HDF5) format representing all the output data from a chemistry driver. The [HDF5 driver](qiskit/chemistry/drivers/hdf5d/hdf5driver.py#L25) accepts such such HDF5 files as input so molecular experiments can be run, albeit on the fixed data @@ -182,9 +182,9 @@ repository. This [HDF5 Driver tutorial](https://github.com/Qiskit/qiskit-community-tutorials/blob/master/chemistry/hdf5_files_and_driver.ipynb) contains further information about creating and using such HDF5 files. -### Creating Your First Qiskit Chemistry Programming Experiment +### Creating Your First Chemistry Programming Experiment in Qiskit -Now that Qiskit is installed, it's time to begin working with Chemistry. +Now that Qiskit is installed, it's time to begin working with the chemistry module. Let's try a chemistry application experiment using VQE (Variational Quantum Eigensolver) algorithm to compute the ground-state (minimum) energy of a molecule. @@ -255,7 +255,7 @@ of the circuits. By passing in a backend as is done above it is internally wrapp ### Further examples -Jupyter notebooks containing further examples, for Qiskit Chemistry, may be found in the +Jupyter notebooks containing further chemistry examples may be found in the following Qiskit GitHub repositories at [qiskit-iqx-tutorials/qiskit/advanced/aqua/chemistry](https://github.com/Qiskit/qiskit-iqx-tutorials/tree/master/qiskit/advanced/aqua/chemistry) and @@ -269,9 +269,9 @@ The `qiskit.finance` package contains uncertainty components for stock/securitie Ising translators for portfolio optimizations and data providers to source real or random data to finance experiments. -### Creating Your First Qiskit Finance Programming Experiment +### Creating Your First Finance Programming Experiment in Qiskit -Now that Qiskit is installed, it's time to begin working with Finance. +Now that Qiskit is installed, it's time to begin working with the finance module. Let's try a experiment using Amplitude Estimation algorithm to evaluate a fixed income asset with uncertain interest rates. @@ -305,7 +305,7 @@ When running the above the estimated value result should be 2.46 and probability ### Further examples -Jupyter notebooks containing further examples, for Qiskit Finance, may be found in the +Jupyter notebooks containing further finance examples may be found in the following Qiskit GitHub repositories at [qiskit-iqx-tutorials/qiskit/advanced/aqua/finance](https://github.com/Qiskit/qiskit-iqx-tutorials/tree/master/qiskit/advanced/aqua/finance) and @@ -320,7 +320,7 @@ classification algorithms such as QSVM and VQC (Variational Quantum Classifier), can be used for experiments, and there is also QGAN (Quantum Generative Adversarial Network) algorithm. -### Creating Your First Qiskit Machine Learning Programming Experiment +### Creating Your First Machine Learning Programming Experiment in Qiskit Now that Qiskit is installed, it's time to begin working with Machine Learning. Let's try a experiment using VQC (Variational Quantum Classified) algorithm to @@ -359,7 +359,7 @@ print('Testing accuracy: {:0.2f}'.format(result['testing_accuracy'])) ### Further examples -Jupyter notebooks containing further examples, for Qiskit Machine Learning, may be found in the +Jupyter notebooks containing further Machine Learning examples may be found in the following Qiskit GitHub repositories at [qiskit-iqx-tutorials/qiskit/advanced/aqua/machine_learning](https://github.com/Qiskit/qiskit-iqx-tutorials/tree/master/qiskit/advanced/aqua/machine_learning) and @@ -376,9 +376,9 @@ as Max-Cut, Traveling Salesman and Vehicle Routing. It also has a has an automat generator for a problem model specified by the user as a model in [docplex](qiskit/optimization/ising/docplex.py#L16). -### Creating Your First Qiskit Optimization Programming Experiment +### Creating Your First Optimization Programming Experiment in Qiskit -Now that Qiskit is installed, it's time to begin working with Optimization. +Now that Qiskit is installed, it's time to begin working with the optimization module. Let's try a optimization experiment using QAOA (Quantum Approximate Optimization Algorithm) to compute the solution of a [Max-Cut](https://en.wikipedia.org/wiki/Maximum_cut) problem using a docplex model to create the Ising Hamiltonian operator for QAOA. @@ -438,7 +438,7 @@ print('solution objective:', max_cut.max_cut_value(x, w)) ### Further examples -Jupyter notebooks containing further examples, for Qiskit Optimization, may be found in the +Jupyter notebooks containing further examples, for the optimization module, may be found in the following Qiskit GitHub repositories at [qiskit-iqx-tutorials/qiskit/advanced/aqua/optimization](https://github.com/Qiskit/qiskit-iqx-tutorials/tree/master/qiskit/advanced/aqua/optimization) and diff --git a/qiskit/chemistry/README.md b/qiskit/chemistry/README.md index c1bc0bcd78..b96b75a5ee 100644 --- a/qiskit/chemistry/README.md +++ b/qiskit/chemistry/README.md @@ -1,14 +1,15 @@ -# Qiskit Chemistry +# Chemistry In Qiskit -Qiskit Chemistry is a set of tools, algorithms and software for use with quantum computers +Qiskit's chemistry module is a set of tools, algorithms and software for use with quantum computers to carry out research and investigate how to take advantage of quantum computing power to solve chemistry problems. If you need introductory material see the main [readme](../../README.md) which has -[installation](../../README.md#installation) instructions and information on how to use Qiskit Chemistry for +[installation](../../README.md#installation) instructions and information on how to use the +chemisty module for [running a chemistry experiment](../../README.md#running-a-chemistry-experiment). -This readme contains the following sections: +This readme contains the following sections: * [Developers](#developers) * [Additional reading](#additional-reading) @@ -29,32 +30,32 @@ The dictionary contains the following fields of note: * *energies* An array of energies comprising the ground state energy and any excited states if they were computed - + * *nuclear_repulsion_energy* - The nuclear repulsion energy - + The nuclear repulsion energy + * *hf_energy* The Hartree-Fock ground state energy as computed by the driver - + * *nuclear_dipole_moment*, *electronic_dipole_moment*, *dipole_moment* Nuclear, electronic and combined dipole moments for x, y and z - + * *total_dipole_moment* - Total dipole moment - -* *algorithm_retvals* + Total dipole moment + +* *algorithm_retvals* - The result dictionary of the algorithm that ran for the above values. See the algorithm for any further information. + The result dictionary of the algorithm that ran for the above values. See the algorithm for any further information. ### For writers of algorithms and other utilities such as optimizers and variational forms: -Qiskit Aqua is the library of cross-domain algorithms and utilities. Please refer to the documentation +Qiskit Aqua is the library of cross-domain algorithms and utilities. Please refer to the documentation there for more information on how to write and contribute such objects to Qiskit Aqua. Such objects are then available -to be used by Qiskit Chemistry. +to be used by Qiskit's chemistry module. ### For unit test writers: diff --git a/qiskit/chemistry/__init__.py b/qiskit/chemistry/__init__.py index fe496fb816..4c094e3d69 100644 --- a/qiskit/chemistry/__init__.py +++ b/qiskit/chemistry/__init__.py @@ -12,19 +12,19 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. r""" -============================================================== -Chemistry application stack for Aqua (:mod:`qiskit.chemistry`) -============================================================== +=================================================== +Qiskit's chemistry module (:mod:`qiskit.chemistry`) +=================================================== .. currentmodule:: qiskit.chemistry -This is the chemistry application stack for Aqua that provides for experimentation with chemistry +This is Qiskit's chemistry module that provides for experimentation with chemistry domain problems such as ground state energy and excited state energies of molecules. Overview ======== -This is an overview of the workings of the chemistry stack and how it may be used. There +This is an overview of the workings of the chemistry module and how it may be used. There are different levels of exposure to its functionality, allowing for experimentation at different abstractions. The outline below starts with the flow that provides the most control of the process. @@ -78,7 +78,8 @@ Mappings ++++++++ -To map the FermionicOperator to a qubit operator Qiskit Chemistry supports the following mappings: +To map the FermionicOperator to a qubit operator the chemistry module supports the following +mappings: Jordan Wigner The `Jordan-Wigner transformation `__, diff --git a/qiskit/chemistry/_logging.py b/qiskit/chemistry/_logging.py index 4f5622d3df..c12d4ab789 100644 --- a/qiskit/chemistry/_logging.py +++ b/qiskit/chemistry/_logging.py @@ -21,8 +21,7 @@ def get_qiskit_chemistry_logging() -> int: - """ - Returns the current Qiskit Chemistry logging level + """Returns the current Qiskit chemistry logging level Returns: int: logging level @@ -31,8 +30,7 @@ def get_qiskit_chemistry_logging() -> int: def set_qiskit_chemistry_logging(level: int, filepath: Optional[str] = None) -> None: - """ - Updates the Qiskit Chemistry logging with the appropriate logging level + """Updates the Qiskit chemistry logging with the appropriate logging level Args: level: minimum severity of the messages that are displayed. diff --git a/qiskit/chemistry/drivers/__init__.py b/qiskit/chemistry/drivers/__init__.py index 15bac51925..a0de442ed6 100644 --- a/qiskit/chemistry/drivers/__init__.py +++ b/qiskit/chemistry/drivers/__init__.py @@ -17,13 +17,13 @@ ========================================================= .. currentmodule:: qiskit.chemistry.drivers -Qiskit Chemistry requires a computational chemistry program or library, accessed via a chemistry -*driver*, to be installed on the system for the electronic-structure computation of a given -molecule. A driver is created with a molecular configuration, passed in the format compatible with -that particular driver. This allows custom configuration specific to each computational chemistry -program or library to be passed. +Qiskit's chemistry module requires a computational chemistry program or library, accessed via a +chemistry *driver*, to be installed on the system for the electronic-structure computation of a +given molecule. A driver is created with a molecular configuration, passed in the format compatible +with that particular driver. This allows custom configuration specific to each computational +chemistry program or library to be passed. -Qiskit Chemistry thus allows the user to configure a chemistry problem in a way that a chemist +The chemistry module thus allows the user to configure a chemistry problem in a way that a chemist already using the underlying chemistry program or library will be familiar with. The driver is used to compute some intermediate data, which later will be used to form the input to an Aqua algorithm. Such intermediate data, is populated into a :class:`~qiskit.chemistry.QMolecule` @@ -39,8 +39,8 @@ used to compute it. However the values and level of accuracy of such data will depend on the underlying chemistry program or library used by the specific driver. -Qiskit Chemistry offers the option to serialize the Qmolecule data in a binary format known as -`Hierarchical Data Format 5 (HDF5) `__. +Qiskit's chemistry module offers the option to serialize the Qmolecule data in a binary format known +as `Hierarchical Data Format 5 (HDF5) `__. This is done to allow chemists to reuse the same input data in the future and to enable researchers to exchange input data with each other --- which is especially useful to researchers who may not have particular computational chemistry drivers installed on their computers. @@ -68,7 +68,7 @@ Drivers ======= -Qiskit Chemistry drivers obtain their information from classical ab-initio programs +The drivers in the chemistry module obtain their information from classical ab-initio programs or libraries. Several drivers, interfacing to common programs and libraries, are available. To use the driver its dependent program/library must be installed. See the relevant installation instructions below for your program/library that you intend diff --git a/qiskit/chemistry/drivers/_basedriver.py b/qiskit/chemistry/drivers/_basedriver.py index 3e5b455376..43452b7e80 100644 --- a/qiskit/chemistry/drivers/_basedriver.py +++ b/qiskit/chemistry/drivers/_basedriver.py @@ -37,7 +37,7 @@ class HFMethodType(Enum): class BaseDriver(ABC): """ - Base class for Qiskit Chemistry Drivers. + Base class for Qiskit's chemistry drivers. """ @abstractmethod diff --git a/qiskit/chemistry/drivers/gaussiand/__init__.py b/qiskit/chemistry/drivers/gaussiand/__init__.py index 651a58995d..e570fdc559 100644 --- a/qiskit/chemistry/drivers/gaussiand/__init__.py +++ b/qiskit/chemistry/drivers/gaussiand/__init__.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2018, 2019. +# (C) Copyright IBM 2018, 2020. # # 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 @@ -26,7 +26,7 @@ `Gaussian product installation support `__. Following the installation make sure the Gaussian™ 16 executable, `g16`, can be run from the -command line environment where you will be running Python and Qiskit Chemistry. For example +command line environment where you will be running Python and Qiskit. For example verifying that the `g16` executable is reachable via the system environment path, and appropriate exports, such as `GAUSS_EXEDIR`, have been configured as per `Gaussian product installation support `__. @@ -36,27 +36,27 @@ In the :mod:`gauopen` folder the Python part of the above interfacing code, -as needed by Qiskit Chemistry, has been made available. It is licensed under a +as needed by Qiskit's chemistry modules, has been made available. It is licensed under a `Gaussian Open-Source Public License `_. Part of this interfacing code --- specifically, the Fortran file `qcmatrixio.F` --- requires -compilation to a Python native extension. However, Qiskit Chemistry comes with pre-built binaries +compilation to a Python native extension. However, Qiskit comes with pre-built binaries for most common platforms. If there is no pre-built binary matching your platform, then it will be necessary to compile this file as per the instructions below. Compiling the Fortran Interfacing Code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If no prebuilt native extension binary, as supplied with Qiskit Chemistry, works for your +If no prebuilt native extension binary, as supplied with Qiskit, works for your platform, then to use the Gaussian™ 16 driver on your machine, the Fortran file `qcmatrixio.F` must be compiled into object code that can be used by Python. This is accomplished using the `Fortran to Python Interface Generator (F2PY) `__, which is part of the `NumPy `__ Python library. Specifically, on your command prompt window, change directory to the -`qiskit/chemistry/drivers/gaussiand/gauopen` directory inside the Qiskit Chemistry -installation directory, and while in the Python environment created for Aqua and Qiskit Chemistry, -invoke `f2py` on `qcmatrixio.F` as explained below. +`qiskit/chemistry/drivers/gaussiand/gauopen` directory inside the Qiskit +installation directory, and while in the Python environment created for Aqua and the chemistry +module, invoke `f2py` on `qcmatrixio.F` as explained below. Apple macOS and Linux @@ -93,7 +93,7 @@ and that `~/.gaussian` is the full path to the selected scratch folder, where Gaussian™ 16 stores its temporary files. - Now, before Qiskit Chemistry can properly interface Gaussian™ 16, you will have to run the + Now, before Qiskit can properly interface Gaussian™ 16, you will have to run the `enable_gaussian` command defined above. This, however, may generate the following error: .. code:: sh diff --git a/qiskit/chemistry/drivers/psi4d/__init__.py b/qiskit/chemistry/drivers/psi4d/__init__.py index 315678dc4c..5184165108 100644 --- a/qiskit/chemistry/drivers/psi4d/__init__.py +++ b/qiskit/chemistry/drivers/psi4d/__init__.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2018, 2019. +# (C) Copyright IBM 2018, 2020. # # 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 @@ -16,10 +16,10 @@ PSI4 Installation ================= `PSI4 `__ is an open-source program for computational chemistry. -In order for Qiskit Chemistry to interface PSI4, i.e. execute PSI4 to extract +In order for Qiskit's chemistry module to interface PSI4, i.e. execute PSI4 to extract the electronic structure information necessary for the computation of the input to the quantum algorithm, PSI4 must be `installed `__ and discoverable on -the system where Qiskit Chemistry is also installed. +the system where Qiskit's chemistry module is also installed. Therefore, once PSI4 has been installed, the `psi4` executable must be reachable via the system environment path. For example, on macOS, this can be achieved by adding the following section to @@ -31,8 +31,8 @@ alias enable_psi4='export PATH=/Users/username/psi4conda/bin:$PATH' where `username` should be replaced with the user's account name. -In order for Qiskit Chemistry to discover PSI4 at run time, it is then necessary to execute the -`enable_psi4` command before launching Qiskit Chemistry. +In order for the chemistry module to discover PSI4 at run time, it is then necessary to execute the +`enable_psi4` command before launching Qiskit. """ diff --git a/qiskit/chemistry/drivers/pyquanted/__init__.py b/qiskit/chemistry/drivers/pyquanted/__init__.py index f1c3621c14..1d2d155909 100644 --- a/qiskit/chemistry/drivers/pyquanted/__init__.py +++ b/qiskit/chemistry/drivers/pyquanted/__init__.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2018, 2019 +# (C) Copyright IBM 2018, 2020 # # 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 @@ -16,24 +16,24 @@ PyQuante Installation ===================== `PyQuante `__ is an open-source library for computational -chemistry. Qiskit Chemistry specifically requires PyQuante V2, also known as PyQuante2. -In order for Qiskit Chemistry to interface PyQuante and execute +chemistry. Qiskit's chemistry module specifically requires PyQuante V2, also known as PyQuante2. +In order for Qiskit to interface PyQuante and execute PyQuante to extract the electronic structure information PyQuante2 must be installed and -discoverable on the system where Qiskit Chemistry is also installed. +discoverable on the system where the Qiskit chemistry module is also installed. Installing PyQuante2 according to the `installation instructions `__ while -in the Python virtual environment where Qiskit Chemistry has also been installed will automatically -make PyQuante2 dynamically discovered by Qiskit Chemistry at run time. If you are not using +in the Python virtual environment where Qiskit's chemistry module has also been installed will +automatically make PyQuante2 dynamically discovered by Qiskit at run time. If you are not using conda then alternatively you can git clone or download/unzip a zip of the repository and run pip install off the setup.py that is there. .. note:: - Like all the other drivers currently interfaced by Qiskit Chemistry, - PyQuante2 provides enough intermediate data for Qiskit Chemistry to compute a molecule's ground + Like all the other drivers currently interfaced by the chemistry module, + PyQuante2 provides enough intermediate data for Qiskit to compute a molecule's ground state molecular energy. However, unlike the other drivers, the data computed by PyQuante is - not sufficient for Qiskit Chemistry to compute a molecule's dipole moment. Therefore, PyQuante - is currently the only driver interfaced by Qiskit Chemistry that does not allow for the + not sufficient for Qiskit to compute a molecule's dipole moment. Therefore, PyQuante + is currently the only driver interfaced by Qiskit's chemistry module that does not allow for the computation of a molecule's dipole moment. """ diff --git a/qiskit/chemistry/drivers/pyscfd/__init__.py b/qiskit/chemistry/drivers/pyscfd/__init__.py index 5083e45646..9bced21601 100644 --- a/qiskit/chemistry/drivers/pyscfd/__init__.py +++ b/qiskit/chemistry/drivers/pyscfd/__init__.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2018, 2019. +# (C) Copyright IBM 2018, 2020. # # 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 @@ -16,13 +16,13 @@ PYSCF Installation ================== `PySCF `__ is an open-source library for computational chemistry. -In order for Qiskit Chemistry to interface PySCF and execute PySCF to +In order for Qiskit's chemistry module to interface PySCF and execute PySCF to extract the electronic structure information PySCF must be installed. According to the `PySCF installation instructions `__, the preferred installation method is via the pip package management system. Doing so, -while in the Python virtual environment where Qiskit Chemistry is also installed, will automatically -make PySCF available to Qiskit Chemistry at run time. +while in the Python virtual environment where Qiskit's chemistry module is also installed, will +automatically make PySCF available to Qiskit at run time. Note: `PySCF` is automatically installed for `macOS` and `Linux` platforms when Qiskit is installed via the pip package management system. diff --git a/qiskit/chemistry/mp2info.py b/qiskit/chemistry/mp2info.py index ada6f5eb7a..edf593773c 100644 --- a/qiskit/chemistry/mp2info.py +++ b/qiskit/chemistry/mp2info.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2019. +# (C) Copyright IBM 2019, 2020. # # 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 @@ -30,7 +30,7 @@ class MP2Info: All the computations are done using the molecule orbitals but the indexes used in the excitation information passed in and out are in the block spin orbital - numbering as normally used by the chemistry stack. + numbering as normally used by the chemistry module. """ def __init__(self, qmolecule, threshold=1e-12): diff --git a/qiskit/chemistry/qmolecule.py b/qiskit/chemistry/qmolecule.py index f862ea2ead..9a906a4572 100644 --- a/qiskit/chemistry/qmolecule.py +++ b/qiskit/chemistry/qmolecule.py @@ -383,7 +383,7 @@ def remove_file(self, file_name=None): except OSError: pass - # Utility functions to convert integrals into the form expected by QiskitChemistry stack + # Utility functions to convert integrals into the form expected by Qiskit's chemistry module @staticmethod def oneeints2mo(ints, moc): diff --git a/qiskit/finance/__init__.py b/qiskit/finance/__init__.py index 85e353541c..c5b8bd88e0 100644 --- a/qiskit/finance/__init__.py +++ b/qiskit/finance/__init__.py @@ -12,9 +12,9 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. """ -========================================================== -Finance application stack for Aqua (:mod:`qiskit.finance`) -========================================================== +=============================================== +Qiskit's finance module (:mod:`qiskit.finance`) +=============================================== This is the finance domain logic.... .. currentmodule:: qiskit.finance diff --git a/qiskit/finance/_logging.py b/qiskit/finance/_logging.py index 679db58f88..c279ce047b 100644 --- a/qiskit/finance/_logging.py +++ b/qiskit/finance/_logging.py @@ -21,8 +21,7 @@ def get_qiskit_finance_logging() -> int: - """ - Returns the current Qiskit Finance logging level + """Returns the current Qiskit finance logging level. Returns: int: logging level @@ -31,8 +30,7 @@ def get_qiskit_finance_logging() -> int: def set_qiskit_finance_logging(level: int, filepath: Optional[str] = None) -> None: - """ - Updates the Qiskit Finance logging with the appropriate logging level + """Updates the Qiskit finance logging with the appropriate logging level. Args: level: minimum severity of the messages that are displayed. diff --git a/qiskit/finance/data_providers/_base_data_provider.py b/qiskit/finance/data_providers/_base_data_provider.py index d23d7866eb..efd1ff87e9 100644 --- a/qiskit/finance/data_providers/_base_data_provider.py +++ b/qiskit/finance/data_providers/_base_data_provider.py @@ -2,7 +2,7 @@ # This code is part of Qiskit. # -# (C) Copyright IBM 2019. +# (C) Copyright IBM 2019, 2020. # # 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 @@ -12,10 +12,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -""" -This module implements the abstract base class for data_provider modules -within Qiskit Finance. -""" +"""This module implements the abstract base class for data_provider modules the finance module.""" from abc import ABC, abstractmethod import logging @@ -56,9 +53,7 @@ class DataType(Enum): class BaseDataProvider(ABC): - """ - This module implements the abstract base class for data_provider modules - within Qiskit Finance. + """The abstract base class for data_provider modules within Qiskit's finance module. To create add-on data_provider module subclass the BaseDataProvider class in this module. Doing so requires that the required driver interface is implemented. diff --git a/qiskit/ml/__init__.py b/qiskit/ml/__init__.py index 41942d29be..9a11d111b4 100644 --- a/qiskit/ml/__init__.py +++ b/qiskit/ml/__init__.py @@ -13,9 +13,9 @@ # that they have been altered from the originals. """ -============================================================== -Machine Learning application stack for Aqua (:mod:`qiskit.ml`) -============================================================== +=================================================== +Qiskit's Machine Learning module (:mod:`qiskit.ml`) +=================================================== This is the machine learning domain logic.... .. currentmodule:: qiskit.ml diff --git a/qiskit/optimization/__init__.py b/qiskit/optimization/__init__.py index b3fec6bd07..0de47e44a9 100644 --- a/qiskit/optimization/__init__.py +++ b/qiskit/optimization/__init__.py @@ -12,19 +12,19 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. """ -==================================================================== -Optimization application stack for Aqua (:mod:`qiskit.optimization`) -==================================================================== +========================================================= +Qiskit's optimization module (:mod:`qiskit.optimization`) +========================================================= .. currentmodule:: qiskit.optimization -Qiskit Optimization covers the whole stack from high-level modeling of optimization +Qiskit's optimization module covers the whole range from high-level modeling of optimization problems, with automatic conversion of problems to different required representations, to a suite of easy-to-use quantum optimization algorithms that are ready to run on classical simulators, as well as on real quantum devices via Qiskit. -Qiskit Optimization enables easy, efficient modeling of optimization problems using `docplex -`_ +This module enables easy, efficient modeling of optimization problems using `docplex +`_. A uniform interface as well as automatic conversion between different problem representations allows users to solve problems using a large set of algorithms, from variational quantum algorithms, such as the Quantum Approximate Optimization Algorithm @@ -32,14 +32,14 @@ `Grover Adaptive Search `_ (:class:`~algorithms.GroverOptimizer`), leveraging fundamental :mod:`~qiskit.aqua.algorithms` provided by Qiskit Aqua. Furthermore, the modular design -of Qiskit Optimization allows it to be easily extended and facilitates rapid development and +of the optimization module allows it to be easily extended and facilitates rapid development and testing of new algorithms. Compatible classical optimizers are also provided for testing, validation, and benchmarking. -Qiskit Optimization supports Quadratically Constrained Quadratic Programs – for simplicity we refer -to them just as Quadratic Programs – with binary, integer, and continuous variables, as well as -equality and inequality constraints. This class of optimization problems has a vast amount of -relevant applications, while still being efficiently representable by matrices and vectors. +Qiskit's optimization module supports Quadratically Constrained Quadratic Programs – for simplicity +we refer to them just as Quadratic Programs – with binary, integer, and continuous variables, as +well as equality and inequality constraints. This class of optimization problems has a vast amount +of relevant applications, while still being efficiently representable by matrices and vectors. This class covers some very interesting sub-classes, from Convex Continuous Quadratic Programs, which can be solved efficiently by classical optimization algorithms, to Quadratic Unconstrained Binary Optimization QUBO) problems, which cover many NP-complete, i.e., classically intractable, @@ -60,7 +60,7 @@ QiskitOptimizationError -In addition to standard Python errors Qiskit Optimization will raise this error if circumstances +In addition to standard Python errors the optimization module will raise this error if circumstances are that it cannot proceed to completion. .. autosummary:: diff --git a/qiskit/optimization/_logging.py b/qiskit/optimization/_logging.py index 7ab2fdfa5f..f7d591c647 100644 --- a/qiskit/optimization/_logging.py +++ b/qiskit/optimization/_logging.py @@ -21,8 +21,7 @@ def get_qiskit_optimization_logging() -> int: - """ - Returns the current Qiskit Optimization logging level + """Returns the current Qiskit optimization logging level Returns: int: logging level @@ -31,8 +30,7 @@ def get_qiskit_optimization_logging() -> int: def set_qiskit_optimization_logging(level: int, filepath: Optional[str] = None) -> None: - """ - Updates the Qiskit Optimization logging with the appropriate logging level + """Updates the Qiskit optimization logging with the appropriate logging level Args: level: minimum severity of the messages that are displayed. diff --git a/qiskit/optimization/algorithms/cobyla_optimizer.py b/qiskit/optimization/algorithms/cobyla_optimizer.py index 2bdb0afe17..201ff403c9 100644 --- a/qiskit/optimization/algorithms/cobyla_optimizer.py +++ b/qiskit/optimization/algorithms/cobyla_optimizer.py @@ -13,7 +13,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""The COBYLA optimizer wrapped to be used within Qiskit Optimization.""" +"""The COBYLA optimizer wrapped to be used within Qiskit's optimization module.""" from typing import Optional @@ -32,7 +32,7 @@ class CobylaOptimizer(OptimizationAlgorithm): This class provides a wrapper for ``scipy.optimize.fmin_cobyla`` (https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.optimize.fmin_cobyla.html) - to be used within Qiskit Optimization. + to be used within the optimization module. The arguments for ``fmin_cobyla`` are passed via the constructor. Examples: diff --git a/qiskit/optimization/algorithms/cplex_optimizer.py b/qiskit/optimization/algorithms/cplex_optimizer.py index ff29f827d6..e50e931143 100644 --- a/qiskit/optimization/algorithms/cplex_optimizer.py +++ b/qiskit/optimization/algorithms/cplex_optimizer.py @@ -13,7 +13,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""The CPLEX optimizer wrapped to be used within Qiskit Optimization.""" +"""The CPLEX optimizer wrapped to be used within Qiskit's optimization module.""" from typing import Optional import logging @@ -36,7 +36,7 @@ class CplexOptimizer(OptimizationAlgorithm): """The CPLEX optimizer wrapped as an Qiskit :class:`OptimizationAlgorithm`. This class provides a wrapper for ``cplex.Cplex`` (https://pypi.org/project/cplex/) - to be used within Qiskit Optimization. + to be used within the optimization module. Examples: >>> from qiskit.optimization.problems import QuadraticProgram diff --git a/qiskit/optimization/algorithms/minimum_eigen_optimizer.py b/qiskit/optimization/algorithms/minimum_eigen_optimizer.py index faff955049..388ad21051 100644 --- a/qiskit/optimization/algorithms/minimum_eigen_optimizer.py +++ b/qiskit/optimization/algorithms/minimum_eigen_optimizer.py @@ -13,7 +13,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""A wrapper for minimum eigen solvers from Qiskit Aqua to be used within Qiskit Optimization.""" +"""A wrapper for minimum eigen solvers from Aqua to be used within the optimization module.""" from typing import Optional, Any, Union, Tuple, List import numpy as np @@ -69,8 +69,8 @@ def get_correlations(self): class MinimumEigenOptimizer(OptimizationAlgorithm): """A wrapper for minimum eigen solvers from Qiskit Aqua. - This class provides a wrapper for minimum eigen solvers from Qiskit Aqua to be used within - Qiskit Optimization. + This class provides a wrapper for minimum eigen solvers from Qiskit to be used within + the optimization module. It assumes a problem consisting only of binary or integer variables as well as linear equality constraints thereof. It converts such a problem into a Quadratic Unconstrained Binary Optimization (QUBO) problem by expanding integer variables into binary variables and by adding diff --git a/qiskit/optimization/algorithms/optimization_algorithm.py b/qiskit/optimization/algorithms/optimization_algorithm.py index 48cf97ffd0..0b78fd99cc 100644 --- a/qiskit/optimization/algorithms/optimization_algorithm.py +++ b/qiskit/optimization/algorithms/optimization_algorithm.py @@ -12,7 +12,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""An abstract class for optimization algorithms in Qiskit Optimization.""" +"""An abstract class for optimization algorithms in Qiskit's optimization module.""" from abc import ABC, abstractmethod from enum import Enum @@ -22,7 +22,7 @@ class OptimizationAlgorithm(ABC): - """An abstract class for optimization algorithms in Qiskit Optimization.""" + """An abstract class for optimization algorithms in Qiskit's optimization module.""" @abstractmethod def get_compatibility_msg(self, problem: QuadraticProgram) -> str: diff --git a/qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py b/qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py index a6aa05d01f..768615cb3d 100644 --- a/qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py +++ b/qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py @@ -12,7 +12,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""A recursive minimal eigen optimizer in Qiskit Optimization.""" +"""A recursive minimal eigen optimizer in Qiskit's optimization module.""" from copy import deepcopy from typing import Optional diff --git a/qiskit/optimization/applications/__init__.py b/qiskit/optimization/applications/__init__.py index ef32bbdbe7..638b605274 100644 --- a/qiskit/optimization/applications/__init__.py +++ b/qiskit/optimization/applications/__init__.py @@ -18,7 +18,7 @@ .. currentmodule:: qiskit.optimization.applications -Applications for Qiskit Optimization. The present set are in the form of +Applications for Qiskit's optimization module. The present set are in the form of Ising Hamiltonians. Submodules diff --git a/qiskit/optimization/exceptions.py b/qiskit/optimization/exceptions.py index 71baf4ca19..e709362a71 100644 --- a/qiskit/optimization/exceptions.py +++ b/qiskit/optimization/exceptions.py @@ -18,5 +18,5 @@ class QiskitOptimizationError(AquaError): - """Class for errors returned by Qiskit Optimization.""" + """Class for errors returned by Qiskit's optimization module.""" pass diff --git a/setup.py b/setup.py index aeaa14844f..eae9986cb8 100644 --- a/setup.py +++ b/setup.py @@ -22,8 +22,8 @@ Researchers can experiment with Aqua algorithms, on near-term quantum devices and simulators, and can also get involved by contributing new algorithms and algorithm-supporting objects, such as optimizers and variational forms. - Qiskit Aqua also contains application domain support in the form of Qiskit Chemistry, - Qiskit Finance, Qiskit Machine Learning and Qiskit Optimization to experiment with real-world applications to quantum computing.""" + Qiskit Aqua also contains application domain support in the form of the chemistry, finance, + machine learning and optimization modules to experiment with real-world applications to quantum computing.""" requirements = [ "qiskit-terra>=0.14.0",