on a register of qubits. When applied to a register of qubits all initialized to the Hadamard transform puts the quantum register into a superposition with equal probability of being measured in any of its possible states: This state is a uniform superposition and it is generated as the first step in some search algorithms, for example in amplitude amplification and phase estimation. Measuring this state results in a random number between and How random the number is depends on the fidelity of the logic gates. If not measured, it is a quantum state with equal probability amplitude for each of its possible states. The Hadamard transform acts on a register with qubits such that as follows: Application on entangled states If two or more qubits are viewed as a single quantum state, this combined state is equal to the tensor product of the constituent qubits. Any state that can be written as a tensor product from the constituent subsystems are called separable states. On the other hand, an entangled state is any state that cannot be tensor-factorized, or in other words: An entangled state can not be written as a tensor product of its constituent qubits states. Special care must be taken when applying gates to constituent qubits that make up entangled states. If we have a set of N qubits that are entangled and wish to apply a quantum gate on M < N qubits in the set, we will have to extend the gate to take N qubits. This application can be done by combining the gate with an identity matrix such that their tensor product becomes a gate that act on N qubits. The identity matrix is a representation of the gate that maps every state to itself (i.e., does nothing at all). In a circuit diagram the identity gate or matrix will often appear as just a bare wire. For example, the Hadamard gate acts on a single qubit, but if we feed it the first of the two qubits that constitute the entangled Bell state we cannot write that operation easily. We need to extend the Hadamard gate with the identity gate so that we can act on quantum states that span two qubits: The gate can now be applied to any two-qubit state, entangled or otherwise. The gate will leave the second qubit untouched and apply the Hadamard transform to the first qubit.