Qiskit provides the ability to develop quantum software both at the machine code level of OpenQASM, and at abstract levels suitable for end-users without quantum computing expertise. This functionality is provided by the following distinct components.
Terra
Qiskit Terra provides tools to create quantum circuits at or close to the level of quantum machine code. It allows the processes that run on quantum hardware to be explicitly constructed in terms of quantum gates. It also provides tools to allow quantum circuits to be optimized for a particular device, as well as managing batches of jobs and running them on remote-access quantum devices and simulators. The following shows a simple example of Qiskit Terra. In this, a quantum circuit is created for two qubits, which consists of the quantum gates required to create a Bell state. The quantum circuit then ends with quantum measurements, which extract a bit from each qubit. from qiskit import QuantumCircuit, Aer, execute qc = QuantumCircuit qc.h qc.cx qc.measure
Once the quantum circuit has been created, it can be run on a backend. In the following example, a local simulator is used. backend = Aer.get_backend job_sim = execute sim_result = job_sim.result print
The final print statement here will show the results returned by the backend. This is a Python dictionary that describes the bit strings obtained from multiple runs of the quantum circuit. In the quantum circuit used in this example, the bit strings '00' and '11' should be the only possible results, and should occur with equal probability. The full results will therefore typically have the samples split approximately equally between the two, such as . Experiments done on quantum hardware using Qiskit Terra have been used in many research papers, such as in tests of quantum error correction , generation of entanglement and simulation of far-from-equilibrium dynamics
Aqua
Qiskit Aqua provides tools that can be used without any explicit quantum programming required by the user themselves. It currently supports applications in chemistry, AI, optimization and finance. Users can provide problems and receive results defined using standard tools in these domains, such as PySCF for chemistry. Qiskit Aqua then implements a corresponding quantum algorithm.
Aer
In the near-term, development of quantum software will depend largely on simulation of small quantum devices. For Qiskit, this is provided by the Aer component. This provides simulators hosted locally on the user's device, as well as HPC resources available through the cloud. The simulators can also simulate the effects of noise for simple and sophisticated noise models.
Ignis
Ignis is a component that contains tools for characterizing noise in near-term devices, as well as allowing computations to be performed in the presence of noise. This is includes tools for benchmarking near-term devices, error mitigation and error correction.