# Quantum Computing

## Quantum Circuits

In this section we introduce quantum circuits, a common notation used for communicating quantum algorithms.

### Contents

- Quantum Circuits
- A Simple Quantum Algorithm (Random Number Generator)

## Quantum Circuits

We normally start with our qubits in the state |0⟩, and perform a sequence of operations on them. We use quantum circuits to show this: each line represents a qubit, each box represents an operation and the operations are carried out in chronological order from left to right.

## Example Algorithm: Random Number Generator

We now know enough to create our first quantum algorithm! We start with possibly the most simple algorithm we can think of on a quantum computer- a true random number generator.

#### Algorithm:

- Start with each qubit in the state |0⟩
- Apply an H-gate to each qubit
- Output measurement of the register

After the H-gate, the state of each qubit is |+⟩ which gives equal probability of measuring |0⟩ and |1⟩. This is a truly quantum algorithm (cannot be perfomed on a classical computer).