- Short for
quantum bits
. - Just like classical bits they need a well-defined physical representation, of which there are many (e.g. photonic polarization, electron spin, nuclear spin, Josephson junction, ion trap, etc.)
- Unlike classical bits, they exist in a quantum superposition of available basis states (more on this later)
- On the computational level we operate on
logical qubits
, which can comprise up to 1000 physical qubits (depending on the quantum error correction scheme) - An array of qubits is typically referred to as a
quantum register
- QC analogues of logic gates
- Mathematically they are represented by
unitary
matrices (more on this later) - Unlike logic gates in classical computing, they are reversible (cf. Feynman’s and Fredkin’s remarks on classical reversibility)
- n-qubit gate is represented by a
$2^n × 2^n$ unitary matrix (this dimensionality results from the properties of tensor products) - Quantum gates can transform single or multiple qubits, conflate several qubits with each other (quantum entanglement), conditionalize certain actions, etc.
- Irreversible operation on a qubit or quantum register
- Measurements are performed relative to a basis of base vectors
- Measurement can only yield one of the constituent
pure states
(i.e. in the case of an already pure state the result will be known in advance) - The probability of arriving at a pure state is proportional to the squared modulus of its (complex) amplitude (more on this later)
- Because reversibility sometimes requires outputting additional
information, it may be necessary to use additional, so called
ancillary
qubits, which will store this information and can later be discarded. - Because sometimes the ancillary qubits get entangled with the
main thread of computation, it is not always possible to just
discard them. In such cases one might need to perform
uncomputation
, which is a unitary way toundo
the entanglement.
- Unwanted, but unavoidable (?) interference between computational elements (qubits) and their (quantum-mechanical) surroundings
- Decoherence boils down to physical qubits getting entangled with the environment
- Attempts to limit decoherence involve cryogenic environments, shielding, quantum error correction, etc.
- Complex numbers (commonly denoted as
$\mathbb{C}$ ) are a generalization of real numbers ($\mathbb{R}$ ) but with the inclusion of the so-called imaginary unit ($i = \sqrt{-1}$ ). - Historically they stemmed from research into the solvability of quadratic equations (particularly, with negative discriminants). Pioneering the concept were Italian mathematicians Cardano, Bombelli and Tartaglia.
- Initially, complex numbers were viewed as a purely mathematical trick, but over the next couple centuries their intimate relationship to geometry and physics was discovered (culminating in the central part they play in quantum mechanics).
- The most general form of a complex number is:
$z = a + ib$ (called a cartesian form).$a$ and$b$ are called real and imaginary part, respectively (we can say that$\Re{z} ≡ Re\ z = a$ and$\Im{z} ≡ Im\ z = b$ ). - An important concept is complex conjugation, which boils
down to negation of the imaginary part and is frequently
denoted as
$z^*$ or$\bar{z}$ ($z^* ≡ \bar{z} = a - ib$ ). - An alternative way to represent a complex number is called
polar form:
$z = (r, \varphi)$ , where$r = \sqrt{|a|^2 + |b|^2}$ and$\varphi = arctan(\frac{b}{a})$ . - We have:
$zz^* = (a + ib)(a - ib) = a^2 - (ib)^2 = a^2 + b^2 = |z|^2$ .$|z|$ is called the modulus. This relation is important and will be lurking all throughout quantum mechanics. - Complex numbers can be visualized on a 2-dimensional complex
plane as if they were 2D vectors. In this picture the real
and imaginary parts correspond to
$x$ and$y$ coordinates, polar components of a complex number correspond to polar coordinates of a vector, modulus is the distance from origin and complex conjugation is reflection about the real axis. - An interactive review of complex arithmetic is available here.
- Nice interactive introduction/review available here
- An ordinary vector can be represented sybolically as a
ket
(after Dirac) - Notational equivalence:
- An object dual to a vector (a
covector
ordifferential form
) can be represented sybolically as abra
- Hermitian conjugate is the conversion operation between bras and kets
- Notational equivalence:
- A combination of matrix transposition and taking complex
conjugates of all its elements:
$A^† = (A^T)^* = (A^*)^T$
- A matrix is unitary when
$AA^† = A^† A = I$ - Unitary matrices preserve vector lengths and are thus
generalizations of rotations
$\langle a A|A a\rangle = \langle a|A^† A|a\rangle = \langle a|I|a\rangle = \langle a|a\rangle$ - All quantum gates satisfy this property
- Unitary matrices have eigenvalues of modulus
$1$ (shown here)
- A Hermitian (self-adjoint) matrix is identical to its Hermitian conjugate
- All eigenvalues of a Hermitian matrix are real
- Because of the above, physical observables (i.e. measurable properties of a system) are represented as Hermitian operators
- Each physical state is associated with a Hilbert space
$H$ (vector space, where calculus can be applied) with an inner product$\langle a|b\rangle$ (for$a$ and$b$ being vectors in$H$ ) - The Hilbert space of a composite system is a tensor product of constituent Hilbert spaces
- Physical observables are represented by hermitian matrices
operating in
$H$ - The expectation value of an observable
$A$ for a system in state$ψ$ is$\langle ψ|A|ψ\rangle$ - The spectrum of an operator (its eigenvalues) represents the possible outcomes of physical measurement
- State can be alternatively represented by a
density matrix
- The dynamics of a quantum system is given by the Schrödinger
equation:
$i \hbar \frac{∂}{∂ t}Ψ(\mathbf{r},t) = \hat H Ψ(\mathbf{r},t)$
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22X%22,%22X%22\]\],%22init%22:\[0,1\]}][NOT gate]]
Acting on two separate qubits set to
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22H%22,%22H%22\]\],%22init%22:\[0,1\]}][Hadamard gate]]
Converting a pure state into a superposition
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22H%22,%22H%22\],\[%22H%22,%22H%22\]\],%22init%22:\[0,1\]}][2 Hadamard gates]]
… and back again
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22%E2%80%A2%22,%22X%22\],\[1,1,%22%E2%80%A2%22,%22X%22\]\],%22init%22:\[1\]}][CNOT gate]]
Controlled NOT
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22H%22\],\[%22%E2%80%A2%22,%22X%22\]\]}][Bell state]]
Simplest instance of quantum entanglement
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22Swap%22,%22Swap%22\],\[1,1,%22Swap%22,%22Swap%22\],\[1,1,1,1,%22Swap%22,%22Swap%22\],\[1,1,1,1,1,1,%22Swap%22,%22Swap%22\]\],%22init%22:\[1,0,0,1,0,0,1,1\]}][SWAP gate]]
Exchange two qubits connected by the gate
[[https://algassert.com/quirk#circuit={%22cols%22:\[\[%22Z%22\],\[1,%22Z%22\]\],%22init%22:\[0,1\]}][Z gate]]
Negates the
QPL designed by Microsoft. The QDK contains a quantum simulator and many useful debugging tools. Q# programs are embedded within C# code, which handles the non-quantum part.
QPL by IBM. Reasonably mature programming environment, heavy integration with Jupyter notebooks, lots of high-quality introductory material.
QPL build by Rigetti Computing. Embeds quantum computations within ordinary Python code. Unlike Q# it’s more of a library than separate language. Facilitates experiments with
A QPL embedded in Haskell. Aspects of quantum computation, such as measurement, are represented as monadic types (cf. our conversation at Luigi’s Lucky Leprechaun)
Simple and intuitive quantum circuit visualizer. Good to untangle (hehe…) conceptual confusion that sometimes arises when working on a problem.
Scientific blog by Scott Aaronson. Lots of explanations, discussions and pointers to other resources.
In-depth introduction to QC concepts and discussion of physical implementations.
Slightly humorous and heavily philosophical take on QC and complexity theory.
Slightly more accessible than “Mike & Ike”. Not as in-depth.
Well-written, but technical introduction to the topic.
Excerpt from the book “Quantum Walks and Search Algorithms” by Renato PortugalSeries of introductory articles on QC by Daniel Vaughan
Discussion of various types of QC architectures
The course starts the 6th of November, every Friday till Dec 18th.
Half-tongue-in-cheek, half-serious musings on the nature of QM
A koan-like approach to teaching QC and Q#. There are two ways to run them:
- Natively, using Microsoft’s QDK
- Embedded in a Jupyter Notebook