Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Quantum logic gate
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Controlled gates === {{Further|Controlled NOT gate}} [[Image:Controlled gate.svg|upright=0.6|thumb|Circuit representation of controlled-''U'' gate]] Controlled gates act on 2 or more qubits, where one or more qubits act as a control for some operation.<ref name="Barenco" /> For example, the [[controlled NOT gate]] (or CNOT or CX) acts on 2 qubits, and performs the NOT operation on the second qubit only when the first qubit is {{nowrap|<math>|1\rangle</math>,}} and otherwise leaves it unchanged. With respect to the basis {{nowrap|<math>|00\rangle</math>,}} {{nowrap|<math>|01\rangle</math>,}} {{nowrap|<math>|10\rangle</math>,}} {{nowrap|<math>|11\rangle</math>,}} it is represented by the [[Hermitian matrix|Hermitian]] [[Unitary matrix|unitary]] matrix: :<math> \mbox{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix} . </math> The CNOT (or controlled Pauli-''X'') gate can be described as the gate that maps the basis states <math>|a,b\rangle \mapsto |a,a \oplus b\rangle</math>, where <math>\oplus</math> is [[Exclusive or|XOR]]. The CNOT can be expressed in the [[Pauli matrices|Pauli basis]] as: :<math> \mbox{CNOT} = e^{i\frac{\pi}{4}(I-Z_1)(I-X_2)}=e^{-i\frac{\pi}{4}(I-Z_1)(I-X_2)}. </math> Being a Hermitian unitary operator, CNOT [[Sylvester's formula|has the property]] that <math> e^{i\theta U}=(\cos \theta)I+(i\sin \theta) U</math> and <math> U =e^{i\frac{\pi}{2}(I-U)}=e^{-i\frac{\pi}{2}(I-U)}</math>, and is [[Involutory matrix|involutory]]. More generally if ''U'' is a gate that operates on a single qubit with matrix representation :<math> U = \begin{bmatrix} u_{00} & u_{01} \\ u_{10} & u_{11} \end{bmatrix} , </math> then the ''controlled-U gate'' is a gate that operates on two qubits in such a way that the first qubit serves as a control. It maps the basis states as follows.{{Multiple image | image1 = Qcircuit_CNOT.svg | image2 = Qcircuit_CY.svg | image3 = Qcircuit CC.svg | total_width = 400 | footer = Circuit diagrams of controlled Pauli gates (from left to right): CNOT (or controlled-X), controlled-Y and controlled-Z. }} :<math> | 0 0 \rangle \mapsto | 0 0 \rangle </math> :<math> | 0 1 \rangle \mapsto | 0 1 \rangle </math> :<math> | 1 0 \rangle \mapsto | 1 \rangle \otimes U |0 \rangle = | 1 \rangle \otimes (u_{00} |0 \rangle + u_{10} |1 \rangle) </math> :<math> | 1 1 \rangle \mapsto | 1 \rangle \otimes U |1 \rangle = | 1 \rangle \otimes (u_{01} |0 \rangle + u_{11} |1 \rangle) </math> The matrix representing the controlled ''U'' is :<math> \mbox{C}U = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & u_{00} & u_{01} \\ 0 & 0 & u_{10} & u_{11} \end{bmatrix}.</math> When ''U'' is one of the Pauli operators, ''X'',''Y'', ''Z'', the respective terms "controlled-''X''", "controlled-''Y''", or "controlled-''Z''" are sometimes used.{{r|Nielsen-Chuang|pages=177β185}} Sometimes this is shortened to just C''X'', C''Y'' and C''Z''. In general, any single qubit [[Unitary matrix#Properties|unitary gate]] can be expressed as <math> U = e^{iH} </math>, where ''H'' is a [[Hermitian matrix]], and then the controlled ''U'' is <math> CU = e^{i\frac{1}{2}(I-Z_1)H_2}.</math> Control can be extended to gates with arbitrary number of qubits<ref name="Barenco" /> and functions in programming languages.<ref name="adjoint-controlled-qsharp"/> Functions can be conditioned on superposition states.<ref name="Oemer-structured-programming">{{cite web|title=Structured Quantum Programming|last=Γmer|first=Bernhard|url=http://tph.tuwien.ac.at/~oemer/doc/structquprog.pdf|pages=72, 92β107|date=2 September 2009|publisher=Institute for Theoretical Physics, Vienna University of Technology|archive-url=https://web.archive.org/web/20220327170025/tph.tuwien.ac.at/~oemer/doc/structquprog.pdf|archive-date=March 27, 2022}}</ref><ref name="Oemer2"/> ==== Classical control ==== {{Further|Deferred measurement principle}} [[File:Example for classic controlled quantum gate.png|thumb|upright=0.8|'''Example:''' The qubit <math>\phi</math> is [[#Measurement|measured]], and the result of this measurement is a [[Boolean data type|Boolean]] value, which is consumed by the classical computer. If <math>\phi</math> measures to 1, then the classical computer tells the quantum computer to apply the U gate on <math>\psi</math>.<br>In circuit diagrams, single lines are [[qubit]]s, and doubled lines are [[bit]]s.]] Gates can also be controlled by classical logic. A quantum computer is controlled by a [[classical computing|classical computer]], and behaves like a [[coprocessor]] that receives instructions from the classical computer about what gates to execute on which qubits.{{r|Oemer|pages=42β43}}<ref name="cryo-controller"/> Classical control is simply the inclusion, or omission, of gates in the instruction sequence for the quantum computer.{{r|Nielsen-Chuang|pages=26β28}}{{r|Williams|pages=87β88}} {{anchor|Phase shift|Phase shift gates|Phase shift gate|Phase gate}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)