Site Tools


two-qubits

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
two-qubits [June 13, 2026 at 03:23] Ivan Janevskitwo-qubits [August 26, 2026 at 15:46] (current) – external edit 127.0.0.1
Line 6: Line 6:
 A general two-qubit state is a superposition over the four computational basis states, with the normalization condition saying the total probability must be 1: A general two-qubit state is a superposition over the four computational basis states, with the normalization condition saying the total probability must be 1:
  
-$$\lvert\psi\rangle = \begin{pmatrix}c_{00}\\c_{01}\\c_{10}\\c_{11}\end{pmatrix} \qquad \lvert\psi\rangle = c_{00}\underbrace{\begin{pmatrix}1\\0\\0\\0\end{pmatrix}}_{\lvert 00\rangle} + c_{01}\underbrace{\begin{pmatrix}0\\1\\0\\0\end{pmatrix}}_{\lvert 01\rangle} + c_{10}\underbrace{\begin{pmatrix}0\\0\\1\\0\end{pmatrix}}_{\lvert 10\rangle} + c_{11}\underbrace{\begin{pmatrix}0\\0\\0\\1\end{pmatrix}}_{\lvert 11\rangle}, \qquad |c_{00}|^2 + |c_{01}|^2 + |c_{10}|^2 + |c_{11}|^2 = 1$$+$$\lvert\psi\rangle = \begin{pmatrix}c_{00}\\c_{01}\\c_{10}\\c_{11}\end{pmatrix}\qquad \lvert\psi\rangle = c_{00}\underbrace{\begin{pmatrix}1\\0\\0\\0\end{pmatrix}}_{\lvert 00\rangle} + c_{01}\underbrace{\begin{pmatrix}0\\1\\0\\0\end{pmatrix}}_{\lvert 01\rangle} + c_{10}\underbrace{\begin{pmatrix}0\\0\\1\\0\end{pmatrix}}_{\lvert 10\rangle} + c_{11}\underbrace{\begin{pmatrix}0\\0\\0\\1\end{pmatrix}}_{\lvert 11\rangle}, \qquad |c_{00}|^2 + |c_{01}|^2 + |c_{10}|^2 + |c_{11}|^2 = 1$$
  
 ## Product states ## Product states
Line 111: Line 111:
 ```python ```python
 # Requires: pip install qiskit qiskit-aer # Requires: pip install qiskit qiskit-aer
-# Run: python bell.py+# Run: Python Bell.py
 # Prepares |Φ+⟩ and samples 1000 shots; expect roughly equal counts of '00' and '11'. # Prepares |Φ+⟩ and samples 1000 shots; expect roughly equal counts of '00' and '11'.
 from qiskit import QuantumCircuit from qiskit import QuantumCircuit
two-qubits.1781321026.md.gz · Last modified: by Ivan Janevski