A quantum circuit (sometimes called a quantum network or a quantum gate array) consists of wires and logic gates. It can be represented by a × unitary matrix, where is the number of qubits. We want to factor this matrix, representing it as scalar and tensor (Kronecker) products of simpler one-qubit and two-qubit matrices.

The input register of the quantum Fourier transform (QFT) circuit contains -qubit basis states that can be written as the Kronecker product of the binary states. The Hadamard gate operates on the single qubit. The controlled gate is represented by the unitary matrix . The output qubits are expressed in the general form , where is a binary fraction. The final result of QFT is obtained after swapping the output qubits (not shown here) and taking the Kronecker product. For the three-qubit case the final answer is