From 2727dff7acb27e187f19114b87fda0e60e152791 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 14 Feb 2019 09:47:57 -0500 Subject: [PATCH] Fix last lint issues --- docs/aer/index.rst | 2 +- docs/aer/installing_aer.rst | 70 +++++-- docs/aer/overview.rst | 5 +- docs/aer/release_history.rst | 17 +- docs/aqua/ai/qiskit_ai.rst | 7 +- docs/aqua/chemistry/qiskit_chemistry.rst | 4 +- .../chemistry/qiskit_chemistry_drivers.rst | 191 ++++++++++-------- .../chemistry/qiskit_chemistry_extending.rst | 10 +- docs/aqua/extending.rst | 4 +- docs/aqua/feature_maps.rst | 8 +- docs/aqua/index.rst | 6 +- docs/aqua/optimizers.rst | 45 ++--- docs/getting_started_with_qiskit.rst | 16 +- docs/license.rst | 2 +- docs/overview.rst | 4 +- docs/plotting_data_in_qiskit.rst | 2 +- docs/roadmap.rst | 6 +- docs/terra/backend_monitoring_tools.rst | 12 +- docs/terra/overview.rst | 15 +- 19 files changed, 240 insertions(+), 186 deletions(-) diff --git a/docs/aer/index.rst b/docs/aer/index.rst index b6fb30a50fb6..f914f09aa3f5 100644 --- a/docs/aer/index.rst +++ b/docs/aer/index.rst @@ -8,7 +8,7 @@ Qiskit Aer Documentation .. toctree:: :maxdepth: 1 - + Overview Installation Getting Started with Qiskit Aer diff --git a/docs/aer/installing_aer.rst b/docs/aer/installing_aer.rst index ac5853b20cbd..65ed920093ee 100644 --- a/docs/aer/installing_aer.rst +++ b/docs/aer/installing_aer.rst @@ -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 @@ -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** :: @@ -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 @@ -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 @@ -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 @@ -95,11 +106,16 @@ 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 @@ -107,7 +123,8 @@ If we want to build a standalone executable, we have to use **CMake** directly. 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 @@ -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 @@ -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: :: @@ -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 @@ -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:: @@ -168,7 +193,8 @@ 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 @@ -176,7 +202,9 @@ After this command is executed successfully, we will have a wheel package into t **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 @@ -184,7 +212,8 @@ If we want to build a standalone executable, we have to use **CMake** directly. 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 @@ -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. diff --git a/docs/aer/overview.rst b/docs/aer/overview.rst index cdfe3cf1152e..2ecfc2793e59 100644 --- a/docs/aer/overview.rst +++ b/docs/aer/overview.rst @@ -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|_. diff --git a/docs/aer/release_history.rst b/docs/aer/release_history.rst index b19303da2dca..f2c03752df27 100644 --- a/docs/aer/release_history.rst +++ b/docs/aer/release_history.rst @@ -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 diff --git a/docs/aqua/ai/qiskit_ai.rst b/docs/aqua/ai/qiskit_ai.rst index 1c7162d87166..66d92e440a41 100644 --- a/docs/aqua/ai/qiskit_ai.rst +++ b/docs/aqua/ai/qiskit_ai.rst @@ -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`. diff --git a/docs/aqua/chemistry/qiskit_chemistry.rst b/docs/aqua/chemistry/qiskit_chemistry.rst index 8742690f4c8c..67fc9fa2d34a 100644 --- a/docs/aqua/chemistry/qiskit_chemistry.rst +++ b/docs/aqua/chemistry/qiskit_chemistry.rst @@ -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 diff --git a/docs/aqua/chemistry/qiskit_chemistry_drivers.rst b/docs/aqua/chemistry/qiskit_chemistry_drivers.rst index 30428175c10f..16b17ea102b2 100644 --- a/docs/aqua/chemistry/qiskit_chemistry_drivers.rst +++ b/docs/aqua/chemistry/qiskit_chemistry_drivers.rst @@ -226,18 +226,18 @@ Verifying Path and Environment Setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You should also make sure the Gaussian™ 16 ``g16`` executable can be run from a command line. -This requires verifying that the ``g16`` executable is reachable via the system environment path, and appropriate -exports, such as ``GAUSS_EXEDIR``, have been configured as per +This requires 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 installation instructions `__. ~~~~~~~~~~~~~~~~~~ Input File Example ~~~~~~~~~~~~~~~~~~ -To use Gaussian™ 16 to configure a molecule on which to do a chemistry experiment with Qiskit Chemistry, -set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to ``GAUSSIAN`` and -then create a ``gaussian`` section in the input file as per the example below, -which shows the configuration of a molecule of +To use Gaussian™ 16 to configure a molecule on which to do a chemistry experiment with +Qiskit Chemistry, set the ``name`` field in the ``driver`` section of the +:ref:`qiskit-chemistry-input-file` to ``GAUSSIAN`` and then create a ``gaussian`` section in the +input file as per the example below, which shows the configuration of a molecule of hydrogen, :math:`H_2`. Here, the molecule, basis set and other options are specified according to the Gaussian™ 16 control file, so the syntax specified by Gaussian™ 16 should be followed: @@ -253,9 +253,9 @@ to the Gaussian™ 16 control file, so the syntax specified by Gaussian™ 16 sh H 0.0 0.0 0.74 &end -Experienced chemists who already have existing Gaussian™ 16 control files can simply paste the contents of those files -into the ``gaussian`` section of the input file. This configuration can also be easily achieved using the -Qiskit Chemistry :ref:`qiskit-chemistry-gui`. +Experienced chemists who already have existing Gaussian™ 16 control files can simply paste the +contents of those files into the ``gaussian`` section of the input file. This configuration can +also be easily achieved using the Qiskit Chemistry :ref:`qiskit-chemistry-gui`. .. _psi4: @@ -264,12 +264,12 @@ PSI4 ---- `PSI4 `__ is an open-source program for computational chemistry. In order for Qiskit Chemistry to interface PSI4, accept PSI4 input files and 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. -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 the ``.bash_profile`` file in the -user's home directory: +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. +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 +the ``.bash_profile`` file in the user's home directory: .. code:: sh @@ -277,14 +277,15 @@ user's home directory: 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 Qiskit Chemistry to discover PSI4 at run time, it is then necessary to execute the +``enable_psi4`` command before launching Qiskit Chemistry. To use PSI4 to configure a molecule on which to do a chemistry experiment with Qiskit Chemistry, -set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to ``PSI4`` and -then create a ``psi4`` section in the input file as per the example below, which shows the configuration of a molecule of -hydrogen, :math:`H_2`. Here, the molecule, basis set and other options are specified according -to the PSI4 control file, so the syntax specified by PSI4 should be followed: +set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to +``PSI4`` and then create a ``psi4`` section in the input file as per the example below, which shows +the configuration of a molecule of hydrogen, :math:`H_2`. Here, the molecule, basis set and other +options are specified according to the PSI4 control file, so the syntax specified by PSI4 should be +followed: .. code:: python @@ -301,9 +302,9 @@ to the PSI4 control file, so the syntax specified by PSI4 should be followed: } &end -Experienced chemists who already have existing PSI4 control files can simply paste the contents of those files -into the ``psi4`` section of the input file. This configuration can also be easily achieved using the -Qiskit Chemistry :ref:`qiskit-chemistry-gui`. +Experienced chemists who already have existing PSI4 control files can simply paste the contents of +those files into the ``psi4`` section of the input file. This configuration can also be easily +achieved using the Qiskit Chemistry :ref:`qiskit-chemistry-gui`. .. _pyscf: @@ -311,26 +312,30 @@ Qiskit Chemistry :ref:`qiskit-chemistry-gui`. PySCF ----- `PySCF `__ is an open-source library for computational chemistry. -In order for Qiskit Chemistry to interface PySCF, accept PySCF input files and execute PySCF to extract -the electronic structure information necessary for the computation of the input to the quantum algorithm, -PySCF must be installed. According to the `installation instructions `__, -the preferred installation method for PySCF 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 dynamically discoverable -by Qiskit Chemistry at run time. +In order for Qiskit Chemistry to interface PySCF, accept PySCF input files and execute PySCF to +extract the electronic structure information necessary for the computation of the input to the +quantum algorithm, PySCF must be installed. According to the +`installation instructions `__, +the preferred installation method for PySCF 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 dynamically discoverable by Qiskit Chemistry at run time. To use PySCF to configure a molecule on which to do a chemistry experiment with Qiskit Chemistry, -set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to ``PYSCF`` and -then create a ``pyscf`` section in the input file as per the example below, which shows the configuration of a molecule of -hydrogen, :math:`H_2`. Here, the molecule, basis set and other options are specified as key/value pairs, according -to the syntax expected by PySCF. In PySCF, these are the arguments as passed to the ``pyscf.gto.Mole`` class - -The ``atom`` field can be in xyz format, as per the example below. Here each atom is identified by its symbol along -with its position in the x, y, z coordinate space. Atoms are separated by the semicolon symbol. - -The ``atom`` field can also be in `ZMatrix `__ format. Here again -atoms are separate by semicolon. This is an example for H2O (water): "H; O 1 1.08; H 2 1.08 1 107.5". Dummy atom(s) -using symbol 'X' may be added to allow or facilitate conversion to xyz coordinates, as used internally for processing, -and are removed from the molecule following the conversion. +set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to +``PYSCF`` and then create a ``pyscf`` section in the input file as per the example below, which +shows the configuration of a molecule of hydrogen, :math:`H_2`. Here, the molecule, basis set and +other options are specified as key/value pairs, according to the syntax expected by PySCF. In PySCF, +these are the arguments as passed to the ``pyscf.gto.Mole`` class. + +The ``atom`` field can be in xyz format, as per the example below. Here each atom is identified by +its symbol along with its position in the x, y, z coordinate space. Atoms are separated by the +semicolon symbol. + +The ``atom`` field can also be in `ZMatrix `__ +format. Here again atoms are separate by semicolon. This is an example for H2O (water): +"H; O 1 1.08; H 2 1.08 1 107.5". Dummy atom(s) using symbol 'X' may be added to allow or facilitate +conversion to xyz coordinates, as used internally for processing, and are removed from the molecule +following the conversion. .. code:: python @@ -342,27 +347,28 @@ and are removed from the molecule following the conversion. basis=sto3g &end -Experienced chemists who already have existing PySCF control files can simply paste the contents of those files -into the ``pyscf`` section of the input file. This configuration can also be easily achieved using the -Qiskit Chemistry :ref:`qiskit-chemistry-gui`. +Experienced chemists who already have existing PySCF control files can simply paste the contents of +those files into the ``pyscf`` section of the input file. This configuration can also be easily +achieved using the Qiskit Chemistry :ref:`qiskit-chemistry-gui`. .. _pyquante: -------- PyQuante -------- -`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, accept PyQuante input files and execute PyQuante to extract -the electronic structure information necessary for the computation of the input to the quantum algorithm, -PyQuante2 must be installed and discoverable on the system where +`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, accept PyQuante input files and execute +PyQuante to extract the electronic structure information necessary for the computation of the input +to the quantum algorithm, PyQuante2 must be installed and discoverable on the system where Qiskit Chemistry 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. -The Qiskit Chemistry PyQuante2 driver wrapper contains two methods, in ``transform.py``, taken from from -`Pyquante V1 `__, which is `licensed `__ +The Qiskit Chemistry PyQuante2 driver wrapper contains two methods, in ``transform.py``, taken from +from `Pyquante V1 `__, which is +`licensed `__ under a `modified BSD license `__. .. note:: @@ -374,18 +380,22 @@ under a `modified BSD license `__. dipole moment. To use PyQuante to configure a molecule on which to do a chemistry experiment with Qiskit Chemistry, -set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to ``PYQUANTE`` and -then create a ``pyquante`` section in the input file as per the example below, which shows the configuration of a molecule of +set the ``name`` field in the ``driver`` section of the :ref:`qiskit-chemistry-input-file` to +``PYQUANTE`` and then create a ``pyquante`` section in the input file as per the example below, +which shows the configuration of a molecule of hydrogen, :math:`H_2`. Here, the molecule, basis set and other options are specified according to the PyQuante control file, so the syntax specified by PyQuante should be followed. -Specifically, a molecule is configured as a list of atoms. Each atom's chemical symbol is followed by the atom's :math:`x, y, z` -geometrical coordinates separated by a blank space. Atom configurations are separated by semicolons. - -The molecule in the ``atoms`` field can also be in `ZMatrix `__ format. -Here again atoms are separated by semicolons; within an atom the symbol and positional information separated by spaces. -This is an example for H2O (water): "H; O 1 1.08; H 2 1.08 1 107.5". Dummy atom(s) -using symbol 'X' may be added to allow or facilitate conversion to xyz coordinates, as used internally for processing, -and are removed from the molecule following the conversion. +Specifically, a molecule is configured as a list of atoms. Each atom's chemical symbol is followed +by the atom's :math:`x, y, z` +geometrical coordinates separated by a blank space. Atom configurations are separated by +semicolons. + +The molecule in the ``atoms`` field can also be in +`ZMatrix `__ format. +Here again atoms are separated by semicolons; within an atom the symbol and positional information +separated by spaces. This is an example for H2O (water): "H; O 1 1.08; H 2 1.08 1 107.5". Dummy +atom(s) using symbol 'X' may be added to allow or facilitate conversion to xyz coordinates, as used +internally for processing, and are removed from the molecule following the conversion. .. code:: python @@ -397,9 +407,9 @@ and are removed from the molecule following the conversion. basis=sto3g &end -Experienced chemists who already have existing PyQuante control files can simply paste the contents of those files -into the ``pyquante`` section of the input file. This configuration can also be easily achieved using the -Qiskit Chemistry :ref:`qiskit-chemistry-gui`. +Experienced chemists who already have existing PyQuante control files can simply paste the contents +of those files into the ``pyquante`` section of the input file. This configuration can also be +easily achieved using the Qiskit Chemistry :ref:`qiskit-chemistry-gui`. .. _hdf5: @@ -407,13 +417,14 @@ Qiskit Chemistry :ref:`qiskit-chemistry-gui`. HDF5 ---- -Qiskit Chemistry uses a molecular input file written on top of one of the classical computational software drivers -that it interfaces. Qiskit Chemistry executes a driver classically, -only to the extent necessary to compute some intermediate data which, combined with the molecular configuration, -can later be used to form the input to one of the +Qiskit Chemistry uses a molecular input file written on top of one of the classical computational +software drivers that it interfaces. Qiskit Chemistry executes a driver classically, +only to the extent necessary to compute some intermediate data which, combined with the molecular +configuration, can later be used to form the input to one of the Aqua :ref:`quantum-algorithms`. -As mentioned above, the intermediate data extracted from the classical computational software consists of the following: +As mentioned above, the intermediate data extracted from the classical computational software +consists of the following: 1. One- and two-body integrals in Molecular Orbital (MO) basis 2. Dipole integrals @@ -428,11 +439,12 @@ more elaborate software packages are more likely to produce more accurate data. Qiskit Chemistry offers the option to serialize this data in a binary format known as `Hierarchical Data Format 5 (HDF5) `__. -This is done for future reuse and exchange of input data among researchers who may not have a particular computational +This is done for future reuse and exchange of input data among researchers who may not have a +particular computational chemistry driver installed on their computers, or may have a different version of that driver. -HDF5 is configured as a prebuilt driver in Aqua because it allows for chemistry input to be passed into the -computation. In fact, HDF5 is the only driver that does not require any installation other -the installation of Qiskit Chemistry itself. +HDF5 is configured as a prebuilt driver in Aqua because it allows for chemistry input to be passed +into the computation. In fact, HDF5 is the only driver that does not require any installation +other the installation of Qiskit Chemistry itself. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Generation of an HDF5 Input File @@ -440,15 +452,15 @@ Generation of an HDF5 Input File The most intuitive way to generate an HDF5 input file is by using the Qiskit Chemistry :ref:`qiskit-chemistry-gui`. -Through the GUI, you can load an existing :ref:`qiskit-chemistry-input-file` from the ``chemistry`` folder -of the `Qiskit Tutorials GitHub repository `__ +Through the GUI, you can load an existing :ref:`qiskit-chemistry-input-file` from the ``chemistry`` +folder of the `Qiskit Tutorials GitHub repository `__ (which must have been installed on your file system via a ``git clone`` command) -by selecting **Open...** from the **File** menu. Alternatively, you can create and then potentially customize -a brand new :ref:`qiskit-chemistry-input-file` by choosing **New** from the **File** menu. +by selecting **Open...** from the **File** menu. Alternatively, you can create and then potentially +customize a brand new :ref:`qiskit-chemistry-input-file` by choosing **New** from the **File** menu. Once you have configured the chemistry experiment in one of the existing classical drivers (:ref:`gaussian-16`, :ref:`psi4`, :ref:`pyscf` or :ref:`pyquante`), -you can specify the name of the file where you want the HDF5 file to be serialized. This can be done -by assigning a value to the ``hdf5_output`` field of the ``driver`` section. +you can specify the name of the file where you want the HDF5 file to be serialized. This can be +done by assigning a value to the ``hdf5_output`` field of the ``driver`` section. Upon completing its execution, Qiskit Chemistry displays the following message: .. code:: sh @@ -458,22 +470,23 @@ Upon completing its execution, Qiskit Chemistry displays the following message: assuming that ``molecule.hdf5`` and ``/Users/username/Documents/temp`` are the file name and directory path you chose, respectively. -Using the GUI is the most intuitive option to generate the HDF5 file corresponding to a given experiment. The -same result can be obtained by assigning a value to the ``hdf5_output`` field of the ``driver`` section of -an :ref:`qiskit-chemistry-input-file` and then invoking the Qiskit Chemistry -:ref:`qiskit-chemistry-command-line` tool with the name of that file as the input parameter. +Using the GUI is the most intuitive option to generate the HDF5 file corresponding to a given +experiment. The same result can be obtained by assigning a value to the ``hdf5_output`` field of +the ``driver`` section of an :ref:`qiskit-chemistry-input-file` and then invoking the Qiskit +Chemistry :ref:`qiskit-chemistry-command-line` tool with the name of that file as the input +parameter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using an HDF5 File as the Input to an Experiment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you later want the HDF5 file to be deserialized and its contents used as the input for a chemistry experiment, -you can select ``HDF5`` as the driver in an :ref:`qiskit-chemistry-input-file`. Doing so will -require the ``hdf5`` section in the input file to be configured by assigning a valid fully qualified -file name to the ``hdf5_input`` field, as shown: +If you later want the HDF5 file to be deserialized and its contents used as the input for a +chemistry experiment, you can select ``HDF5`` as the driver in an +:ref:`qiskit-chemistry-input-file`. Doing so will require the ``hdf5`` section in the input +file to be configured by assigning a valid fully qualified file name to the ``hdf5_input`` +field, as shown: .. code:: python &hdf5 hdf5_input=molecule.hdf5 &end - diff --git a/docs/aqua/chemistry/qiskit_chemistry_extending.rst b/docs/aqua/chemistry/qiskit_chemistry_extending.rst index d2ebea002a47..b90ce1e8d68f 100644 --- a/docs/aqua/chemistry/qiskit_chemistry_extending.rst +++ b/docs/aqua/chemistry/qiskit_chemistry_extending.rst @@ -111,7 +111,7 @@ Chemistry Drivers The driver support in Qiskit Chemistry was designed to make the :ref:`drivers` pluggable and discoverable. In order for Qiskit Chemistry to be able to interface a driver library, the ``BaseDriver`` base class must be implemented so to provide the interfacing code, or *wrapper*. -As part of this process, the required `JavaScript Object Notation (JSON) `__ +As part of this process, the required `JavaScript Object Notation (JSON) `_ schema for the driver interface must be supplied in a CONFIGURATION static property in the class. The interfacing code in the driver wrapper is responsible for constructing and populating a ``QMolecule`` instance with the electronic structure data listed above. Driver wrappers @@ -127,9 +127,9 @@ Chemistry Operators Chemistry operators convert the electronic structure information obtained from the drivers to qubit-operator forms, suitable to be processed by the Aqua :ref:`quantum-algorithms`. New chemistry operators can be plugged in by extending the ``ChemistryOperator`` interface and -providing the required `JavaScript Object Notation (JSON) <>`__ schema in a CONFIGURATION static -property in the class. Chemistry operator implementations are collected in the ``core`` folder -for automatic discovery and dynamic lookup. +providing the required `JavaScript Object Notation (JSON) `_ schema in a +CONFIGURATION static property in the class. Chemistry operator implementations are collected in +the ``core`` folder for automatic discovery and dynamic lookup. ---------- @@ -171,7 +171,7 @@ The command for help is as follows: python -m unittest -h -`Other running options `__ +`Other running options `_ are available to users for consultation. In order to see unit test log messages, researchers and developers contributing to Aqua diff --git a/docs/aqua/extending.rst b/docs/aqua/extending.rst index 6b1db3ae36c2..361df5afb304 100644 --- a/docs/aqua/extending.rst +++ b/docs/aqua/extending.rst @@ -169,8 +169,8 @@ Initial States `Initial states <#initial_states>`__, for algorithms such as `VQE <#variational-quantum-eigensolver-vqe>`__, `QPE <#quantum-phase-estimation-qpe>`__ -and `IQPE <#iterative-quantum-phase-estimation-iqpe>`__, must derive from the ``InitialState`` class. -They should also be installed under the ``qiskit_aqua/components/initial_states`` folder, +and `IQPE <#iterative-quantum-phase-estimation-iqpe>`__, must derive from the ``InitialState`` +class. They should also be installed under the ``qiskit_aqua/components/initial_states`` folder, unless the dynamic-discovery approach has been chosen, in which case a new initial state can register itself as an Aqua initial state irrespective of its installation diff --git a/docs/aqua/feature_maps.rst b/docs/aqua/feature_maps.rst index 5eea9616ae48..cb6e46973a54 100644 --- a/docs/aqua/feature_maps.rst +++ b/docs/aqua/feature_maps.rst @@ -314,9 +314,13 @@ The Pauli Expansion feature map transform data :math:`\vec{x} \in \mathbb{R}^n` according to the following equation, and then duplicate the same circuit with depth :math:`d` times, where :math:`d` is the depth of the circuit: - :math:`U_{\Phi(\vec{x})} = \exp\left(i \sum_{S \subseteq [n]} \phi_S(\vec{x}) \prod_{i \in S} P_i\right)` +:math:`U_{\Phi(\vec{x})}=\exp\left(i\sum_{S\subseteq [n]} \phi_S(\vec{x})\prod_{i\in S} P_i\right)` -where :math:`S \in \{\binom{n}{k}\ combinations,\ k = 1,... n \}, \phi_S(\vec{x}) = x_i` if :math:`k=1`, otherwise :math:`\phi_S(\vec{x}) = \prod_S(\pi - x_j)`, where :math:`j \in S`, and :math:`P_i \in \{ I, X, Y, Z \}` Please refer to :ref:`firstorderexpansion` and :ref:`secondorderexpansion` for the cases of :math:`k = 1` and :math:`P_0 = Z` and :math:`k = 2` and :math:`P_0 = Z\ and\ P_1 P_0 = ZZ`, respectively. +where :math:`S \in \{\binom{n}{k}\ combinations,\ k = 1,... n \}, \phi_S(\vec{x}) = x_i` if +:math:`k=1`, otherwise :math:`\phi_S(\vec{x}) = \prod_S(\pi - x_j)`, where :math:`j \in S`, and +:math:`P_i \in \{ I, X, Y, Z \}` Please refer to :ref:`firstorderexpansion` and +:ref:`secondorderexpansion` for the cases of :math:`k = 1` and :math:`P_0 = Z` and :math:`k = 2` +and :math:`P_0 = Z\ and\ P_1 P_0 = ZZ`, respectively. The following allows a specific form to be configured in the ``feature_map`` section of the Aqua diff --git a/docs/aqua/index.rst b/docs/aqua/index.rst index aa95f60d4883..213b68a9bfb5 100644 --- a/docs/aqua/index.rst +++ b/docs/aqua/index.rst @@ -12,15 +12,15 @@ created :ref:`aqua-library` that can be invoked directly or via domain-specific applications: :ref:`aqua-chemistry`, :ref:`aqua-ai`, :ref:`aqua-optimization` and :ref:`aqua-finance`. -Finally, :ref:`aqua-tutorials` is a companion library of notebooks, input files and sample code made available in the form of a -`GitHub repository `__. +Finally, :ref:`aqua-tutorials` is a companion library of notebooks, input files and sample code +made available in the form of a `GitHub repository `__. This part of the documentation will first cover Aqua as a library of quantum applications, and then the domain-specific applications of Aqua: Chemistry, AI and Optimization. .. toctree:: :maxdepth: 2 - + Aqua: A Library of Quantum Algorithms Qiskit Chemistry Qiskit AI diff --git a/docs/aqua/optimizers.rst b/docs/aqua/optimizers.rst index cc235925b110..63c0c89162c3 100644 --- a/docs/aqua/optimizers.rst +++ b/docs/aqua/optimizers.rst @@ -461,10 +461,9 @@ SLSQP minimizes a function of several variables with any combination of bounds, equality and inequality constraints. The method wraps the SLSQP Optimization subroutine originally implemented by Dieter Kraft. -SLSQP is ideal for mathematical problems for which the objective function and the constraints are twice continuously differentiable. -Note that the wrapper -handles infinite values in bounds by converting them into large floating -values. +SLSQP is ideal for mathematical problems for which the objective function and the constraints are +twice continuously differentiable. Note that the wrapper handles infinite values in bounds by +converting them into large floating values. The following parameters are supported: @@ -484,7 +483,8 @@ The following parameters are supported: The default is ``False``. -- A tolerance value indicating precision goal for the value of the objective function in the stopping criterion. +- A tolerance value indicating precision goal for the value of the objective function in the + stopping criterion. .. code:: python @@ -633,7 +633,6 @@ allows each variable to be given upper and lower bounds. The following parameters are supported: - The maximum number of iterations: - .. code:: python maxiter = 1 | 2 | ... @@ -641,7 +640,6 @@ The following parameters are supported: A positive ``int`` value is expected. The default is ``100``. - A Boolean value indicating whether or not to print convergence messages: - .. code:: python disp : bool @@ -649,7 +647,6 @@ The following parameters are supported: The default value is ``False``. - Relative precision for finite difference calculations: - .. code:: python accuracy : float @@ -657,8 +654,7 @@ The following parameters are supported: The default value is ``0.0``. - A tolerance value indicating the precision goal for the value of the objective function - ``f`` in the stopping criterion. - + ``f`` in the stopping criterion. .. code:: python ftol : float @@ -666,8 +662,7 @@ The following parameters are supported: The default value is ``-1``. - A tolerance value indicating precision goal for the value of ``x`` in the stopping criterion, - after applying ``x`` scaling factors. - + after applying ``x`` scaling factors. .. code:: python xtol : float @@ -677,7 +672,6 @@ The following parameters are supported: - A tolerance value indicating precision goal for the value of the projected gradient ``g`` in the stopping criterion, after applying ``x`` scaling factors. - .. code:: python gtol : float @@ -685,7 +679,6 @@ The following parameters are supported: The default value is ``-1``. - The tolerance for termination: - .. code:: tol : float @@ -694,7 +687,6 @@ The following parameters are supported: The default is ``None`` - Step size used for numerical approximation of the Jacobian. - .. code:: python eps : float @@ -780,9 +772,9 @@ Controller Random Search (CRS) with Local Mutation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CRS with local mutation `__ is part of the family of the CRS optimizers. -The CRS optimizers start with a random population of points, and randomly evolve these points by heuristic rules. -In the case of CRS with local mutation, the evolution is a randomized version of the -:ref:`Nelder-Mead` local optimizer. +The CRS optimizers start with a random population of points, and randomly evolve these points by +heuristic rules. In the case of CRS with local mutation, the evolution is a randomized version of +the :ref:`Nelder-Mead` local optimizer. .. topic:: Declarative Name @@ -795,8 +787,8 @@ In the case of CRS with local mutation, the evolution is a randomized version of DIviding RECTangles algorithm - Locally based (DIRECT-L) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -DIviding RECTangles (DIRECT) is a deterministic-search algorithms based on systematic division of the search domain -into increasingly smaller hyperrectangles. +DIviding RECTangles (DIRECT) is a deterministic-search algorithms based on systematic division of +the search domain into increasingly smaller hyperrectangles. The `DIRECT-L `__ version is a variant of DIRECT that makes the algorithm more biased towards local search, so that it is more efficient for functions with few local minima. @@ -844,12 +836,13 @@ Improved Stochastic Ranking Evolution Strategy (ISRES) `ISRES `__ is an algorithm for nonlinearly-constrained global optimization. -It has heuristics to escape local optima, even though convergence to a global optima is not guaranteed. -The evolution strategy is based on a combination of a mutation rule and differential variation. -The fitness ranking is simply via the objective function for problems without nonlinear constraints. -When nonlinear constraints are included, the -`stochastic ranking proposed by Runarsson and Yao `__ is employed. -This method supports arbitrary nonlinear inequality and equality constraints, in addition to the bound constraints. +It has heuristics to escape local optima, even though convergence to a global optima is not +guaranteed. The evolution strategy is based on a combination of a mutation rule and differential +variation. The fitness ranking is simply via the objective function for problems without nonlinear +constraints. When nonlinear constraints are included, the +`stochastic ranking proposed by Runarsson and Yao `__ +is employed. This method supports arbitrary nonlinear inequality and equality constraints, in +addition to the bound constraints. .. topic:: Declarative Name diff --git a/docs/getting_started_with_qiskit.rst b/docs/getting_started_with_qiskit.rst index 498124f590e7..58f29dc9f9f0 100644 --- a/docs/getting_started_with_qiskit.rst +++ b/docs/getting_started_with_qiskit.rst @@ -54,10 +54,10 @@ example of a quantum circuit that makes a three-qubit GHZ state To create such a state, we start with a 3-qubit quantum register. By default, each qubit in the register is initialized to :math:`|0\rangle`. -To make the GHZ state, we apply the following gates: +To make the GHZ state, we apply the following gates: -- A Hadamard gate :math:`H` on qubit 0, which puts it into a superposition state. -- A controlled-Not operation (:math:`C_{X}`) between qubit 0 and qubit 1. +- A Hadamard gate :math:`H` on qubit 0, which puts it into a superposition state. +- A controlled-Not operation (:math:`C_{X}`) between qubit 0 and qubit 1. - A controlled-Not operation between qubit 0 and qubit 2. On an ideal quantum computer, the state produced by running this circuit @@ -309,17 +309,17 @@ backend. .. raw:: html -
        ┌───┐           ░ ┌─┐      
+    
        ┌───┐           ░ ┌─┐
     q_0: |0>┤ H ├──■────■───░─┤M├──────
-            └───┘┌─┴─┐  │   ░ └╥┘┌─┐   
+            └───┘┌─┴─┐  │   ░ └╥┘┌─┐
     q_1: |0>─────┤ X ├──┼───░──╫─┤M├───
                  └───┘┌─┴─┐ ░  ║ └╥┘┌─┐
     q_2: |0>──────────┤ X ├─░──╫──╫─┤M├
                       └───┘ ░  ║  ║ └╥┘
      c_0: 0 ═══════════════════╩══╬══╬═
-                                  ║  ║ 
+                                  ║  ║
      c_1: 0 ══════════════════════╩══╬═
-                                     ║ 
+                                     ║
      c_2: 0 ═════════════════════════╩═
                                        
@@ -451,7 +451,7 @@ choose a device with the least busy queue which can support our program .. code:: python from qiskit.providers.ibmq import least_busy - + large_enough_devices = IBMQ.backends(filters=lambda x: x.configuration().n_qubits > 3 and not x.configuration().simulator) backend = least_busy(large_enough_devices) print("The best backend is " + backend.name()) diff --git a/docs/license.rst b/docs/license.rst index 4719295daf06..9137b49ec341 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,4 +2,4 @@ License ======= This project uses the `Apache License Version 2.0 software -license `__. \ No newline at end of file +license `__. diff --git a/docs/overview.rst b/docs/overview.rst index 3f79d5907f38..8fc403fbbeab 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -1,7 +1,7 @@ Overview ======== -Qiskit is an open-source framework for working with +Qiskit is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms. @@ -19,7 +19,7 @@ and errors), and Aer (for accelerating development via simulators, emulators and debuggers). -Qiskit Elements +Qiskit Elements =============== .. image:: images/qiskit_elements.png diff --git a/docs/plotting_data_in_qiskit.rst b/docs/plotting_data_in_qiskit.rst index 626f11790db3..7009357cfdb9 100644 --- a/docs/plotting_data_in_qiskit.rst +++ b/docs/plotting_data_in_qiskit.rst @@ -2,7 +2,7 @@ Plotting Data in Qiskit -====================== +======================= To use this notebook you need to ensure that you have `maptlotlib `__ installed on your system diff --git a/docs/roadmap.rst b/docs/roadmap.rst index 86d5b5efdd41..ab8db2459586 100644 --- a/docs/roadmap.rst +++ b/docs/roadmap.rst @@ -49,9 +49,9 @@ In 2019, Aer will be extended in many ways: that are more efficient for specific subclasses of circuits, such as the T-gate simulator, which works on Clifford and T gates (with low T-depth), and a stabilizer simulator, which works just on Clifford gates. -- **Add noise approximation tools.** We plan to add noise approximation tools to mapping general (Kraus) - noise models to approximate noise model that may be implemented on an approximate backends - (for example only mixed Clifford and reset errors in the noise model). +- **Add noise approximation tools.** We plan to add noise approximation tools to mapping general + (Kraus) noise models to approximate noise model that may be implemented on an approximate + backends (for example only mixed Clifford and reset errors in the noise model). Qiskit Ignis ------------ diff --git a/docs/terra/backend_monitoring_tools.rst b/docs/terra/backend_monitoring_tools.rst index 1657158262bb..f5019bf2e675 100644 --- a/docs/terra/backend_monitoring_tools.rst +++ b/docs/terra/backend_monitoring_tools.rst @@ -50,7 +50,7 @@ monitor its status. q = QuantumRegister(2) c = ClassicalRegister(2) qc = QuantumCircuit(q, c) - + qc.h(q[0]) qc.cx(q[0], q[1]) qc.measure(q, c); @@ -152,7 +152,7 @@ information for a single backend by calling ``backend_monitor``: n_registers: 1 backend_name: ibmq_16_melbourne allow_q_object: True - + Qubits [Name / Freq / T1 / T2 / U1 err / U2 err / U3 err / Readout err] ----------------------------------------------------------------------- Q0 / 5.10005 GHz / 67.38168 µs / 20.8927 µs / 0.0 / 0.00157 / 0.00313 / 0.0447 @@ -169,7 +169,7 @@ information for a single backend by calling ``backend_monitor``: Q11 / 5.00527 GHz / 61.25009 µs / 101.05622 µs / 0.0 / 0.00181 / 0.00362 / 0.0816 Q12 / 4.76015 GHz / 96.01526 µs / 143.34551 µs / 0.0 / 0.00332 / 0.00663 / 0.1608 Q13 / 4.96847 GHz / 22.97295 µs / 39.88249 µs / 0.0 / 0.00524 / 0.01047 / 0.0493 - + Multi-Qubit Gates [Name / Type / Gate Error] -------------------------------------------- CX1_0 / cx / 0.04706 @@ -210,9 +210,9 @@ available to us, then we can use ``backend_overview()`` Operational: True Operational: True Avg. T1: 55.1 Avg. T1: 50.9 Avg. T2: 69.6 Avg. T2: 25.3 - - - + + + There are also Jupyter magic equivalents that give more detailed diff --git a/docs/terra/overview.rst b/docs/terra/overview.rst index 579ad263c3e9..3e04c41afbd9 100644 --- a/docs/terra/overview.rst +++ b/docs/terra/overview.rst @@ -95,10 +95,11 @@ quantum states, operations, and channels. Visualization Tools ^^^^^^^^^^^^^^^^^^^ -In Terra we have many tools to visualize a quantum circuit. This allows a quick inspection of the quantum -circuit to make sure it is what the user wanted to implement. There is a text, python and latex version. -Once the circuit has run it is important to be able to view the output. There is a simple function -(`plot_histogram`) to plot the results from a quantum circuit including an interactive version. -There is also a function `plot_state` and ` plot_bloch_vector` that allow the plotting of a -quantum state. These functions are usually only used when using the `statevector_simulator` -backend but can also be used on real data after running state tomography experiments (ignis). +In Terra we have many tools to visualize a quantum circuit. This allows a quick inspection of the +quantum circuit to make sure it is what the user wanted to implement. There is a text, python and +latex version. Once the circuit has run it is important to be able to view the output. There is a +simple function (`plot_histogram`) to plot the results from a quantum circuit including an +interactive version. There is also a function `plot_state` and ` plot_bloch_vector` that allow the +plotting of a quantum state. These functions are usually only used when using the +`statevector_simulator` backend but can also be used on real data after running state tomography +experiments (ignis).