Skip to content

Commit

Permalink
Minor fixes - Part 1 of 8 (Qiskit#799)
Browse files Browse the repository at this point in the history
* Fix README and INSTALL files.

This fixes the following issues:
- installation instructions updated to IBMQ v3
- old links are moved to correct location
- some typos
- consistent formatting

* Update gitignore to properly ignore any checkpoints folder

* Remove unnecessary executable permissions

* Fix start and index notebooks.

This introduces the following changes:
- fixes typos
- adds missing references to other notebooks
  • Loading branch information
mrossinek authored and jaygambetta committed Sep 21, 2019
1 parent aafceab commit c61f4c1
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 46 deletions.
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
__pycache__/
.cache/

.ipynb_checkpoints/*

qiskit/*/.ipynb_checkpoints/*
qiskit/*/*/.ipynb_checkpoints/*
community/*/.ipynb_checkpoints/*
community/*/*/.ipynb_checkpoints/*
community/*/*/*/.ipynb_checkpoints/*
# ignores any checkpoints folder anywhere
.ipynb_checkpoints/

Qconfig.py
qiskit/basics/Qconfig_IBMQ_experience.py
Expand All @@ -30,5 +25,3 @@ qiskit/basics/Qconfig_IBMQ_experience_staging.py

qiskit/basics/Qconfig_IBMQ_network-dev.py
.DS_Store

qiskit/.ipynb_checkpoints/start_here-checkpoint.ipynb
61 changes: 39 additions & 22 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,45 @@

**Get the tutorials**<BR>

For the full experience, you can start by downloading the latest release of the tutorials from [here](https://github.com/Qiskit/qiskit-tutorials/releases). Unzip the archive in the directory of your choice (this is the recommended way).
For the full experience, you can start by downloading the latest release of the
tutorials from [here](https://github.com/Qiskit/qiskit-iqx-tutorials/releases).
Unzip the archive in the directory of your choice (this is the recommended
way).

To properly view and run the tutorials, you will need to install [Jupyter Notebook](https://jupyter.readthedocs.io/en/latest/install.html).
To properly view and run the tutorials, you will need to install [Jupyter
Notebook](https://jupyter.readthedocs.io/en/latest/install.html).

## 2. Install Qiskit, Qiskit Aqua and Qiskit Aqua Chemistry

At least [Python 3.5 or later](https://www.python.org/downloads/) is required to install and use Qiskit. If you have multiple Python versions installed (and particularly if the command `python --version` returns an incompatble version), you will need to ensure that your versions are [managed correctly](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-python). This can be done using the `environment.yml` file, as detailed below.
At least [Python 3.5 or later](https://www.python.org/downloads/) is required
to install and use Qiskit. If you have multiple Python versions installed (and
particularly if the command `python --version` returns an incompatible
version), you will need to ensure that your versions are [managed
correctly](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-python).
This can be done using the `environment.yml` file, as detailed below.

When there are no issues with dependencies, Qiskit can be installed using

```
pip install qiskit
```

Or, pre-installed Qiskit can be updated using
Or, a pre-installed Qiskit can be updated using

```
pip install -U qiskit
```

However, in case of issues with dependencies, we recommend the following installation procedure:
However, in case of issues with dependencies, we recommend the following
installation procedure:

1. **Install [conda](https://conda.io/docs/index.html)**

2. **Create conda environment for Qiskit and install packages** (with the accompanying `environment.yml` file)
2. **Create conda environment for Qiskit and install packages** (with the
accompanying `environment.yml` file)

```
cd qiskit-tutorial
cd qiskit-iqx-tutorials
conda env create -f environment.yml
```

Expand All @@ -51,35 +62,36 @@ conda env update -f environment.yml

- Create an [IBM Q](https://quantumexperience.ng.bluemix.net) account if
you haven't already done so
- Get an API token from the IBM Q website under “My
Account” > “Advanced”
- We are now going to add the necessary credentials to Qiskit. Take your token, here called `MY_API_TOKEN`,
and pass it to the `IBMQ.save_account()` function:
- Get an API token from the IBM Q website under “My Account" > "Qiskit in
local environment"
- We are now going to add the necessary credentials to Qiskit. Take your
token, here called `MY_API_TOKEN`, and pass it to the `IBMQ.save_account()`
function:

```python
from qiskit import IBMQ

IBMQ.save_account('MY_API_TOKEN')
```

- Your credentials will be stored on disk. Once they are stored, at any point in the future you can load and use
them via:
- Your credentials will be stored on disk. Once they are stored, at any point
in the future you can load and use them via:

```python
from qiskit import IBMQ

IBMQ.load_accounts()
provider = IBMQ.load_account()
```

- For those who do not want to save their credentials to disk, please use

```python
from qiskit import IBMQ

IBMQ.enable_account('MY_API_TOKEN')
provider = IBMQ.enable_account('MY_API_TOKEN')
```

and the token will only be active for the session.
and the token will only be active for the session.


## 4. Explore the Tutorials
Expand All @@ -97,7 +109,8 @@ For Windows, run:
activate Qiskitenv
```
**Note for conda users**<BR>
Verify that you have installed the right Jupyter Kernel, because in the last conda version it's not installed by default.
Verify that you have installed the right Jupyter Kernel, because in the last
conda version it's not installed by default.

```
python -m ipykernel install --user --name Qiskitenv --display-name "Python (Qiskitenv)"
Expand All @@ -110,27 +123,31 @@ jupyter notebook index.ipynb
```

## 5. [Optional] Visualizing Circuits with LaTeX
You can visualize your quantum circuits directly from Qiskit. Qiskit circuit drawers support text, LaTeX and matplotlib. The text and matplotlib version is entirely native to Python, and thus easy to use. The LaTeX version produces publication-quality circuit images, but relies on some pre-requisite software. These include the `pdflatex` compiler for rendering LaTeX documents, and the Poppler library for converting PDF to image. To get these:
You can visualize your quantum circuits directly from Qiskit. Qiskit circuit
drawers support text, LaTeX and matplotlib. The text and matplotlib version is
entirely native to Python, and thus easy to use. The LaTeX version produces
publication-quality circuit images, but relies on some pre-requisite software.
These include the `pdflatex` compiler for rendering LaTeX documents, and the
Poppler library for converting PDF to image. To get these:

On Linux:

- Install [MiKTeX](https://miktex.org/download#unx)
- Install Poppler:
- Run: ```apt-get install -y poppler-utils```
- Run: `apt-get install -y poppler-utils`

On MacOS:

- Install [MiKTeX](https://miktex.org/download).
- Install Poppler:
- Run:```brew install poppler```
- Run: `brew install poppler`

On Windows:

- Install [MiKTeX](https://miktex.org/download).
- Install Poppler:
- Download the [latest binary](http://blog.alivate.com.au/wp-content/uploads/2017/01/poppler-0.51_x86.7z).
- Extract the downloaded `.7z` file into user directory:
`c:\Users\<user_name>\`.
- Extract the downloaded `.7z` file into user directory: `c:\Users\<user_name>\`.
Note: You will need to have the [7zip software](https://www.7-zip.org/download.html) for this.
- Add to PATH:
- Right click on "This PC" -> Properties -> Advanced System Settings -> Environment Variables
Expand Down
51 changes: 38 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,65 @@

Welcome to the [Qiskit](https://www.qiskit.org/) IQX Tutorials!

In this repository, we've put together a collection of Jupyter notebooks aimed at teaching people who want to use Qiskit for writing quantum computing programs, and executing them on one of several backends (online quantum processors, online simulators, and local simulators). The online quantum processors are the [IBM Q](https://quantum-computing.ibm.com) devices.
In this repository, we've put together a collection of Jupyter notebooks aimed
at teaching people who want to use Qiskit for writing quantum computing
programs, and executing them on one of several backends (online quantum
processors, online simulators, and local simulators). The online quantum
processors are the [IBM Q](https://quantum-computing.ibm.com) devices.

For our community-contributed tutorials, please check out the [qiskit-community-tutorials](https://github.com/Qiskit/qiskit-tutorials-community) repository.
For our community-contributed tutorials, please check out the
[qiskit-community-tutorials](https://github.com/Qiskit/qiskit-tutorials-community)
repository.

## Installation

The notebooks for these tutorials can be viewed here on GitHub...but for the full experience, you'll want to interact with them!
The easiest way to do this is by logging into the [IBM Quantum Experience](https://quantum-computing.ibm.com/), which lets you use Jupyter notebooks,
including these tutorials, via the web.
The notebooks for these tutorials can be viewed here on GitHub...but for the
full experience, you'll want to interact with them! The easiest way to do this
is by logging into the [IBM Quantum
Experience](https://quantum-computing.ibm.com/), which lets you use Jupyter
notebooks, including these tutorials, via the web.

Please refer to this [installation guide](INSTALL.md) for setting up Qiskit and the tutorials on your own machine (this is the recommended way).
Please refer to this [installation guide](INSTALL.md) for setting up Qiskit and
the tutorials on your own machine (this is the recommended way).

## Contents

We've collected a core reference set of notebooks in this section outlining the features of Qiskit. We will be keeping them up to date with the latest Qiskit version.
We've collected a core reference set of notebooks in this section outlining the
features of Qiskit. We will be keeping them up to date with the latest Qiskit
version.

- [Basics](qiskit/fundamentals) is for those who are getting started.
- [Terra](qiskit/advanced/terra) is for those who want to study circuits.
- [Aer](qiskit/advanced/aer) is for those who want to simulate quantum circuits.
- [Ignis](qiskit/advanced/ignis) is for those who want to study noise.
- [Aqua](qiskit/advanced/aqua) is for those who want to develop applications on NISQ computers.

To go through the Qiskit examples, load up the [start_here.ipynb](qiskit/1_start_here.ipynb) notebook and start seeing how Qiskit works.
To go through the Qiskit examples, load up the
[start_here.ipynb](qiskit/1_start_here.ipynb) notebook and start seeing how
Qiskit works.

## Contribution Guidelines

If you'd like to contribute to Qiskit IQX Tutorials, please take a look at our
[contribution guidelines](.github/CONTRIBUTING.md). This project adheres to Qiskit's [code of conduct](.github/CODE_OF_CONDUCT.md). By participating, you are expect to uphold to this code.

We use [GitHub issues](https://github.com/Qiskit/qiskit-tutorials/issues) for tracking requests and bugs. Please use our [Slack](https://qiskit.slack.com) for discussion and simple questions. To join our Slack community, use the [link](https://join.slack.com/t/qiskit/shared_invite/enQtNDc2NjUzMjE4Mzc0LTMwZmE0YTM4ZThiNGJmODkzN2Y2NTNlMDIwYWNjYzA2ZmM1YTRlZGQ3OGM0NjcwMjZkZGE0MTA4MGQ1ZTVmYzk). For questions that are more suited for a forum, we use the Qiskit tag in the [Stack Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).
[contribution guidelines](.github/CONTRIBUTING.md). This project adheres to
Qiskit's [code of conduct](.github/CODE_OF_CONDUCT.md). By participating, you
are expect to uphold to this code.

We use [GitHub issues](https://github.com/Qiskit/qiskit-tutorials/issues) for
tracking requests and bugs. Please use our [Slack](https://qiskit.slack.com)
for discussion and simple questions. To join our Slack community, use the
[link](https://join.slack.com/t/qiskit/shared_invite/enQtNDc2NjUzMjE4Mzc0LTMwZmE0YTM4ZThiNGJmODkzN2Y2NTNlMDIwYWNjYzA2ZmM1YTRlZGQ3OGM0NjcwMjZkZGE0MTA4MGQ1ZTVmYzk).
For questions that are more suited for a forum, we use the Qiskit tag in the
[Stack
Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).

## Authors and Citation

Qiskit IQX Tutorials is the work of [many people](https://github.com/Qiskit/qiskit-tutorials/graphs/contributors) who contribute
to the project at different levels. If you use Qiskit, please cite as per the included [BibTeX file](https://github.com/Qiskit/qiskit/blob/master/Qiskit.bib).
Qiskit IQX Tutorials is the work of [many
people](https://github.com/Qiskit/qiskit-tutorials/graphs/contributors) who
contribute to the project at different levels. If you use Qiskit, please cite
as per the included [BibTeX
file](https://github.com/Qiskit/qiskit/blob/master/Qiskit.bib).

## License

Expand Down
7 changes: 5 additions & 2 deletions qiskit/1_start_here.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"These tutorials aim to explain how to use Qiskit. We assume you have installed Qiskit; if not, please look at [qiskit.org](http://www.qiskit.org) or the install [documentation](https://qiskit.org/documentation/install.html). \n",
"\n",
"\n",
"We've collected a core reference set of notebooks in this section outlining the features of Qiskit. We will be keeping them up to date with the latest Qiskit version, currently 0.12. The focus of these notebooks is not on learning quantum computing. Instead we will be focused on how to use Qiskit, and will go into details only when needed. For those interested in learning about quantum computing we recommend the awesome [educational material](https://quantum-computing.ibm.com/support) we and the community have put together.\n",
"We've collected a core reference set of notebooks in this section outlining the features of Qiskit. We will be keeping them up to date with the latest Qiskit version, currently 0.12. The focus of these notebooks is not on learning quantum computing. Instead we will focus on how to use Qiskit, and will go into details only when needed. For those interested in learning about quantum computing we recommend the awesome [educational material](https://quantum-computing.ibm.com/support) we and the community have put together.\n",
"\n",
"\n",
"Qiskit is made up of four elements: Terra, Aer, Ignis, and Aqua. Each element has its own goal, and together they make the full Qiskit framework. \n",
Expand Down Expand Up @@ -71,6 +71,7 @@
"7. [Matrix Product State simulator](advanced/aer/7_matrix_product_state_method.ipynb) - Gives an overview of the *matrix product state* Simulator method\n",
" \n",
"## 4 Qiskit Ignis\n",
"\n",
"Ignis, the ‘fire’ element, is dedicated to fighting noise and errors and to forging a new path. This includes better characterization of errors, improving gates, and computing in the presence of noise. Ignis is meant for those who want to design quantum error correction codes, or who wish to study ways to characterize errors through methods such as tomography and randomized benchmarking, or even to find a better way for using gates by exploring dynamical decoupling and optimal control. Ignis tutorials are found [here](advanced/ignis/) and include:\n",
" 1. [Calibrating a qubit](advanced/ignis/1_calibrating_a_qubit.ipynb) - Using pulse to calibrate a \"pi-pulse\" gate by fitting a Rabi oscillation on a qubit. Using the \"pi-pulse\" measure the single-shot analog voltages that are returned by an experiment.\n",
" 2. [Hamiltonian and gate characterizations](advanced/ignis/2_hamiltonian_and_gate_characterization.ipynb) - Sequences to measure ZZ rates between qubits and to measure rotation and angle errors in the gates.\n",
Expand All @@ -89,15 +90,17 @@
" \n",
"\n",
"## 5 Qiskit Aqua\n",
"\n",
"Aqua, the ‘water’ element, is the element of life. To make quantum computing live up to its expectations, we need to find real-world applications. Aqua is where algorithms for NISQ computers are built. These algorithms can be used to build applications for quantum computing.\n",
" * [Amplitude Estimation](advanced/aqua/amplitude_estimation.ipynb) - Illustrates amplitude estimation, for a simple case, where the (assumed to be unknown) success probability *p* of a Bernoulli random variable is estimated\n",
" * [HHL](advanced/aqua/linear_systems_of_equations.ipynb) - Solving linear systems of equations with the HHL algorithm\n",
" * [Creating an Aqua algorithm](advanced/aqua/Aqua_how_to_build_a_pluggable_algorithm_components.ipynb) - Building an algorithm within the framework of Aqua\n",
" * [Generating Random Variates](advanced/aqua/generating_random_variates.ipynb) - Illustrates ways of generating random variates of several popular distributions on IBM Q\n",
"\n",
"Aqua is accessible to domain experts in *Artificial Intelligence*, *Chemistry*, *Finance* or *Optimization*, who want to explore the benefits of using quantum computers as accelerators for specific computational tasks, without needing to worry about how to translate the problem into the language of quantum machines:\n",
"\n",
"### 5.1 Qiskit Artificial Intelligence\n",
"[Qiskit AI](advanced/aqua/artificial_intelligence/index.ipynb) demonstates using quantum computers to tackle problems in the artificial intelliegence domain. These include using a quantum-enhanced support vector machine to experiment with classification problems on a quantum computer\n",
"[Qiskit AI](advanced/aqua/artificial_intelligence/index.ipynb) - demonstrates using quantum computers to tackle problems in the artificial intelligence domain. These include using a quantum-enhanced support vector machine to experiment with classification problems on a quantum computer.\n",
"\n",
"### 5.2 Qiskit Chemistry\n",
"[Qiskit Chemistry](advanced/aqua/chemistry/index.ipynb) - applications in the domain of quantum chemistry on quantum computers, including ground state energy, dipole moments and dissociation plots\n",
Expand Down
5 changes: 5 additions & 0 deletions qiskit/advanced/aqua/finance/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"- <a href=\"simulation/option_pricing.ipynb\">Option Pricing</a>\n",
"- <a href=\"simulation/credit_risk_analysis.ipynb\">Credit Risk Analysis</a>\n",
"- <a href=\"simulation/fixed_income_pricing.ipynb\">Fixed Income Pricing</a>\n",
"- <a href=\"simulation/basket_option_pricing.ipynb\">Basket Option Pricing</a>\n",
"- <a href=\"simulation/bull_spread_pricing.ipynb\">Bull Spread Pricing</a>\n",
"- <a href=\"simulation/asian_barrier_spread_pricing.ipynb\">Asian Barrier Spread Pricing</a>\n",
"- <a href=\"simulation/european_call_option_pricing.ipynb\">European Call Option Pricing</a>\n",
"- <a href=\"simulation/european_put_option_pricing.ipynb\">European Put Option Pricing</a>\n",
"\n",
"#### Data Providers:\n",
"- <a href=\"data_providers/time_series.ipynb\">Stock Market Time Series</a>"
Expand Down
2 changes: 2 additions & 0 deletions qiskit/advanced/aqua/optimization/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"## Contents\n",
"\n",
"* [Solve classical optimization](max_cut_and_tsp.ipynb) (Max-Cut and Traveling Salesman Problem)\n",
"* [Another example](vehicle_routing.ipynb) (Vehicle Routing)\n",
"* [DOcplex](docplex.ipynb) (Generating Ising Hamiltonians from optimization models with DOcplex)\n",
"* More examples can be found in [community/optimization](https://github.com/Qiskit/qiskit-tutorials-community/tree/master/optimization)"
]
},
Expand Down
Empty file modified qiskit/advanced/ignis/8_repetition_code.ipynb
100755 → 100644
Empty file.
Empty file modified qiskit/fundamentals/3_the_ibmq_account.ipynb
100755 → 100644
Empty file.

0 comments on commit c61f4c1

Please sign in to comment.