Go to file
Matthew Treinish 9e08552f99
Bump reno requirement to latest version and set default_branch (#1300)
When we switched to using main as the default branch for qiskit-aer
we encountered a bug in reno that required a branch named master to exist
for traversing the git history. To workaround that issue we temporarily
added back a branch named master while we waited for the fix [1] to be
included in a release. A new reno release has been published [2] and we
can rely on that version and delete the idle master branch now. This
commit makes this change and switches to using reno>=3.4.0 and uses
the new default_branch configuration option added in 3.4.0 to fix the
issue.

[1] ed6bbae82e
[2] https://pypi.org/project/reno/3.4.0/
2021-08-03 10:47:58 -04:00
.github fix test errors due to recent terra updates (#1292) 2021-07-14 07:20:35 -04:00
cmake Update minimum Conan version to 1.31.2. (#1097) 2021-01-14 11:46:22 +01:00
contrib/standalone Fix compiler errors when using MPI (#1241) 2021-04-30 10:05:43 -04:00
docs Bump version string post release (#1208) 2021-04-05 13:21:48 +02:00
qiskit remove Legacy Pauli (#1295) 2021-07-26 09:56:51 -04:00
releasenotes/notes Bump reno requirement to latest version and set default_branch (#1300) 2021-08-03 10:47:58 -04:00
src fix a bug to generate a diagonal gate in the end of circuit (#1294) 2021-07-20 10:43:47 -04:00
test fix test errors due to recent terra updates (#1292) 2021-07-14 07:20:35 -04:00
tools Add MPI standalone CI build job (#1242) 2021-04-30 11:35:27 -04:00
.clang-tidy Modernizing code (#338) 2019-09-26 09:56:15 -04:00
.gitignore Pulse sim tests (#379) 2020-01-23 12:08:53 -05:00
.mailmap Update mailmap (#1268) 2021-06-14 15:44:16 -04:00
.pylintrc Spelling_and_grammer_mistakes (#854) 2020-08-04 15:38:22 +02:00
.stestr.conf Switch group regex to parallel-class 2019-11-14 14:47:30 -05:00
.travis.yml Add arm64 release wheel jobs (#1162) 2021-02-26 11:42:00 -05:00
BENCHMARKING.md Prepare for renaming default branch to main (#1233) 2021-04-28 16:15:27 -04:00
CMakeLists.txt CMake: use native DL_LIB finding (#1250) 2021-05-14 07:04:57 -04:00
CODE_OF_CONDUCT.md Qiskit projects point to main CoC (#1049) 2020-11-18 16:41:57 -05:00
CONTRIBUTING.md Prepare for renaming default branch to main (#1233) 2021-04-28 16:15:27 -04:00
LICENSE.txt * Added Apache 2 license 2018-08-29 13:28:45 +02:00
MANIFEST.in Improve API docs for new instructions (#1198) 2021-03-29 18:48:54 -04:00
README.md fixed broken link in README.md - Next steps (#1265) 2021-06-15 10:25:59 +02:00
constraints.txt Fix macos tests in CI (#1115) 2021-02-03 13:46:12 -05:00
pyproject.toml Add min version for scikit-build (#1182) 2021-03-18 08:09:26 +01:00
requirements-dev.txt Bump reno requirement to latest version and set default_branch (#1300) 2021-08-03 10:47:58 -04:00
setup.py Prepare 0.8 release (#1207) 2021-04-01 15:31:26 -04:00
tox.ini Add Python 3.9 support (#1071) 2020-12-10 16:14:30 +01:00

README.md

Qiskit Aer

LicenseBuild Status

Qiskit is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms.

Qiskit is made up of elements that each work together to enable quantum computing. This element is Aer, which provides high-performance quantum computing simulators with realistic noise models.

Installation

We encourage installing Qiskit via the PIP tool (a python package manager), which installs all Qiskit elements, including this one.

pip install qiskit

PIP will handle all dependencies automatically for us and you will always install the latest (and well-tested) version.

To install from source, follow the instructions in the contribution guidelines.

Installing GPU support

In order to install and run the GPU supported simulators on Linux, you need CUDA® 10.1 or newer previously installed. CUDA® itself would require a set of specific GPU drivers. Please follow CUDA® installation procedure in the NVIDIA® web.

If you want to install our GPU supported simulators, you have to install this other package:

pip install qiskit-aer-gpu

This will overwrite your current qiskit-aer package installation giving you the same functionality found in the canonical qiskit-aer package, plus the ability to run the GPU supported simulators: statevector, density matrix, and unitary.

Note: This package is only available on x86_64 Linux. For other platforms that have CUDA support you will have to build from source. You can refer to the contributing guide for instructions on doing this.

Simulating your first quantum program with Qiskit Aer

Now that you have Qiskit Aer installed, you can start simulating quantum circuits with noise. Here is a basic example:

$ python
import qiskit
from qiskit import IBMQ
from qiskit.providers.aer import AerSimulator

# Generate 3-qubit GHZ state
circ = qiskit.QuantumCircuit(3)
circ.h(0)
circ.cx(0, 1)
circ.cx(1, 2)
circ.measure_all()

# Construct an ideal simulator
aersim = AerSimulator()

# Perform an ideal simulation
result_ideal = qiskit.execute(circ, aersim).result()
counts_ideal = result_ideal.get_counts(0)
print('Counts(ideal):', counts_ideal)
# Counts(ideal): {'000': 493, '111': 531}

# Construct a noisy simulator backend from an IBMQ backend
# This simulator backend will be automatically configured
# using the device configuration and noise model 
provider = IBMQ.load_account()
backend = provider.get_backend('ibmq_athens')
aersim_backend = AerSimulator.from_backend(backend)

# Perform noisy simulation
result_noise = qiskit.execute(circ, aersim_backend).result()
counts_noise = result_noise.get_counts(0)

print('Counts(noise):', counts_noise)
# Counts(noise): {'000': 492, '001': 6, '010': 8, '011': 14, '100': 3, '101': 14, '110': 18, '111': 469}

Contribution Guidelines

If you'd like to contribute to Qiskit, please take a look at our contribution guidelines. This project adheres to Qiskit's code of conduct. By participating, you are expect to uphold to this code.

We use GitHub issues for tracking requests and bugs. Please use our slack for discussion and simple questions. To join our Slack community use the link. For questions that are more suited for a forum we use the Qiskit tag in the Stack Exchange.

Next Steps

Now you're set up and ready to check out some of the other examples from our Qiskit IQX Tutorials or Qiskit Community Tutorials repositories.

Authors and Citation

Qiskit Aer is the work of many people who contribute to the project at different levels. If you use Qiskit, please cite as per the included BibTeX file.

License

Apache License 2.0