---
title: Quickstart
description: Build and visualize a quantum circuit in under two minutes, no sign-in or API key necessary.
source: https://eu-de.quantum.cloud.ibm.com/docs/en/guides/quick-start
---

# Quickstart

### Package versions

The code on this page was developed using the following requirements.
We recommend using these versions or newer.

```
qiskit[all]~=2.5.1
```

Build your first quantum circuit in under two minutes, on your local environment - no sign-in or API key necessary.

> **New to Python and virtual environments?**
>
> - Download Python and use a virtual environment with Qiskit (recommended).

## 1. Install Qiskit

Install the following with your preferred package manager (such as `pip`):

- [`qiskit`](/docs/guides/install-qiskit)
- [`matplotlib`](https://matplotlib.org/stable/users/explain/quick_start.html)
- [`qiskit[visualization]`](/docs/api/qiskit/visualization)

## 2. Build your circuit

Open a Python environment, then run this code to build a Bell state (two entangled qubits).

```python
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()

sampler = StatevectorSampler()
result = sampler.run([qc], shots=1024).result()
print(result[0].data.meas.get_counts())
```

Output:

```
{'11': 528, '00': 496}
```

The expected output is a near-even split between '00' and '11'.

## 3. Visualize your results

To get a histogram of your results, add the following code to your program.

```python
# Uncomment lines 2 and 8 if you are not using Python in a Jupyter notebook
# import matplotlib.pyplot as plt
from qiskit.visualization import plot_histogram

counts = result[0].data.meas.get_counts()
plot_histogram(counts)

# plt.show()
```

Output:

![Output of the previous code cell](https://eu-de.quantum.cloud.ibm.com/docs/images/guides/quick-start/extracted-outputs/dc4ff012-0.svg)

This result is a signature of quantum entanglement.

## 4. See what happens

Try changing the code to see how it affects the results. For example:

- Add a third qubit by changing to `QuantumCircuit(3)`, and add a second CX gate with `qc.cx(1,2)`. The measurements should then change to 000 and 111, which means all three of these qubits have been entangled.

- See your results shift by adding `qc.x(1)` to the end of the circuit.

## Next steps

> **Recommendations**
>
> - Follow the steps in the [Run your first circuit on hardware](/docs/guides/hello-world) guide to run a circuit on real quantum hardware.
> - Not ready to run on hardware? Start your quantum journey with the [Basics of quantum information](/learning/courses/basics-of-quantum-information) course.
