Site Tools


zero-state

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zero-state [June 12, 2026 at 22:13] – external edit 127.0.0.1zero-state [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-# $\lvert 0\rangle$ (Zero state) 
-The **zero state** $\lvert 0\rangle$ is one of the two computational basis states of a qubit. It is the quantum analogue of a classical `0` bit, and it is the standard initial state used in most quantum circuits. The other computational basis state is [[one-state|$\lvert 1\rangle$]]. 
- 
-$$\lvert 0\rangle = \begin{pmatrix}1\\0\end{pmatrix}$$ 
- 
-On the [[bloch-sphere]], $\lvert 0\rangle$ corresponds to the north pole at coordinates $(0, 0, 1)$. It is an eigenstate of the Pauli-Z gate with eigenvalue $+1$, meaning $Z\lvert 0\rangle = \lvert 0\rangle$. Applying the [[h-gate|Hadamard gate]] to $\lvert 0\rangle$ produces the equal superposition state $\lvert +\rangle = (\lvert 0\rangle + \lvert 1\rangle)/\sqrt{2}$. 
- 
-## Applying gates 
-^ Gate ^ Result ^ Comment ^ 
-| [[i-gate]] | $I\lvert 0\rangle = \lvert 0\rangle$ | The identity gate leaves $\lvert 0\rangle$ unchanged. | 
-| [[x-gate]] | $X\lvert 0\rangle = \lvert 1\rangle$ | Flips $\lvert 0\rangle$ to $\lvert 1\rangle$; quantum analogue of classical NOT. | 
-| [[y-gate]] | $Y\lvert 0\rangle = i\lvert 1\rangle$ | Bit flip with an imaginary phase factor. | 
-| [[z-gate]] | $Z\lvert 0\rangle = \lvert 0\rangle$ | $\lvert 0\rangle$ is an eigenstate of $Z$ with eigenvalue $+1$. | 
-| [[h-gate]] | $H\lvert 0\rangle = \lvert +\rangle$ | Rotates the north pole to the $+x$ equatorial point of the Bloch sphere. | 
-| [[s-gate]] | $S\lvert 0\rangle = \lvert 0\rangle$ | Phase only affects the $\lvert 1\rangle$ component; $\lvert 0\rangle$ is unchanged. | 
-| [[t-gate]] | $T\lvert 0\rangle = \lvert 0\rangle$ | Phase only affects the $\lvert 1\rangle$ component; $\lvert 0\rangle$ is unchanged. | 
-| [[rx-gate|$R_x(\theta)$]] | $R_x(\theta)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle - i\sin\tfrac{\theta}{2}\lvert 1\rangle$ | Tilts the state from $\lvert 0\rangle$ toward $\lvert 1\rangle$ with an imaginary phase on the $\lvert 1\rangle$ component. | 
-| [[ry-gate|$R_y(\theta)$]] | $R_y(\theta)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle + \sin\tfrac{\theta}{2}\lvert 1\rangle$ | Real amplitudes; at $\theta=\pi/2$ gives $\lvert +\rangle$, the same result as the Hadamard gate up to global phase. | 
-| [[rz-gate|$R_z(\theta)$]] | $R_z(\theta)\lvert 0\rangle = e^{-i\theta/2}\lvert 0\rangle$ | Global phase only; $\lvert 0\rangle$ is on the $z$-axis so a $z$-rotation has no observable effect. | 
-| [[u-gate|$U(\theta,\phi,\lambda)$]] | $U\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle + e^{i\phi}\sin\tfrac{\theta}{2}\lvert 1\rangle$ | $\lambda$ drops out; every single-qubit state is reachable from $\lvert 0\rangle$ with appropriate $(\theta,\phi)$. | 
-| [[cnot-gate|CNOT]] (as control) | $\text{CNOT}\lvert 0\rangle\lvert t\rangle = \lvert 0\rangle\lvert t\rangle$ | Control is off; target qubit $\lvert t\rangle$ is always left unchanged. | 
-| [[cnot-gate|CNOT]] (as target) | $\text{CNOT}\lvert c\rangle\lvert 0\rangle = \lvert c\rangle\lvert c\rangle$ | Flipped to $\lvert 1\rangle$ only when the control qubit is $\lvert 1\rangle$. | 
-| [[swap-gate|SWAP]] | $\text{SWAP}\lvert 0\rangle\lvert\psi\rangle = \lvert\psi\rangle\lvert 0\rangle$ | Exchanges the two qubit states; the $\lvert 0\rangle$ moves to the second register. | 
-| [[iswap-gate|iSWAP]] | $\text{iSWAP}\lvert 00\rangle = \lvert 00\rangle$; $\text{iSWAP}\lvert 01\rangle = i\lvert 10\rangle$ | Adds a phase of $i$ when states are exchanged; trivial when both qubits are $\lvert 0\rangle$. | 
-| [[toffoli-gate|Toffoli]] (as control) | $\text{CCX}\lvert 0\rangle\lvert c_2\rangle\lvert t\rangle = \lvert 0\rangle\lvert c_2\rangle\lvert t\rangle$ | Control is off; target is always unchanged regardless of the second control. | 
-| [[toffoli-gate|Toffoli]] (as target) | $\text{CCX}\lvert 1\rangle\lvert 1\rangle\lvert 0\rangle = \lvert 1\rangle\lvert 1\rangle\lvert 1\rangle$ | Flipped to $\lvert 1\rangle$ only when both controls are $\lvert 1\rangle$. | 
- 
-## Derivation 
-^ Gate ^ Matrix form ^ Derivation ^ 
-| [[i-gate]] | $I = \begin{pmatrix}1&0\\0&1\end{pmatrix}$ | $I\lvert 0\rangle = \begin{pmatrix}1&0\\0&1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} = \lvert 0\rangle$ | 
-| [[x-gate]] | $X = \begin{pmatrix}0&1\\1&0\end{pmatrix}$ | $X\lvert 0\rangle = \begin{pmatrix}0&1\\1&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}0\\1\end{pmatrix} = \lvert 1\rangle$ | 
-| [[y-gate]] | $Y = \begin{pmatrix}0&-i\\i&0\end{pmatrix}$ | $Y\lvert 0\rangle = \begin{pmatrix}0&-i\\i&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}0\\i\end{pmatrix} = i\lvert 1\rangle$ | 
-| [[z-gate]] | $Z = \begin{pmatrix}1&0\\0&-1\end{pmatrix}$ | $Z\lvert 0\rangle = \begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} = \lvert 0\rangle$ | 
-| [[h-gate]] | $H = \tfrac{1}{\sqrt{2}}\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ | $H\lvert 0\rangle = \tfrac{1}{\sqrt{2}}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \tfrac{1}{\sqrt{2}}\begin{pmatrix}1\\1\end{pmatrix} = \lvert +\rangle$ | 
-| [[s-gate]] | $S = \begin{pmatrix}1&0\\0&i\end{pmatrix}$ | $S\lvert 0\rangle = \begin{pmatrix}1&0\\0&i\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} = \lvert 0\rangle$ | 
-| [[t-gate]] | $T = \begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}$ | $T\lvert 0\rangle = \begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} = \lvert 0\rangle$ | 
-| [[rx-gate|$R_x(\theta)$]] | $R_x(\theta) = \begin{pmatrix}\cos\tfrac{\theta}{2}&-i\sin\tfrac{\theta}{2}\\-i\sin\tfrac{\theta}{2}&\cos\tfrac{\theta}{2}\end{pmatrix}$ | $R_x(\theta)\lvert 0\rangle = \begin{pmatrix}\cos\tfrac{\theta}{2}&-i\sin\tfrac{\theta}{2}\\-i\sin\tfrac{\theta}{2}&\cos\tfrac{\theta}{2}\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}\cos\tfrac{\theta}{2}\\-i\sin\tfrac{\theta}{2}\end{pmatrix}$ | 
-| [[ry-gate|$R_y(\theta)$]] | $R_y(\theta) = \begin{pmatrix}\cos\tfrac{\theta}{2}&-\sin\tfrac{\theta}{2}\\\sin\tfrac{\theta}{2}&\cos\tfrac{\theta}{2}\end{pmatrix}$ | $R_y(\theta)\lvert 0\rangle = \begin{pmatrix}\cos\tfrac{\theta}{2}&-\sin\tfrac{\theta}{2}\\\sin\tfrac{\theta}{2}&\cos\tfrac{\theta}{2}\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}\cos\tfrac{\theta}{2}\\\sin\tfrac{\theta}{2}\end{pmatrix}$ | 
-| [[rz-gate|$R_z(\theta)$]] | $R_z(\theta) = \begin{pmatrix}e^{-i\theta/2}&0\\0&e^{i\theta/2}\end{pmatrix}$ | $R_z(\theta)\lvert 0\rangle = \begin{pmatrix}e^{-i\theta/2}&0\\0&e^{i\theta/2}\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = e^{-i\theta/2}\begin{pmatrix}1\\0\end{pmatrix}$ | 
-| [[u-gate|$U(\theta,\phi,\lambda)$]] | $U = \begin{pmatrix}\cos\tfrac{\theta}{2}&-e^{i\lambda}\sin\tfrac{\theta}{2}\\e^{i\phi}\sin\tfrac{\theta}{2}&e^{i(\phi+\lambda)}\cos\tfrac{\theta}{2}\end{pmatrix}$ | $U\lvert 0\rangle = \begin{pmatrix}\cos\tfrac{\theta}{2}&-e^{i\lambda}\sin\tfrac{\theta}{2}\\e^{i\phi}\sin\tfrac{\theta}{2}&e^{i(\phi+\lambda)}\cos\tfrac{\theta}{2}\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}\cos\tfrac{\theta}{2}\\e^{i\phi}\sin\tfrac{\theta}{2}\end{pmatrix}$ | 
- 
-## Relationship with gates 
- 
-### Identity (I) 
- 
-The identity gate leaves $\lvert 0\rangle$ unchanged. $I\lvert 0\rangle = \lvert 0\rangle$. 
- 
-### X gate 
- 
-The X gate (Pauli-X, quantum NOT) flips $\lvert 0\rangle$ to $\lvert 1\rangle$, the same as a classical NOT on the bit value 0. 
- 
-$$X\lvert 0\rangle = \begin{pmatrix}0&1\\1&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}0\\1\end{pmatrix} = \lvert 1\rangle$$ 
- 
-### Y gate 
- 
-The Y gate combines a bit flip with a phase factor. Applied to $\lvert 0\rangle$ it produces $i\lvert 1\rangle$ — flipped, with an imaginary prefactor. 
- 
-$$Y\lvert 0\rangle = \begin{pmatrix}0&-i\\i&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}0\\i\end{pmatrix} = i\lvert 1\rangle$$ 
- 
-### Z gate 
- 
-$\lvert 0\rangle$ is an eigenstate of $Z$ with eigenvalue $+1$. The Z gate only negates the $\lvert 1\rangle$ component, so $\lvert 0\rangle$ is left unchanged. 
- 
-$$Z\lvert 0\rangle = \begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} = \lvert 0\rangle$$ 
- 
-### Hadamard (H) 
- 
-The Hadamard gate rotates from the Z basis to the X basis, taking the north pole of the Bloch sphere to the $+x$ equatorial point. 
- 
-$$H\lvert 0\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix}1\\1\end{pmatrix} = \lvert +\rangle$$ 
- 
-### S gate 
- 
-$S = \text{diag}(1, i)$ only adds a phase to the $\lvert 1\rangle$ component. Since $\lvert 0\rangle$ has no $\lvert 1\rangle$ amplitude, $S\lvert 0\rangle = \lvert 0\rangle$. 
- 
-### T gate 
- 
-$T = \text{diag}(1, e^{i\pi/4})$ similarly only affects the $\lvert 1\rangle$ component. $T\lvert 0\rangle = \lvert 0\rangle$. 
- 
-### $R_x(\theta)$ 
- 
-$R_x(\theta)$ rotates by angle $\theta$ around the $x$-axis of the Bloch sphere. Applied to $\lvert 0\rangle$ it tilts the state away from $\lvert 0\rangle$ toward $\lvert 1\rangle$ while preserving the magnitude. 
- 
-$$R_x(\theta)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle - i\sin\tfrac{\theta}{2}\lvert 1\rangle$$ 
- 
-At $\theta = \pi/2$, $R_x(\pi/2)\lvert 0\rangle = \tfrac{1}{\sqrt{2}}(\lvert 0\rangle - i\lvert 1\rangle)$, a state midway between $\lvert 0\rangle$ and $\lvert 1\rangle$ with an imaginary phase on $\lvert 1\rangle$. 
- 
-### $R_y(\theta)$ 
- 
-$R_y(\theta)$ rotates around the $y$-axis, sweeping from $\lvert 0\rangle$ toward $\lvert 1\rangle$ with real amplitudes. 
- 
-$$R_y(\theta)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle + \sin\tfrac{\theta}{2}\lvert 1\rangle$$ 
- 
-At $\theta = \pi/2$, this gives $\tfrac{1}{\sqrt{2}}(\lvert 0\rangle + \lvert 1\rangle) = \lvert +\rangle$, the same as the Hadamard (up to global phase). 
- 
-### $R_z(\theta)$ 
- 
-$R_z(\theta)$ rotates around the $z$-axis. Since $\lvert 0\rangle$ is on the $z$-axis (the north pole), this rotation adds only a global phase with no observable effect. 
- 
-$$R_z(\theta)\lvert 0\rangle = e^{-i\theta/2}\lvert 0\rangle$$ 
- 
-### U gate 
- 
-$U(\theta, \phi, \lambda)$ is the most general single-qubit unitary (three real parameters cover the entire Bloch sphere). Applied to $\lvert 0\rangle$, the parameter $\lambda$ drops out. 
- 
-$$U(\theta, \phi, \lambda)\lvert 0\rangle = \cos\tfrac{\theta}{2}\lvert 0\rangle + e^{i\phi}\sin\tfrac{\theta}{2}\lvert 1\rangle$$ 
- 
-Every single-qubit state can be reached from $\lvert 0\rangle$ with an appropriate $(\theta, \phi)$, which is why $\lvert 0\rangle$ is the universal starting point for single-qubit computation. 
- 
-### CNOT 
- 
-CNOT is a two-qubit gate. When $\lvert 0\rangle$ is the **control** qubit, the control is off and the target is left unchanged: $\text{CNOT}\lvert 0\rangle\lvert t\rangle = \lvert 0\rangle\lvert t\rangle$. 
- 
-When $\lvert 0\rangle$ is the **target**, CNOT flips it to $\lvert 1\rangle$ only if the control is $\lvert 1\rangle$: 
- 
-$$\text{CNOT}\lvert 0\rangle\lvert 0\rangle = \lvert 0\rangle\lvert 0\rangle \qquad \text{CNOT}\lvert 1\rangle\lvert 0\rangle = \lvert 1\rangle\lvert 1\rangle$$ 
- 
-The combination $H\otimes I$ followed by CNOT (with $\lvert 0\rangle\lvert 0\rangle$ as input) creates the Bell state $\lvert\Phi^+\rangle$. 
- 
-### SWAP 
- 
-SWAP exchanges the states of two qubits. $\text{SWAP}\lvert 0\rangle\lvert\psi\rangle = \lvert\psi\rangle\lvert 0\rangle$ for any $\lvert\psi\rangle$. 
- 
-### iSWAP 
- 
-iSWAP is like SWAP but adds a factor of $i$ when the two qubits are exchanged. When one qubit is $\lvert 0\rangle$: $\text{iSWAP}\lvert 00\rangle = \lvert 00\rangle$ (both zero, nothing to exchange); $\text{iSWAP}\lvert 01\rangle = i\lvert 10\rangle$ (exchanged with phase). 
- 
-### Toffoli (CCX) 
- 
-The Toffoli gate flips the target qubit only when both controls are $\lvert 1\rangle$. When $\lvert 0\rangle$ is either control qubit, that control is off and the target is always unchanged. When $\lvert 0\rangle$ is the target, it is flipped to $\lvert 1\rangle$ only if both controls are $\lvert 1\rangle$. 
- 
-## Relationship with other states 
-^ State ^ Relationship ^ 
-| [[one-state|$\lvert 1\rangle$]] | Orthogonal companion: $\langle 0\vert 1\rangle = 0$; together they span the qubit Hilbert space (north and south poles of the Bloch sphere). The X gate converts between them: $X\lvert 0\rangle = \lvert 1\rangle$ and $X\lvert 1\rangle = \lvert 0\rangle$. | 
-| [[plus-state|$\lvert +\rangle$]] | $H\lvert 0\rangle = \lvert +\rangle$. Conversely, $\lvert 0\rangle = \tfrac{1}{\sqrt{2}}(\lvert +\rangle + \lvert -\rangle)$, so $\lvert 0\rangle$ is the symmetric superposition of the two X-basis eigenstates. | 
-| [[minus-state|$\lvert -\rangle$]] | $ZH\lvert 0\rangle = \lvert -\rangle$ ($H$ then $Z$). $\lvert 0\rangle$ decomposes in the X basis as $\tfrac{1}{\sqrt{2}}(\lvert +\rangle + \lvert -\rangle)$ — equal weight on both eigenstates. | 
-| [[i-state|$\lvert +i\rangle$]] | $SH\lvert 0\rangle = \lvert +i\rangle$: Hadamard maps to the $+x$ equatorial point, S rotates 90° around $z$ to the $+y$ pole. | 
-| [[minus-i-state|$\lvert -i\rangle$]] | $S^\dagger H\lvert 0\rangle = \lvert -i\rangle$. Together, $\lvert 0\rangle = \tfrac{1}{\sqrt{2}}(\lvert +i\rangle + \lvert -i\rangle)$, so $\lvert 0\rangle$ has equal overlap with both Y-basis states. | 
-| [[phi-plus-state|$\lvert\Phi^+\rangle$]] | $\tfrac{1}{\sqrt{2}}(\lvert 00\rangle + \lvert 11\rangle)$, prepared from $\lvert 00\rangle$ by $H\otimes I$ then CNOT. Measuring either qubit and finding $\lvert 0\rangle$ collapses the other to $\lvert 0\rangle$. | 
-| [[phi-minus-state|$\lvert\Phi^-\rangle$]] | $\tfrac{1}{\sqrt{2}}(\lvert 00\rangle - \lvert 11\rangle)$, prepared from $\lvert 00\rangle$ by $H\otimes I$, CNOT, then $Z$. Measuring and finding $\lvert 0\rangle$ collapses the partner to $\lvert 0\rangle$, same as $\lvert\Phi^+\rangle$ but with a relative minus sign. | 
-| [[psi-plus-state|$\lvert\Psi^+\rangle$]] | $\tfrac{1}{\sqrt{2}}(\lvert 01\rangle + \lvert 10\rangle)$, prepared from $\lvert 01\rangle$. Measuring qubit 1 and finding $\lvert 0\rangle$ collapses qubit 2 to $\lvert 1\rangle$ — anti-correlated. | 
-| [[psi-minus-state|$\lvert\Psi^-\rangle$]] | $\tfrac{1}{\sqrt{2}}(\lvert 01\rangle - \lvert 10\rangle)$, the singlet Bell state. Measuring qubit 1 and finding $\lvert 0\rangle$ collapses qubit 2 to $\lvert 1\rangle$, same anti-correlation as $\lvert\Psi^+\rangle$ but with a minus sign. | 
- 
-## List of code implementations 
- 
-- [[zero-state-qiskit|Qiskit]] 
  
zero-state.1781302415.txt.gz · Last modified: by 127.0.0.1