Go to file
Kento Ueda f492c450a7
Add a new argument concurrent_measurements to target class (#10258)
* fix measure_v2

* modify measure_all

* dispatch backend

* add test of the builder with backendV2

* reconfigure test codes and some func

* refactoring

* add reno

* fix _measure_v2

* fix backend.meas_map in measure_v2

* fix reno

* delete get_qubit_channels from utils

* add get_qubits_channels in qubit_channels

* recostruct test about the builder with backendV2

* add meas_map to Target class

* fix after mergin main branch

* fix documents about meas_map

* format target.py

* add reno

* add meas_map to target in convert_to_target

* add the more description about meas_map

* Update releasenotes/notes/enable_target_aware_meas_map-0d8542402a74e9d8.yaml

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>

* fix test_meas_map

* remove format_meas_map

* rename meas_map in target to concurrent_measuments

* change reno

* remove Unused Union Dict

* concurrent_measurements set as getattr(configuration, meas_map)

* Update qiskit/transpiler/target.py

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>

* Update qiskit/transpiler/target.py

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>

* format

---------

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
2023-07-20 00:15:50 +00:00
.azure move and enable visual tests (#9961) 2023-07-11 16:42:58 +00:00
.binder
.cargo
.github Honour CI constraints in Neko tests (#10373) 2023-07-03 15:14:02 +00:00
crates Support control flow in `SabreSwap` and `SabreLayout`. (#10366) 2023-07-18 23:09:02 +00:00
docs Add initial representation of classical expressions (#10332) 2023-07-13 21:49:18 +00:00
examples Ruff enable flake8-comprehensions (C4) (#10339) 2023-06-28 12:14:24 +00:00
qiskit Add a new argument concurrent_measurements to target class (#10258) 2023-07-20 00:15:50 +00:00
releasenotes Add a new argument concurrent_measurements to target class (#10258) 2023-07-20 00:15:50 +00:00
test Add a new argument concurrent_measurements to target class (#10258) 2023-07-20 00:15:50 +00:00
tools Add `HAS_PYGMENTS` lazy tester (#9944) 2023-07-10 15:41:38 +00:00
.editorconfig
.git-blame-ignore-revs
.gitignore Update .gitignore to reflect new auto visual tests (#10430) 2023-07-14 17:06:36 +00:00
.local-spellings
.mailmap
.mergify.yml Bump main branch version post 0.24.0rc1 tag (#10005) 2023-04-20 21:58:50 +00:00
.stestr.conf
CITATION.bib CITATION.md from metapackage (#10111) 2023-05-15 14:22:59 +00:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Add ruff to local tests and CI (#10116) 2023-05-30 22:43:36 +00:00
Cargo.lock Support control flow in `SabreSwap` and `SabreLayout`. (#10366) 2023-07-18 23:09:02 +00:00
Cargo.toml Bump main branch version post 0.24.0rc1 tag (#10005) 2023-04-20 21:58:50 +00:00
LICENSE.txt
MANIFEST.in Remove non-existent files from MANIFEST.in (#9752) 2023-03-08 13:09:39 +00:00
Makefile Add ruff to local tests and CI (#10116) 2023-05-30 22:43:36 +00:00
README.md CITATION.md from metapackage (#10111) 2023-05-15 14:22:59 +00:00
SECURITY.md
azure-pipelines.yml Drop support for Python 3.7 (#10009) 2023-05-05 15:28:34 +00:00
constraints.txt Relax pin on `qiskit-aer==0.12.0` in CI (#10419) 2023-07-13 07:42:40 +00:00
pyproject.toml ruff executable check (#10341) 2023-07-15 00:45:04 +00:00
qiskit_bot.yaml Remove Junye from Qiskit Bot notifications (#10420) 2023-07-13 08:01:27 +00:00
requirements-dev.txt Add ruff to local tests and CI (#10116) 2023-05-30 22:43:36 +00:00
requirements.txt Drop Python-3.7 pin on `importlib-metadata` (#10444) 2023-07-18 17:00:29 +00:00
rust-toolchain.toml
setup.py ruff executable check (#10341) 2023-07-15 00:45:04 +00:00
tox.ini Add ruff to local tests and CI (#10116) 2023-05-30 22:43:36 +00:00

README.md

Qiskit Terra

LicenseReleaseDownloadsCoverage StatusMinimum rustc 1.61.0

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

This library is the core component of Qiskit, Terra, which contains the building blocks for creating and working with quantum circuits, programs, and algorithms. It also contains a compiler that supports different quantum computers and a common interface for running programs on different quantum computer architectures.

For more details on how to use Qiskit you can refer to the documentation located here:

https://qiskit.org/documentation/

Installation

We encourage installing Qiskit via pip. The following command installs the core Qiskit components, including Terra.

pip install qiskit

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

To install from source, follow the instructions in the documentation.

Creating Your First Quantum Program in Qiskit Terra

Now that Qiskit is installed, it's time to begin working with Qiskit. To do this we create a QuantumCircuit object to define a basic quantum program.

from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0,1], [0,1])

This simple example makes an entangled state, also called a Bell state.

Once you've made your first quantum circuit, you can then simulate it. To do this, first we need to compile your circuit for the target backend we're going to run on. In this case we are leveraging the built-in BasicAer simulator. However, this simulator is primarily for testing and is limited in performance and functionality (as the name implies). You should consider more sophisticated simulators, such as qiskit-aer, for any real simulation work.

from qiskit import transpile
from qiskit.providers.basicaer import QasmSimulatorPy
backend_sim = QasmSimulatorPy()
transpiled_qc = transpile(qc, backend_sim)

After compiling the circuit we can then run this on the backend object with:

result = backend_sim.run(transpiled_qc).result()
print(result.get_counts(qc))

The output from this execution will look similar to this:

{'00': 513, '11': 511}

For further examples of using Qiskit you can look at the example scripts in examples/python. You can start with using_qiskit_terra_level_0.py and working up in the levels. Also you can refer to the tutorials in the documentation here:

https://qiskit.org/documentation/tutorials.html

Executing your code on a real quantum chip

You can also use Qiskit to execute your code on a real quantum processor. Qiskit provides an abstraction layer that lets users run quantum circuits on hardware from any vendor that provides an interface to their systems through Qiskit. Using these providers you can run any Qiskit code against real quantum computers. Some examples of published provider packages for running on real hardware are:

You can refer to the documentation of these packages for further instructions on how to get access and use these systems.

Contribution Guidelines

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

We use GitHub issues for tracking requests and bugs. Please join the Qiskit Slack community and use our Qiskit Slack channel for discussion and simple questions. 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 Tutorials repository.

Authors and Citation

Qiskit Terra 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.

Changelog and Release Notes

The changelog for a particular release is dynamically generated and gets written to the release page on Github for each release. For example, you can find the page for the 0.9.0 release here:

https://github.com/Qiskit/qiskit-terra/releases/tag/0.9.0

The changelog for the current release can be found in the releases tab: Releases The changelog provides a quick overview of notable changes for a given release.

Additionally, as part of each release detailed release notes are written to document in detail what has changed as part of a release. This includes any documentation on potential breaking changes on upgrade and new features. For example, you can find the release notes for the 0.9.0 release in the Qiskit documentation here:

https://qiskit.org/documentation/release_notes.html#terra-0-9

License

Apache License 2.0