Classical Computing

A computer solves a computational problem by computing a function from to bits. Some problems include:

Integer Factoring

Find the prime factors of a given integer . Here, is the number of bits in , and is the number of bits in the factors. Its hardness in classical computing underlies the security of public-key cryptography.

3SAT Problem

Find whether a -bit string that satisfies all predicates : , where is the logical OR of 3 variables (or their negation). This is a central problem in computational complexity theory.

Matrix Function Eval

Given a matrix , compute a matrix element of a given function of it, e.g. or , where 𝟙. Inverting a matrix allows solving linear systems, and computing the matrix exponential is important in quantum mechanics and differential equations.


We assume that can be specified by giving a number of bits that is a polynomial of , otherwise it would be intractible to even specify the matrix. Classical computers can only solve this in time. Quantum computers can solve this in polynomial time .

1. Classical Circuits

A classical circuit is a model of classical computation made up of wires (carry bits) & gates (transform information). A gate is a function that takes input bits and produces output bits. It is reversible if such that . We can always embed any classical gate (e.g. AND, XOR) into a reversible gate by making the number of outputs bits the same as the number of input bits. This overhead is also polynomial, so doesn't matter in terms of computational complexity.

An algorithm is efficient in the classical circuit model is the number of elementary gates grows only polynomially with input size . It turns out, not every elementary gate is needed to form a universal set (e.g. ).

2. Gate Matrix Representation

A bit is a variable with 2 possible values . We can represent it as a 2-dimensional one-hot vector:

Similarly, two bits may be represented as:

Using the tensor product , we can show that :

2.1 Transformations of 2 Bits

Functions of bits can be written as matrices. For example, the SWAP gate swaps the two bits:

0000
0110
1001
1111

Another common gate is the CNOT gate , which flips the -th bit if the -th bit is :

Where is the XOR operation. The matrix representation of is:

2.2 Transformations of Bits

For bits we have possible bit strings:

Where is a basis of with .

The -fold tensor product is defined as:

The tensor product symbol may be omitted as there is no ambiguity in the notation.

Functions of bits can be represented as matrices. For example:

We will use the following shortcut notation for a matrix acting the -th vector of an -fold tensor product:

𝟙𝟙

For example for : 𝟙𝟙 is the transformation , which flips the -st bit.

Note for any operators , , if , since they act on different bits.

Back to Home