◄Previous: 4.2 Classical Boolean gates

# 5 Qubits and quantum gates

Quantum computing is based on units of information called qubits (quantum bits, and pronounced kew-bits), which obey the laws of quantum mechanics. A qubit is the quantum analogue of a classical bit. The classical bit values 0 and 1 are replaced by the orthonormal basis states of the quantum-mechanical qubit and . The basis states are given the name logical states, since they correspond to the classical bits upon which the logic gates operate. The key difference between qubits and classical bits is that qubits can exist in a superposition of the and states, which means qubits can be prepared in the superposition state:

Remarkably, you can take logic gates similar to the Boolean logic gates of classical computing and apply them to the qubits. In doing so, the input state of the qubits is transformed into the output state. To obtain the result of the computation, the value (0 or 1) of each qubit is measured. As you will see, the resulting outputs can include entangled states of two or more qubits.

Quantum entanglement is a fundamental resource for quantum computing as it involves the distribution of information in a fundamentally non-classical way.

In this section, you will learn the definition of a qubit and be introduced to some single-qubit and two-qubit logic gates. The quantum CNOT gate is an important gate as it can entangle and disentangle a pair of qubits. By the end of this section you will have been introduced to quantum circuits and there is a final activity to test your understanding.

◄Contents►Next: 5.1 Defining a qubit

OpenLearn - Introduction to quantum computing
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.