In computer science, the controlled NOT gate (also C-NOT or CNOT), controlled-X gate, controlled-bit-flip gate, Feynman gate or controlled Pauli-X is a quantum logic gate that is an essential component in the construction of a gate-based quantum computer. It can be used to entangle and disentangle Bell states. Any quantum circuit can be simulated to an arbitrary degree of accuracy using a combination of CNOT gates and single qubit rotations. [1] [2] The gate is sometimes named after Richard Feynman who developed an early notation for quantum gate diagrams in 1986. [3] [4] [5]
The CNOT can be expressed in the Pauli basis as:
Being both unitary and Hermitian, CNOT has the property and , and is involutory.
The CNOT gate can be further decomposed as products of rotation operator gates and exactly one two qubit interaction gate, for example
In general, any single qubit unitary gate can be expressed as , where H is a Hermitian matrix, and then the controlled U is .
The CNOT gate is also used in classical reversible computing.
The CNOT gate operates on a quantum register consisting of 2 qubits. The CNOT gate flips the second qubit (the target qubit) if and only if the first qubit (the control qubit) is .
Before | After | ||
---|---|---|---|
Control | Target | Control | Target |
If are the only allowed input values for both qubits, then the TARGET output of the CNOT gate corresponds to the result of a classical XOR gate. Fixing CONTROL as , the TARGET output of the CNOT gate yields the result of a classical NOT gate.
More generally, the inputs are allowed to be a linear superposition of . The CNOT gate transforms the quantum state:
into:
The action of the CNOT gate can be represented by the matrix (permutation matrix form):
The first experimental realization of a CNOT gate was accomplished in 1995. Here, a single Beryllium ion in a trap was used. The two qubits were encoded into an optical state and into the vibrational state of the ion within the trap. At the time of the experiment, the reliability of the CNOT-operation was measured to be on the order of 90%. [6]
In addition to a regular controlled NOT gate, one could construct a function-controlled NOT gate, which accepts an arbitrary number n+1 of qubits as input, where n+1 is greater than or equal to 2 (a quantum register). This gate flips the last qubit of the register if and only if a built-in function, with the first n qubits as input, returns a 1. The function-controlled NOT gate is an essential element of the Deutsch–Jozsa algorithm.
When viewed only in the computational basis , the behaviour of the CNOT appears to be like the equivalent classical gate. However, the simplicity of labelling one qubit the control and the other the target does not reflect the complexity of what happens for most input values of both qubits.
Insight can be won by expressing the CNOT gate with respect to a Hadamard transformed basis . The Hadamard transformed basis [lower-alpha 1] of a one-qubit register is given by
and the corresponding basis of a 2-qubit register is
etc. Viewing CNOT in this basis, the state of the second qubit remains unchanged, and the state of the first qubit is flipped, according to the state of the second bit. (For details see below.) "Thus, in this basis the sense of which bit is the control bit and which the target bit has reversed. But we have not changed the transformation at all, only the way we are thinking about it." [7]
The "computational" basis is the eigenbasis for the spin in the Z-direction, whereas the Hadamard basis is the eigenbasis for spin in the X-direction. Switching X and Z and qubits 1 and 2, then, recovers the original transformation." [8] This expresses a fundamental symmetry of the CNOT gate.
The observation that both qubits are (equally) affected in a CNOT interaction is of importance when considering information flow in entangled quantum systems. [9]
We now proceed to give the details of the computation. Working through each of the Hadamard basis states, the results on the right column show that the first qubit flips between and when the second qubit is :
Initial state in Hadamard basis | Equivalent state in computational basis | Apply operator | State in computational basis after CNOT | Equivalent state in Hadamard basis |
---|---|---|---|---|
CNOT | ||||
CNOT | ||||
CNOT | ||||
CNOT |
A quantum circuit that performs a Hadamard transform followed by CNOT then another Hadamard transform, can be described as performing the CNOT gate in the Hadamard basis (i.e. a change of basis):
(H1 ⊗ H1)−1 . CNOT . (H1 ⊗ H1)
The single-qubit Hadamard transform, H1, is Hermitian and therefore its own inverse. The tensor product of two Hadamard transforms operating (independently) on two qubits is labelled H2. We can therefore write the matrices as:
H2 . CNOT . H2
When multiplied out, this yields a matrix that swaps the and terms over, while leaving the and terms alone. This is equivalent to a CNOT gate where qubit 2 is the control qubit and qubit 1 is the target qubit: [lower-alpha 2]
A common application of the CNOT gate is to maximally entangle two qubits into the Bell state; this forms part of the setup of the superdense coding, quantum teleportation, and entangled quantum cryptography algorithms.
To construct , the inputs A (control) and B (target) to the CNOT gate are:
and
After applying CNOT, the resulting Bell State has the property that the individual qubits can be measured using any basis and will always present a 50/50 chance of resolving to each state. In effect, the individual qubits are in an undefined state. The correlation between the two qubits is the complete description of the state of the two qubits; if we both choose the same basis to measure both qubits and compare notes, the measurements will perfectly correlate.
When viewed in the computational basis, it appears that qubit A is affecting qubit B. Changing our viewpoint to the Hadamard basis demonstrates that, in a symmetrical way, qubit B is affecting qubit A.
The input state can alternately be viewed as:
and
In the Hadamard view, the control and target qubits have conceptually swapped and qubit A is inverted when qubit B is . The output state after applying the CNOT gate is which can be shown as follows:
.
The C-ROT gate (controlled Rabi rotation) is equivalent to a C-NOT gate except for a rotation of the nuclear spin around the z axis. [10] [11]
In May, 2024, Canada implemented export restrictions on the sale of quantum computers containing more than 34 qubits and error rates below a certain CNOT error threshold, along with restrictions for quantum computers with more qubits and higher error rates. [12] The same restrictions quickly popped up in the UK, France, Spain and the Netherlands. They offered few explanations for this action, but all of them are Wassenaar Arrangement states, and the restrictions seem related to national security concerns potentially including quantum cryptography or protection from competition. [13] [14]
In quantum computing, a qubit or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state quantum-mechanical system, one of the simplest quantum systems displaying the peculiarity of quantum mechanics. Examples include the spin of the electron in which the two levels can be taken as spin up and spin down; or the polarization of a single photon in which the two spin states can also be measured as horizontal and vertical linear polarization. In a classical system, a bit would have to be in one state or the other. However, quantum mechanics allows the qubit to be in a coherent superposition of multiple states simultaneously, a property that is fundamental to quantum mechanics and quantum computing.
In quantum computing, Grover's algorithm, also known as the quantum search algorithm, is a quantum algorithm for unstructured search that finds with high probability the unique input to a black box function that produces a particular output value, using just evaluations of the function, where is the size of the function's domain. It was devised by Lov Grover in 1996.
In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate is a basic quantum circuit operating on a small number of qubits. Quantum logic gates are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits.
In quantum information science, the Bell's states or EPR pairs are specific quantum states of two qubits that represent the simplest examples of quantum entanglement. The Bell's states are a form of entangled and normalized basis vectors. This normalization implies that the overall probability of the particle being in one of the mentioned states is 1: . Entanglement is a basis-independent result of superposition. Due to this superposition, measurement of the qubit will "collapse" it into one of its basis states with a given probability. Because of the entanglement, measurement of one qubit will "collapse" the other qubit to a state whose measurement will yield one of two possible values, where the value depends on which Bell's state the two qubits are in initially. Bell's states can be generalized to certain quantum states of multi-qubit systems, such as the GHZ state for three or more subsystems.
The Clifford group encompasses a set of quantum operations that map the set of n-fold Pauli group products into itself. It is most famously studied for its use in quantum error correction.
In quantum information theory, superdense coding is a quantum communication protocol to communicate a number of classical bits of information by only transmitting a smaller number of qubits, under the assumption of sender and receiver pre-sharing an entangled resource. In its simplest form, the protocol involves two parties, often referred to as Alice and Bob in this context, which share a pair of maximally entangled qubits, and allows Alice to transmit two bits to Bob by sending only one qubit. This protocol was first proposed by Charles H. Bennett and Stephen Wiesner in 1970 and experimentally actualized in 1996 by Klaus Mattle, Harald Weinfurter, Paul G. Kwiat and Anton Zeilinger using entangled photon pairs. Superdense coding can be thought of as the opposite of quantum teleportation, in which one transfers one qubit from Alice to Bob by communicating two classical bits, as long as Alice and Bob have a pre-shared Bell pair.
In computational complexity theory, PostBQP is a complexity class consisting of all of the computational problems solvable in polynomial time on a quantum Turing machine with postselection and bounded error.
The spin qubit quantum computer is a quantum computer based on controlling the spin of charge carriers in semiconductor devices. The first spin qubit quantum computer was first proposed by Daniel Loss and David P. DiVincenzo in 1997, also known as the Loss–DiVincenzo quantum computer. The proposal was to use the intrinsic spin-1/2 degree of freedom of individual electrons confined in quantum dots as qubits. This should not be confused with other proposals that use the nuclear spin as qubit, like the Kane quantum computer or the nuclear magnetic resonance quantum computer. Intel has developed quantum computers based on silicon spin qubits, also called hot qubits.
In quantum computing, the quantum phase estimation algorithm is a quantum algorithm to estimate the phase corresponding to an eigenvalue of a given unitary operator. Because the eigenvalues of a unitary operator always have unit modulus, they are characterized by their phase, and therefore the algorithm can be equivalently described as retrieving either the phase or the eigenvalue itself. The algorithm was initially introduced by Alexei Kitaev in 1995.
In quantum computing, the quantum Fourier transform (QFT) is a linear transformation on quantum bits, and is the quantum analogue of the discrete Fourier transform. The quantum Fourier transform is a part of many quantum algorithms, notably Shor's algorithm for factoring and computing the discrete logarithm, the quantum phase estimation algorithm for estimating the eigenvalues of a unitary operator, and algorithms for the hidden subgroup problem. The quantum Fourier transform was discovered by Don Coppersmith. With small modifications to the QFT, it can also be used for performing fast integer arithmetic operations such as addition and multiplication.
Linear optical quantum computing or linear optics quantum computation (LOQC), also photonic quantum computing (PQC), is a paradigm of quantum computation, allowing (under certain conditions, described below) universal quantum computation. LOQC uses photons as information carriers, mainly uses linear optical elements, or optical instruments (including reciprocal mirrors and waveplates) to process quantum information, and uses photon detectors and quantum memories to detect and store quantum information.
The KLM scheme or KLM protocol is an implementation of linear optical quantum computing (LOQC) developed in 2000 by Emanuel Knill, Raymond Laflamme and Gerard J. Milburn. This protocol allows for the creation of universal quantum computers using solely linear optical tools. The KLM protocol uses linear optical elements, single-photon sources and photon detectors as resources to construct a quantum computation scheme involving only ancilla resources, quantum teleportations and error corrections.
Quantum counting algorithm is a quantum algorithm for efficiently counting the number of solutions for a given search problem. The algorithm is based on the quantum phase estimation algorithm and on Grover's search algorithm.
The Cirac–Zoller controlled-NOT gate is an implementation of the controlled-NOT (CNOT) quantum logic gate using cold trapped ions that was proposed by Ignacio Cirac and Peter Zoller in 1995 and represents the central ingredient of the Cirac–Zoller proposal for a trapped-ion quantum computer. The key idea of the Cirac–Zoller proposal is to mediate the interaction between the two qubits through the joint motion of the complete chain of trapped ions.
In quantum computing and quantum information theory, the Clifford gates are the elements of the Clifford group, a set of mathematical transformations which normalize the n-qubit Pauli group, i.e., map tensor products of Pauli matrices to tensor products of Pauli matrices through conjugation. The notion was introduced by Daniel Gottesman and is named after the mathematician William Kingdon Clifford. Quantum circuits that consist of only Clifford gates can be efficiently simulated with a classical computer due to the Gottesman–Knill theorem.
Feynman's algorithm is an algorithm that is used to simulate the operations of a quantum computer on a classical computer. It is based on the Path integral formulation of quantum mechanics, which was formulated by Richard Feynman.
Parity measurement is a procedure in quantum information science used for error detection in quantum qubits. A parity measurement checks the equality of two qubits to return a true or false answer, which can be used to determine whether a correction needs to occur. Additional measurements can be made for a system greater than two qubits. Because parity measurement does not measure the state of singular bits but rather gets information about the whole state, it is considered an example of a joint measurement. Joint measurements do not have the consequence of destroying the original state of a qubit as normal quantum measurements do. Mathematically speaking, parity measurements are used to project a state into an eigenstate of an operator and to acquire its eigenvalue.
In quantum computing, phase kickback refers to the fact that controlled operations have effects on their controls, in addition to on their targets, and that these effects correspond to phasing operations. The phase of one qubit is effectively transferred to another qubit during a controlled operation, creating entanglement and computational advantages that enable various popular quantum algorithms and protocols.
A neutral atom quantum computer is a modality of quantum computers built out of Rydberg atoms; this modality has many commonalities with trapped-ion quantum computers. As of December 2023, the concept has been used to demonstrate a 48 logical qubit processor.