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!
==== Hadamard transform ==== {{Further|Hadamard transform}} The gate <math>H_2 = H \otimes H</math> is the [[#Hadamard gate|Hadamard gate]] {{nowrap|(<math>H</math>)}} applied in parallel on 2 qubits. It can be written as: :<math>H_2 = H \otimes H = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} \otimes \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{bmatrix}</math> This "two-qubit parallel Hadamard gate" will, when applied to, for example, the two-qubit zero-vector {{nowrap|(<math>|00\rangle</math>),}} create a quantum state that has equal probability of being observed in any of its four possible outcomes; {{nowrap|<math>|00\rangle</math>,}} {{nowrap|<math>|01\rangle</math>,}} {{nowrap|<math>|10\rangle</math>,}} and {{nowrap|<math>|11\rangle</math>.}} We can write this operation as: :<math>H_2 |00\rangle = \frac{1}{2} \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} = \frac{1}{2} |00\rangle + \frac{1}{2} |01\rangle +\frac{1}{2} |10\rangle +\frac{1}{2} |11\rangle = \frac{|00\rangle + |01\rangle + |10\rangle + |11\rangle}{2}</math> [[File:Hadamard transform on 3 qubits.png|thumb|right|upright=2|'''Example:''' The Hadamard transform on a 3-[[qubit]] [[quantum register|register]] {{nowrap|<math>|\psi\rangle</math>.}}]] Here the amplitude for each measurable state is {{frac|1|2}}. The probability to observe any state is the square of the absolute value of the measurable states amplitude, which in the above example means that there is one in four that we observe any one of the individual four cases. See [[#Measurement|measurement]] for details. <math>H_2</math> performs the [[Hadamard transform]] on two qubits. Similarly the gate <math>\underbrace{ H \otimes H \otimes \dots \otimes H }_{n\text{ times}} = \bigotimes_{i=0}^{n-1} H = H^{\otimes n} = H_n</math> performs a Hadamard transform on a [[quantum register|register]] of <math>n</math> qubits. When applied to a register of <math>n</math> qubits all initialized to {{nowrap|<math>|0\rangle</math>,}} the Hadamard transform puts the quantum register into a superposition with equal probability of being measured in any of its <math>2^n</math> possible states: :<math>\bigotimes_{i=0}^{n-1}(H|0\rangle) = \frac{1}{\sqrt{2^n}} \begin{bmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{bmatrix} = \frac{1}{\sqrt{2^n}} \Big( |0\rangle + |1\rangle + \dots + |2^n-1\rangle \Big)= \frac{1}{\sqrt{2^n}}\sum_{i=0}^{2^{n}-1}|i\rangle</math> This state is a ''uniform superposition'' and it is generated as the first step in some search algorithms, for example in [[amplitude amplification]] and [[Quantum phase estimation algorithm|phase estimation]]. [[#Measurement|Measuring]] this state results in a [[Random number generation|random number]] between <math>|0\rangle</math> and {{nowrap|<math>|2^n-1\rangle</math>.}}{{efn|name="stochastic-interpretations"|If this actually is a [[stochastic]] effect depends on which [[Interpretations of quantum mechanics|interpretation of quantum mechanics]] that is correct (and if any interpretation can be correct). For example, [[De Broglie–Bohm theory]] and the [[many-worlds interpretation]] asserts [[determinism]]. (In the many-worlds interpretation, a quantum computer is a machine that runs programs ([[quantum circuit]]s) that selects a reality where the probability of it having the solution states of a [[computational problem|problem]] is large. That is, the machine more often than not ends up in a reality where it gives the correct answer. Because ''all'' outcomes are realized in separate universes according to the many-worlds interpretation, the total outcome is deterministic. This ''interpretation'' does however not change the [[quantum mechanics|mechanics]] by which the machine operates.)}} How random the number is depends on the [[Quantum fidelity|fidelity]] of the logic gates. If not measured, it is a quantum state with equal [[probability amplitude]] <math>\frac{1}{\sqrt{2^n}}</math> for each of its possible states. The Hadamard transform acts on a register <math>|\psi\rangle</math> with <math>n</math> qubits such that <math display="inline">|\psi\rangle = \bigotimes_{i=0}^{n-1} |\psi_i\rangle</math> as follows: :<math>\bigotimes_{i=0}^{n-1}H|\psi\rangle = \bigotimes_{i=0}^{n-1}\frac{|0\rangle + (-1)^{\psi_i}|1\rangle}{\sqrt{2}} = \frac{1}{\sqrt{2^n}}\bigotimes_{i=0}^{n-1}\Big(|0\rangle + (-1)^{\psi_i}|1\rangle\Big) = H|\psi_0\rangle \otimes H|\psi_1\rangle \otimes \cdots \otimes H|\psi_{n-1}\rangle</math>
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)