Let be a set of gates, each a unitary on a fixed number of qubits, and let denote the set of -qubit unitaries implemented by circuits over (on any choice of qubits, in any order). Two unitaries are identified when they differ by a global phase , since no measurement distinguishes them.
- is exactly universal if for every (with the largest number of qubits a gate in acts on) and every there is a circuit and a phase with . An exactly universal set is necessarily infinite, because a finite set yields only countably many circuits.
- is approximately universal if for every such , every and every there are and with
where is the operator norm. Equivalently, the image of in the projective unitary group is dense.
Variants restrict the target: a set may be universal on a subgroup (for instance real orthogonal matrices) or computationally universal, meaning it simulates every circuit with polynomial overhead using an encoding into more qubits, which is weaker than density in . The operator-norm error is the natural one because errors add along a circuit: replacing each gate by with changes the product by at most in operator norm (section 4.5.3 of Nielsen and Chuang). How many gates an approximation needs is the subject of the Solovay–Kitaev theorem.