Site Tools


qiskit

Table of Contents

Qiskit

Qiskit is IBM's open-source Python framework for quantum computing. Build quantum circuits using gates, transpile them for hardware, simulate locally (up to ~20 qubits), and run on IBM quantum processors or other backends. Widely used for variational algorithms (VQE, QAOA), quantum simulation, and education.

A circuit is a sequence of quantum gates applied to qubits, followed by measurement. A simulator runs the circuit classically; a backend can be either a simulator (like AerSimulator) or a real quantum processor. Use transpilation to adapt your abstract circuit to the specific gate set and topology of your target backend.

from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
 
# Create Bell state: (|00⟩ + |11⟩) / √2
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
 
# Simulate
sim = AerSimulator()
result = sim.run(qc, shots=1000).result()
print(result.get_counts(qc))  # {'00': ~500, '11': ~500}

Circuits are abstract until transpiled—Qiskit adapts gates and layout to your backend's constraints. Run jobs on simulators for debugging, then deploy to hardware via IBM Quantum Platform or custom backends.

Concepts

qiskit.md · Last modified: by 127.0.0.1