Gates · Controlled gate
Controlled-X gate
The canonical two-qubit controlled operation used to create correlation and entanglement.
Exact & formalUpdated
A small worked example, computed in your browser. It is not a result from this record's papers.
CX on a superposed control is what makes entanglement
Two qubits: qubit 0 put into |+⟩, qubit 1 left at |0⟩. On a control that is definitely 0 or definitely 1, CX is just a conditional NOT; on a control in superposition it is something a classical circuit has no version of.
Step 1 of 2 · H
Probability of each outcome after this step
- 0050%
- 0150%
Puts the control into an equal superposition of 0 and 1. Qubit 1 is untouched and still reads 0 with certainty; at this point each qubit still has a state of its own.
Probability spreads from 1 outcome to 2. All 2 are equally likely.
Flips qubit 1 in the branch where qubit 0 is 1, and leaves it alone in the branch where qubit 0 is 0 — both at once. Neither qubit has a state of its own after this; only the pair does.
Probability moves: 1 outcome appears that had none, 1 drops to zero, 2 carry probability now. Up: 11 0.0% → 50.0%. Down: 01 50.0% → 0.0%. This is the step that entangles the qubits: from here on no single qubit has a state of its own, only the register as a whole does.
Readout Measuring gives 00 or 11, each half the time, and never 01 or 10: the two qubits always agree, without either of them having been a definite value beforehand. This two-gate circuit is the Bell pair, and it is the smallest entangled state there is.
Open in Studio- Steps1
- Wires2
- Qubits2
- Depth1 gate
- Outcomesconditional
- Papers1
Controlled-X is the bridge between a single-qubit operation and a multi-qubit circuit contract.
Takes2 qubitsWhat joins here
Takes a 2-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 2 qubits can feed it.
16 entries meet this end. Named below.
Returns2 qubitsWhat joins here
Returns a 2-qubit register a next stage can take. This is the end that joins.
11 entries meet this end. Named below.
A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →
Controlled- (CNOT) acts on two qubits as : the target flips exactly when the control is , the truth table this record checks directly against the four computational-basis inputs. In matrix form, , a permutation matrix that is its own inverse, . Applied after a Hadamard on the control, , the Bell state this catalog's entangling-action check reproduces — the second half of the verification claim. CNOT is a maximally entangling two-qubit gate: together with arbitrary single-qubit rotations it forms a universal gate set, and physically it is the standard native (or compiled) two-qubit interaction most hardware backends expose, making it the workhorse for building larger controlled operations.
Takes2 qubitsWhat joins here
Takes a 2-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 2 qubits can feed it.
16 entries meet this end. Named below.
Returns2 qubitsWhat joins here
Returns a 2-qubit register a next stage can take. This is the end that joins.
11 entries meet this end. Named below.
A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →
- Qubits
- 2
- Depth
- 1 gate
- Outcomes
- conditional
- Control
- q[0]
- Target
- q[1]
- Universal role
- Entangling basis gate
CXon q[0], q[1]
Quantum vs classical
Classical baseline
Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.
Quantum claim
The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.
How to compare
Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.
Nobody has reviewed this record for gaps yet.
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
cx q[0], q[1];Related entries
- Bell state measurement
Basic circuits
- SWAP gate
Gates
References
- Quantum Computation and Quantum Information: 10th Anniversary Edition
Michael A. Nielsen and Isaac L. Chuang · 2010
Standard graduate textbook covering the single- and two-qubit gate definitions, matrix identities, and circuit primitives this record states.