Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Commit

Permalink
Fix last lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Feb 14, 2019
1 parent 3508a9b commit 2727dff
Show file tree
Hide file tree
Showing 19 changed files with 240 additions and 186 deletions.
2 changes: 1 addition & 1 deletion docs/aer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Qiskit Aer Documentation

.. toctree::
:maxdepth: 1

Overview <overview>
Installation <installing_aer>
Getting Started with Qiskit Aer <getting_started_with_qiskit_aer>
Expand Down
70 changes: 51 additions & 19 deletions docs/aer/installing_aer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ Install from PyPI

**Install With the Rest of Qiskit**

Qiskit packages are published on the Python Package Index. The preferred tool for installing packages from *PyPI* is **pip**. This tool is provided with all modern versions of Python.
Qiskit packages are published on the Python Package Index. The preferred tool for installing
packages from *PyPI* is **pip**. This tool is provided with all modern versions of Python.

On Linux or MacOS, you should open your terminal and run the following command.
::

$ pip install qiskit

On Windows, you should open *Command Prompt* (``⊞Win-r`` and type **cmd**) and run the same command.
On Windows, you should open *Command Prompt* (``⊞Win-r`` and type **cmd**) and run the same
command.
::

C:\> pip install qiskit

Installation from *PyPI* also allows you to install the latest development release. You will not generally need (or want) to do this, but it can be useful if you see a possible bug in the latest stable release. To do this, use the ``--pre flag``.
Installation from *PyPI* also allows you to install the latest development release. You will not
generally need (or want) to do this, but it can be useful if you see a possible bug in the latest
stable release. To do this, use the ``--pre flag``.
::

$ pip install --pre qiskit
Expand All @@ -40,7 +44,8 @@ Install from Source
.. note::
The following are prerequisites for all operating systems

We recommend using Python virtual environments to cleanly separate Qiskit from other applications and improve your experience.
We recommend using Python virtual environments to cleanly separate Qiskit from other applications
and improve your experience.

The simplest way to use environments is by using **Anaconda**
::
Expand All @@ -53,7 +58,8 @@ Clone the Qiskit Aer repo via **git**.

$ git clone https://github.com/Qiskit/qiskit-aer

Most of the required dependencies can be installed via **pip**, using the ``requirements-dev.txt`` file, eg:
Most of the required dependencies can be installed via **pip**, using the ``requirements-dev.txt``
file, eg:
::

$ cd qiskit-aer
Expand All @@ -63,12 +69,15 @@ Most of the required dependencies can be installed via **pip**, using the ``requ
Linux
=====

Qiskit is supported on Ubuntu >= 16.04. To get most of the necessary compilers and libraries , install the ``build-essential`` package by running
Qiskit is supported on Ubuntu >= 16.04. To get most of the necessary compilers and libraries,
install the ``build-essential`` package by running
::

$ sudo apt install build-essential

Although the **BLAS** and **LAPACK** library implementations included in the ``build-essential`` package are sufficient to build all of the Aer simulators, we recommend using **OpenBLAS**, which you can install by running
Although the **BLAS** and **LAPACK** library implementations included in the ``build-essential``
package are sufficient to build all of the Aer simulators, we recommend using **OpenBLAS**, which
you can install by running
::

$ sudo apt install libopenblas-dev
Expand All @@ -85,7 +94,9 @@ For the former, we just need to call the ``setup.py`` script:

qiskit-aer$ python ./setup.py bdist_wheel

We are using **scikit-build** as a substitute for **setuptools**. This is basically the glue between **setuptools** and **CMake**, so there are various options to pass variables to **CMake**, and the underlying build system (depending on your platform). The way to pass variables is:
We are using **scikit-build** as a substitute for **setuptools**. This is basically the glue
between **setuptools** and **CMake**, so there are various options to pass variables to **CMake**,
and the underlying build system (depending on your platform). The way to pass variables is:
::

qiskit-aer$ python ./setup.py bdist_wheel -- -DCMAKE_VARIABLE=Values -- -Makefile_Flag
Expand All @@ -95,19 +106,25 @@ So a real example could be:

qiskit-aer$ python ./setup.py bdist_wheel -- -j8

This is setting the **CMake** variable ``STATIC_LINKING`` to value ``True`` so **CMake** will try to create an statically linked **cython** library, and is passing ``-j8`` flag to the underlaying build system, which in this case is Makefile, telling it that we want to build in parallel, using 8 processes.
This is setting the **CMake** variable ``STATIC_LINKING`` to value ``True`` so **CMake** will try
to create an statically linked **cython** library, and is passing ``-j8`` flag to the underlaying
build system, which in this case is Makefile, telling it that we want to build in parallel, using
8 processes.

**Standalone Executable**

If we want to build a standalone executable, we have to use **CMake** directly. The preferred way **CMake** is meant to be used, is by setting up an "out of source" build. So in order to build our standalone executable, we have to follow these steps:
If we want to build a standalone executable, we have to use **CMake** directly. The preferred way
**CMake** is meant to be used, is by setting up an "out of source" build. So in order to build our
standalone executable, we have to follow these steps:
::

qiskit-aer$ mkdir out
qiskit-aer$ cd out
qiskit-aer/out$ cmake ..
qiskit-aer/out$ cmake --build . --config Release -- -j4

Once built, you will have your standalone executable into the ``Release/`` or ``Debug/`` directory (depending on the type of building chosen with the ``--config`` option):
Once built, you will have your standalone executable into the ``Release/`` or ``Debug/`` directory
(depending on the type of building chosen with the ``--config`` option):
::

qiskit-aer/out$ cd Release
Expand All @@ -119,7 +136,9 @@ Once built, you will have your standalone executable into the ``Release/`` or ``
macOS
=====

There are various methods depending on the compiler we want to use. If we want to use the **Clang** compiler, we need to install an extra library for supporting **OpenMP**: **libomp**. The **CMake** build system will warn you otherwise. To install it manually, run:
There are various methods depending on the compiler we want to use. If we want to use the **Clang**
compiler, we need to install an extra library for supporting **OpenMP**: **libomp**. The **CMake**
build system will warn you otherwise. To install it manually, run:
::

$ brew install libomp
Expand All @@ -129,7 +148,8 @@ We recommend installing **OpenBLAS**, which is our default choice:

$ brew install openblas

The **CMake** build system will search for other **BLAS** implementation alternatives if **OpenBLAS** is not installed in the system.
The **CMake** build system will search for other **BLAS** implementation alternatives if
**OpenBLAS** is not installed in the system.

You further need to have **Xcode Command Line Tools** installed on macOS:
::
Expand All @@ -148,7 +168,9 @@ For the former, we just need to call the ``setup.py`` script:

qiskit-aer$ python ./setup.py bdist_wheel

We are using **scikit-build** as a substitute for **setuptools**. This is basically the glue between **setuptools** and **CMake**, so there are various options to pass variables to **CMake**, and the underlying build system (depending on your platform). The way to pass variables is:
We are using **scikit-build** as a substitute for **setuptools**. This is basically the glue
between **setuptools** and **CMake**, so there are various options to pass variables to **CMake**,
and the underlying build system (depending on your platform). The way to pass variables is:
::

qiskit-aer$ python ./setup.py bdist_wheel -- -DCMAKE_VARIABLE=Values -- -Makefile_Flag
Expand All @@ -158,7 +180,10 @@ So a real example could be:

qiskit-aer$ python ./setup.py bdist_wheel -- -j8

This is setting the **CMake** variable ``STATIC_LINKING`` to value ``True`` so **CMake** will try to create an statically linked **cython** library, and is passing ``-j8`` flag to the underlaying build system, which in this case is Makefile, telling it that we want to build in parallel, using 8 processes.
This is setting the **CMake** variable ``STATIC_LINKING`` to value ``True`` so **CMake** will try
to create an statically linked **cython** library, and is passing ``-j8`` flag to the underlaying
build system, which in this case is Makefile, telling it that we want to build in parallel, using
8 processes.

.. note::

Expand All @@ -168,23 +193,27 @@ This is setting the **CMake** variable ``STATIC_LINKING`` to value ``True`` so *

qiskit-aer$ python ./setup.py bdist_wheel --plat-name macosx-10.9-x86_64 -- -DSTATIC_LINKING=False -- -j8

After this command is executed successfully, we will have a wheel package into the ``dist/`` directory, so next step is installing it:
After this command is executed successfully, we will have a wheel package into the ``dist/``
directory, so next step is installing it:
::

qiskit-aer/$ cd dist
qiskit-aer/dist$ pip install qiskit_aer-<...>.whl

**Standalone Executable**

If we want to build a standalone executable, we have to use **CMake** directly. The preferred way **CMake** is meant to be used, is by setting up an "out of source" build. So in order to build our standalone executable, we have to follow these steps:
If we want to build a standalone executable, we have to use **CMake** directly. The preferred way
**CMake** is meant to be used, is by setting up an "out of source" build. So in order to build our
standalone executable, we have to follow these steps:
::

qiskit-aer$ mkdir out
qiskit-aer$ cd out
qiskit-aer/out$ cmake ..
qiskit-aer/out$ cmake --build . --config Release -- -j4

Once built, you will have your standalone executable into the ``Release/`` or ``Debug/`` directory (depending on the type of building chosen with the ``--config`` option):
Once built, you will have your standalone executable into the ``Release/`` or ``Debug/`` directory
(depending on the type of building chosen with the ``--config`` option):
::

qiskit-aer/out$ cd Release
Expand All @@ -196,4 +225,7 @@ Once built, you will have your standalone executable into the ``Release/`` or ``
Windows
=======

On Windows, you must have **Anaconda3** installed. We recommend also installing **Visual Studio 2017** (Community Edition). **Anaconda3** is required when searching for an **OpenBLAS** implementation. If **CMake** can't find a suitable implementation installed, it will take the **BLAS** library from the **Anaconda3** environment.
On Windows, you must have **Anaconda3** installed. We recommend also installing
**Visual Studio 2017** (Community Edition). **Anaconda3** is required when searching for an
**OpenBLAS** implementation. If **CMake** can't find a suitable implementation installed, it will
take the **BLAS** library from the **Anaconda3** environment.
5 changes: 4 additions & 1 deletion docs/aer/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Overview

A high performance simulator framework for quantum circuits

Qiskit Aer provides a high performance simulator framework for the Qiskit software stack. It contains optimized C++ simulator backends for executing circuits compiled in Qiskit Terra, and tools for constructing highly configurable noise models for performing realistic noisy simulations of the errors that occur during execution on real devices.
Qiskit Aer provides a high performance simulator framework for the Qiskit software stack. It
contains optimized C++ simulator backends for executing circuits compiled in Qiskit Terra, and
tools for constructing highly configurable noise models for performing realistic noisy simulations
of the errors that occur during execution on real devices.


*This project uses the* |emphasized hyperlink|_.
Expand Down
17 changes: 12 additions & 5 deletions docs/aer/release_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ Qiskit Aer 0.1.0

Aer provides three simulator backends:
* ``QasmSimulator``: simulate experiments and return measurement outcomes.
* ``StatevectorSimulator``: return the final statevector for a quantum circuit acting on the all zero state
* ``StatevectorSimulator``: return the final statevector for a quantum circuit acting on the all
zero state
* ``UnitarySimulator``: return the unitary matrix for a quantum circuit

``noise`` module: contains advanced noise modeling features for the ``QasmSimulator``
* ``NoiseModel``, ``QuantumError``, ``ReadoutError`` classes for simulating a Qiskit quantum circuit in the presence of errors
* ``errors`` submodule including functions for generating ``QuantumError`` objects for the following types of quantum errors: Kraus, mixed unitary, coherent unitary, Pauli, depolarizing, thermal relaxation, amplitude damping, phase damping, combined phase and amplitude damping.
* ``device`` submodule for automatically generating a noise model based on the ``BackendProperties`` of a device
* ``NoiseModel``, ``QuantumError``, ``ReadoutError`` classes for simulating a Qiskit quantum
circuit in the presence of errors
* ``errors`` submodule including functions for generating ``QuantumError`` objects for the
following types of quantum errors: Kraus, mixed unitary, coherent unitary, Pauli,
depolarizing, thermal relaxation, amplitude damping, phase damping, combined phase and
amplitude damping.
* ``device`` submodule for automatically generating a noise model based on the
``BackendProperties`` of a device

``utils`` module:
* ``qobj_utils`` provides functions for directly modifying a ``qobj`` to insert special simulator instructions not yet supported through the Qiskit Terra API
* ``qobj_utils`` provides functions for directly modifying a ``qobj`` to insert special simulator
instructions not yet supported through the Qiskit Terra API
7 changes: 4 additions & 3 deletions docs/aqua/ai/qiskit_ai.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ Research and developers interested in :ref:`aqua-extending` with new AI-specific
capabilities can take advantage
of the modular architecture of Aqua and easily extend Aqua with more algorithms
and algorithm components, such as new :ref:`oracles` for the :ref:`grover` algorithm,
:ref:`optimizers` and :ref:`variational-forms` for :ref:`vqe`, :ref:`qaoa`, and :ref:`svm-variational`,
:ref:`iqfts` for :ref:`qpe`, :ref:`initial-states` for :ref:`variational-forms`,
as well as :ref:`feature-maps` and :ref:`multiclass-extensions` for Support Vector Machine
:ref:`optimizers` and :ref:`variational-forms` for :ref:`vqe`, :ref:`qaoa`, and
:ref:`svm-variational`, :ref:`iqfts` for :ref:`qpe`, :ref:`initial-states` for
:ref:`variational-forms`, as well as :ref:`feature-maps` and
:ref:`multiclass-extensions` for Support Vector Machine
(SVM) algorithms, such as :ref:`svm-variational` and :ref:`svm-q-kernel`.


Expand Down
4 changes: 2 additions & 2 deletions docs/aqua/chemistry/qiskit_chemistry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Qiskit Chemistry
****************

Qiskit Chemistry is the only end-to-end quantum software stack that allows for mapping high-level
classical chemistry computational software problems all the way down to a quantum machine (a simulator or a
real quantum device).
classical chemistry computational software problems all the way down to a quantum machine (a
simulator or a real quantum device).

.. toctree::
:maxdepth: 3
Expand Down
Loading

0 comments on commit 2727dff

Please sign in to comment.