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

Commit c61f4c1

Browse files
mrossinekjaygambetta
authored andcommitted
Minor fixes - Part 1 of 8 (#799)
* 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
1 parent aafceab commit c61f4c1

8 files changed

Lines changed: 91 additions & 46 deletions

File tree

.gitignore

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
__pycache__/
33
.cache/
44

5-
.ipynb_checkpoints/*
6-
7-
qiskit/*/.ipynb_checkpoints/*
8-
qiskit/*/*/.ipynb_checkpoints/*
9-
community/*/.ipynb_checkpoints/*
10-
community/*/*/.ipynb_checkpoints/*
11-
community/*/*/*/.ipynb_checkpoints/*
5+
# ignores any checkpoints folder anywhere
6+
.ipynb_checkpoints/
127

138
Qconfig.py
149
qiskit/basics/Qconfig_IBMQ_experience.py
@@ -30,5 +25,3 @@ qiskit/basics/Qconfig_IBMQ_experience_staging.py
3025

3126
qiskit/basics/Qconfig_IBMQ_network-dev.py
3227
.DS_Store
33-
34-
qiskit/.ipynb_checkpoints/start_here-checkpoint.ipynb

INSTALL.md

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,45 @@
99

1010
**Get the tutorials**<BR>
1111

12-
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).
12+
For the full experience, you can start by downloading the latest release of the
13+
tutorials from [here](https://github.com/Qiskit/qiskit-iqx-tutorials/releases).
14+
Unzip the archive in the directory of your choice (this is the recommended
15+
way).
1316

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

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

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

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

2231
```
2332
pip install qiskit
2433
```
2534

26-
Or, pre-installed Qiskit can be updated using
35+
Or, a pre-installed Qiskit can be updated using
2736

2837
```
2938
pip install -U qiskit
3039
```
3140

32-
However, in case of issues with dependencies, we recommend the following installation procedure:
41+
However, in case of issues with dependencies, we recommend the following
42+
installation procedure:
3343

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

36-
2. **Create conda environment for Qiskit and install packages** (with the accompanying `environment.yml` file)
46+
2. **Create conda environment for Qiskit and install packages** (with the
47+
accompanying `environment.yml` file)
3748

3849
```
39-
cd qiskit-tutorial
50+
cd qiskit-iqx-tutorials
4051
conda env create -f environment.yml
4152
```
4253

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

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

5971
```python
6072
from qiskit import IBMQ
6173

6274
IBMQ.save_account('MY_API_TOKEN')
6375
```
6476

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

6880
```python
6981
from qiskit import IBMQ
7082

71-
IBMQ.load_accounts()
83+
provider = IBMQ.load_account()
7284
```
7385

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

7688
```python
7789
from qiskit import IBMQ
7890

79-
IBMQ.enable_account('MY_API_TOKEN')
91+
provider = IBMQ.enable_account('MY_API_TOKEN')
8092
```
8193

82-
and the token will only be active for the session.
94+
and the token will only be active for the session.
8395

8496

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

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

112125
## 5. [Optional] Visualizing Circuits with LaTeX
113-
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:
126+
You can visualize your quantum circuits directly from Qiskit. Qiskit circuit
127+
drawers support text, LaTeX and matplotlib. The text and matplotlib version is
128+
entirely native to Python, and thus easy to use. The LaTeX version produces
129+
publication-quality circuit images, but relies on some pre-requisite software.
130+
These include the `pdflatex` compiler for rendering LaTeX documents, and the
131+
Poppler library for converting PDF to image. To get these:
114132

115133
On Linux:
116134

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

121139
On MacOS:
122140

123141
- Install [MiKTeX](https://miktex.org/download).
124142
- Install Poppler:
125-
- Run:```brew install poppler```
143+
- Run: `brew install poppler`
126144

127145
On Windows:
128146

129147
- Install [MiKTeX](https://miktex.org/download).
130148
- Install Poppler:
131149
- Download the [latest binary](http://blog.alivate.com.au/wp-content/uploads/2017/01/poppler-0.51_x86.7z).
132-
- Extract the downloaded `.7z` file into user directory:
133-
`c:\Users\<user_name>\`.
150+
- Extract the downloaded `.7z` file into user directory: `c:\Users\<user_name>\`.
134151
Note: You will need to have the [7zip software](https://www.7-zip.org/download.html) for this.
135152
- Add to PATH:
136153
- Right click on "This PC" -> Properties -> Advanced System Settings -> Environment Variables

README.md

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,65 @@
44

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

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

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

1117
## Installation
1218

13-
The notebooks for these tutorials can be viewed here on GitHub...but for the full experience, you'll want to interact with them!
14-
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,
15-
including these tutorials, via the web.
19+
The notebooks for these tutorials can be viewed here on GitHub...but for the
20+
full experience, you'll want to interact with them! The easiest way to do this
21+
is by logging into the [IBM Quantum
22+
Experience](https://quantum-computing.ibm.com/), which lets you use Jupyter
23+
notebooks, including these tutorials, via the web.
1624

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

1928
## Contents
2029

21-
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.
30+
We've collected a core reference set of notebooks in this section outlining the
31+
features of Qiskit. We will be keeping them up to date with the latest Qiskit
32+
version.
33+
2234
- [Basics](qiskit/fundamentals) is for those who are getting started.
2335
- [Terra](qiskit/advanced/terra) is for those who want to study circuits.
2436
- [Aer](qiskit/advanced/aer) is for those who want to simulate quantum circuits.
2537
- [Ignis](qiskit/advanced/ignis) is for those who want to study noise.
2638
- [Aqua](qiskit/advanced/aqua) is for those who want to develop applications on NISQ computers.
2739

28-
To go through the Qiskit examples, load up the [start_here.ipynb](qiskit/1_start_here.ipynb) notebook and start seeing how Qiskit works.
40+
To go through the Qiskit examples, load up the
41+
[start_here.ipynb](qiskit/1_start_here.ipynb) notebook and start seeing how
42+
Qiskit works.
2943

3044
## Contribution Guidelines
3145

3246
If you'd like to contribute to Qiskit IQX Tutorials, please take a look at our
33-
[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.
34-
35-
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).
47+
[contribution guidelines](.github/CONTRIBUTING.md). This project adheres to
48+
Qiskit's [code of conduct](.github/CODE_OF_CONDUCT.md). By participating, you
49+
are expect to uphold to this code.
50+
51+
We use [GitHub issues](https://github.com/Qiskit/qiskit-tutorials/issues) for
52+
tracking requests and bugs. Please use our [Slack](https://qiskit.slack.com)
53+
for discussion and simple questions. To join our Slack community, use the
54+
[link](https://join.slack.com/t/qiskit/shared_invite/enQtNDc2NjUzMjE4Mzc0LTMwZmE0YTM4ZThiNGJmODkzN2Y2NTNlMDIwYWNjYzA2ZmM1YTRlZGQ3OGM0NjcwMjZkZGE0MTA4MGQ1ZTVmYzk).
55+
For questions that are more suited for a forum, we use the Qiskit tag in the
56+
[Stack
57+
Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).
3658

3759
## Authors and Citation
3860

39-
Qiskit IQX Tutorials is the work of [many people](https://github.com/Qiskit/qiskit-tutorials/graphs/contributors) who contribute
40-
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).
61+
Qiskit IQX Tutorials is the work of [many
62+
people](https://github.com/Qiskit/qiskit-tutorials/graphs/contributors) who
63+
contribute to the project at different levels. If you use Qiskit, please cite
64+
as per the included [BibTeX
65+
file](https://github.com/Qiskit/qiskit/blob/master/Qiskit.bib).
4166

4267
## License
4368

qiskit/1_start_here.ipynb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"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",
2323
"\n",
2424
"\n",
25-
"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",
25+
"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",
2626
"\n",
2727
"\n",
2828
"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",
@@ -71,6 +71,7 @@
7171
"7. [Matrix Product State simulator](advanced/aer/7_matrix_product_state_method.ipynb) - Gives an overview of the *matrix product state* Simulator method\n",
7272
" \n",
7373
"## 4 Qiskit Ignis\n",
74+
"\n",
7475
"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",
7576
" 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",
7677
" 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",
@@ -89,15 +90,17 @@
8990
" \n",
9091
"\n",
9192
"## 5 Qiskit Aqua\n",
93+
"\n",
9294
"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",
9395
" * [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",
9496
" * [HHL](advanced/aqua/linear_systems_of_equations.ipynb) - Solving linear systems of equations with the HHL algorithm\n",
9597
" * [Creating an Aqua algorithm](advanced/aqua/Aqua_how_to_build_a_pluggable_algorithm_components.ipynb) - Building an algorithm within the framework of Aqua\n",
98+
" * [Generating Random Variates](advanced/aqua/generating_random_variates.ipynb) - Illustrates ways of generating random variates of several popular distributions on IBM Q\n",
9699
"\n",
97100
"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",
98101
"\n",
99102
"### 5.1 Qiskit Artificial Intelligence\n",
100-
"[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",
103+
"[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",
101104
"\n",
102105
"### 5.2 Qiskit Chemistry\n",
103106
"[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",

qiskit/advanced/aqua/finance/index.ipynb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
"- <a href=\"simulation/option_pricing.ipynb\">Option Pricing</a>\n",
4141
"- <a href=\"simulation/credit_risk_analysis.ipynb\">Credit Risk Analysis</a>\n",
4242
"- <a href=\"simulation/fixed_income_pricing.ipynb\">Fixed Income Pricing</a>\n",
43+
"- <a href=\"simulation/basket_option_pricing.ipynb\">Basket Option Pricing</a>\n",
44+
"- <a href=\"simulation/bull_spread_pricing.ipynb\">Bull Spread Pricing</a>\n",
45+
"- <a href=\"simulation/asian_barrier_spread_pricing.ipynb\">Asian Barrier Spread Pricing</a>\n",
46+
"- <a href=\"simulation/european_call_option_pricing.ipynb\">European Call Option Pricing</a>\n",
47+
"- <a href=\"simulation/european_put_option_pricing.ipynb\">European Put Option Pricing</a>\n",
4348
"\n",
4449
"#### Data Providers:\n",
4550
"- <a href=\"data_providers/time_series.ipynb\">Stock Market Time Series</a>"

qiskit/advanced/aqua/optimization/index.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"## Contents\n",
2020
"\n",
2121
"* [Solve classical optimization](max_cut_and_tsp.ipynb) (Max-Cut and Traveling Salesman Problem)\n",
22+
"* [Another example](vehicle_routing.ipynb) (Vehicle Routing)\n",
23+
"* [DOcplex](docplex.ipynb) (Generating Ising Hamiltonians from optimization models with DOcplex)\n",
2224
"* More examples can be found in [community/optimization](https://github.com/Qiskit/qiskit-tutorials-community/tree/master/optimization)"
2325
]
2426
},

qiskit/advanced/ignis/8_repetition_code.ipynb

100755100644
File mode changed.

qiskit/fundamentals/3_the_ibmq_account.ipynb

100755100644
File mode changed.

0 commit comments

Comments
 (0)