# One-way quantum computer

The one-way quantum computer, also known as measurement-based quantum computer (MBQC), is a method of quantum computing that first prepares an entangled resource state, usually a cluster state or graph state, then performs single qubit measurements on it. It is "one-way" because the resource state is destroyed by the measurements.
The outcome of each individual measurement is random, but they are related in such a way that the computation always succeeds. In general, the choices of basis for later measurements need to depend on the results of earlier measurements, and hence the measurements cannot all be performed at the same time.
The implementation of MBQC is mainly considered for photonic devices, due to the difficulty of entangling photons without measurements, and the simplicity of creating and measuring them. However, MBQC is also possible with matter-based qubits. The process of entanglement and measurement can be described with the help of graph tools and group theory, in particular by the elements from the stabilizer group.

## Definition

The purpose of quantum computing focuses on building an information theory with the features of quantum mechanics: instead of encoding a binary unit of information (bit), which can be switched to 1 or 0, a quantum binary unit of information (qubit) can simultaneously turn to be 0 and 1 at the same time, thanks to the phenomenon called superposition. Another key feature for quantum computing relies on the entanglement between the qubits.
In the quantum logic gate model, a set of qubits, called register, is prepared at the beginning of the computation, then a set of logic operations over the qubits, carried by unitary operators, is implemented. A quantum circuit is formed by a register of qubits on which unitary transformations are applied over the qubits. In the measurement-based quantum computation, instead of implementing a logic operation via unitary transformations, the same operation is executed by entangling a number $k$ of input qubits with a cluster of $a$ ancillary qubits, forming an overall source state of $a+k=n$ qubits, and then measuring a number $m$ of them. The remaining $k=n-a$ output qubits will be affected by the measurements because of the entanglement with the measured qubits. The one-way computer has been proved to be a universal quantum computer, which means it can reproduce any unitary operation over an arbitrary number of qubits.

### General procedure

The standard process of measurement-based quantum computing consists of three steps: entangle the qubits, measure the ancillae (auxiliary qubits) and correct the outputs. In the first step, the qubits are entangled in order to prepare the source state. In the second step, the ancillae are measured, affecting the state of the output qubits. However, the measurement outputs are non-deterministic result, due to undetermined nature of quantum mechanics: in order to carry on the computation in a deterministic way, some correction operators, called byproducts, are introduced.

### Preparing the source state

At the beginning of the computation, the qubits can be distinguished into two categories: the input and the ancillary qubits. The inputs represent the qubits set in a generic $|\psi \rangle =\alpha |0\rangle +\beta |1\rangle$ state, on which some unitary transformations are to be acted. In order to prepare the source state, all the ancillary qubits must be prepared in the $|+\rangle$ state:
    $|+\rangle ={\tfrac {|0\rangle +|1\rangle }{\sqrt {2}}},$
where $|0\rangle$ and $|1\rangle$ are the quantum encoding for the classical $0$ and $1$ bits:
    $|0\rangle ={\begin{pmatrix}1\\0\end{pmatrix}};\quad |1\rangle ={\begin{pmatrix}0\\1\end{pmatrix}}$.
A register with $n$ qubits will be therefore set as $|+\rangle ^{\otimes n}$. Thereafter, the entanglement between two qubits can be performed by applying a (Controlled) $CZ$ gate operation. The matrix representation of such two-qubits operator is given by
    $CZ={\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&-1\end{bmatrix}}.$
The action of a $CZ$ gate over two qubits can be described by the following system:
    ${\begin{cases}CZ|0+\rangle =|0+\rangle \\CZ|0-\rangle =|0-\rangle \\CZ|1+\rangle =|1-\rangle \\CZ|1-\rangle =|1+\rangle \end{cases}}$
When applying a $CZ$ gate over two ancillae in the $|+\rangle$ state, the overall state
    $CZ|++\rangle ={\frac {|0+\rangle +|1-\rangle }{\sqrt {2}}}$
turns to be an entangled pair of qubits. When entangling two ancillae, no importance is given about which is the control qubit and which one the target, as far as the outcome turns to be the same. Similarly, as the $CZ$ gates are represented in a diagonal form, they all commute each other, and no importance is given about which qubits to entangle first.
Photons are the most common qubit system that is used in the context of one-way quantum computing. However, deterministic $CZ$ gates between photons are difficult to realize. Therefore, probabilistic entangling gates such as Bell state measurements are typically considered. Furthermore, quantum emitters such as atoms or quantum dots can be used to create deterministic entanglement between photonic qubits.

### Measuring the qubits

The process of measurement over a single-particle state can be described by projecting the state on the eigenvector of an observable. Consider an observable $O$ with two possible eigenvectors, say $|o_{1}\rangle$ and $|o_{2}\rangle$, and suppose to deal with a multi-particle quantum system $|\Psi \rangle$. Measuring the $i$-th qubit by the $O$ observable means to project the $|\Psi \rangle$ state over the eigenvectors of $O$:
    $|\Psi '\rangle =|o_{i}\rangle \langle o_{i}|\Psi \rangle$.
The actual state of the $i$-th qubit is now $|o_{i}\rangle$, which can turn to be $|o_{1}\rangle$ or $|o_{2}\rangle$, depending on the outcome from the measurement (which is probabilistic in quantum mechanics). The measurement projection can be performed over the eigenstates of the $M(\theta )=\cos(\theta )X+\sin(\theta )Y$ observable:
    $M(\theta )=\cos(\theta ){\begin{bmatrix}0&1\\1&0\end{bmatrix}}+\sin(\theta ){\begin{bmatrix}0&-i\\i&0\end{bmatrix}}={\begin{bmatrix}0&e^{-i\theta }\\e^{i\theta }&0\end{bmatrix}}$,
where $X$ and $Y$ belong to the Pauli matrices. The eigenvectors of $M(\theta )$ are $|\theta _{\pm }\rangle =|0\rangle \pm e^{i\theta }|1\rangle$. Measuring a qubit on the $X$-$Y$ plane, i.e. by the $M(\theta )$ observable, means to project it over $|\theta _{+}\rangle$ or $|\theta _{-}\rangle$. In the one-way quantum computing, once a qubit has been measured, there is no way to recycle it in the flow of computation. Therefore, instead of using the $|o_{i}\rangle \langle o_{i}|$ notation, it is common to find $\langle o_{i}|$ to indicate a projective measurement over the $i$-th qubit.

### Correcting the output

After all the measurements have been performed, the system has been reduced to a smaller number of qubits, which form the output state of the system. Due to the probabilistic outcome of measurements, the system is not set in a deterministic way: after a measurement on the $X$-$Y$ plane, the output may change whether the outcome had been $|\theta _{+}\rangle$ or $|\theta _{-}\rangle$. In order to perform a deterministic computation, some corrections must be introduced. The correction operators, or byproduct operators, are applied to the output qubits after all the measurements have been performed. The byproduct operators which can be implemented are $X$ and $Z$. Depending on the outcome of the measurement, a byproduct operator can be applied or not to the output state: a $X$ correction over the $j$-th qubit, depending on the outcome of the measurement performed over the $i$-th qubit via the $M(\theta )$ observable, can be described as $X_{j}^{s_{i}}$, where $s_{i}$ is set to be $0$ if the outcome of measurement was $|\theta _{+}\rangle$, otherwise is $1$ if it was $|\theta _{-}\rangle$. In the first case, no correction will occur, in the latter one a $X$ operator will be implemented on the $j$-th qubit. Eventually, even though the outcome of a measurement is not deterministic in quantum mechanics, the results from measurements can be used in order to perform corrections, and carry on a deterministic computation.

## CME pattern

The operations of entanglement, measurement and correction can be performed in order to implement unitary gates. Such operations can be performed time by time for any logic gate in the circuit, or rather in a pattern which allocates all the entanglement operations at the beginning, the measurements in the middle and the corrections at the end of the circuit. Such pattern of computation is referred to as CME standard pattern. In the CME formalism, the operation of entanglement between the $i$ and $j$ qubits is referred to as $E_{ij}$. The measurement on the $i$ qubit, in the $X$-$Y$ plane, with respect to a $\theta$ angle, is defined as $M_{i}^{\theta }$. At last, the $X$ byproduct over a $i$ qubit, with respect to the measurement over a $j$ qubit, is described as $X_{i}^{s_{j}}$, where $s_{j}$ is set to $0$ if the outcome is the $|\theta _{+}\rangle$ state, $1$ when the outcome is $|\theta _{-}\rangle$. The same notation holds for the $Z$ byproducts.
When performing a computation following the CME pattern, it may happen that two measurements $M_{i}^{\theta _{1}}$ and $M_{j}^{\theta _{2}}$ on the $X$-$Y$ plane depend one on the outcome from the other. For example, the sign in front of the angle of measurement on the $j$-th qubit can be flipped with respect to the measurement over the $i$-th qubit: in such case, the notation will be written as $[M_{j}^{\theta _{2}}]^{s_{i}}M_{i}^{\theta _{1}}$, and therefore the two operations of measurement do commute each other no more. If $s_{i}$ is set to $0$, no flip on the $\theta _{2}$ sign will occur, otherwise (when $s_{i}=1$) the $\theta _{2}$ angle will be flipped to $-\theta _{2}$. The notation $[M_{j}^{\theta _{2}}]^{s_{i}}$ can therefore be rewritten as $M_{j}^{(-)^{s_{i}}\theta _{2}}$.

### An example: Euler rotations

As an illustrative example, consider the Euler rotation in the $XZX$ basis: such operation, in the gate model of quantum computation, is described as
    $e^{i\gamma }R_{X}(\phi )R_{Z}(\theta )R_{X}(\lambda )$,
where $\phi ,\theta ,\lambda$ are the angles for the rotation, while $\gamma$ defines a global phase which is irrelevant for the computation. To perform such operation in the one-way computing frame, it is possible to implement the following CME pattern:
    $Z_{5}^{s_{1}+s_{3}}X_{5}^{s_{2}+s_{4}}[M_{4}^{-\phi }]^{s_{1}+s_{3}}[M_{3}^{-\theta }]^{s_{2}}[M_{2}^{-\lambda }]^{s_{1}}M_{1}^{0}E_{4,5}E_{3,4}E_{2,3}E_{1,2}$,
where the input state $|\psi \rangle =\alpha |0\rangle +\beta |1\rangle$ is the qubit $1$, all the other qubits are auxiliary ancillae and therefore have to be prepared in the $|+\rangle$ state. In the first step, the input state $|\psi \rangle$ must be entangled with the second qubits; in turn, the second qubit must be entangled with the third one and so on. The entangling operations $E_{ij}$ between the qubits can be performed by the $CZ$ gates.
In the second place, the first and the second qubits must be measured by the $M(\theta )$ observable, which means they must be projected onto the eigenstates $|\theta \rangle$ of such observable. When the $\theta$ is zero, the $|\theta _{\pm }\rangle$ states reduce to $|\pm \rangle$ ones, i.e. the eigenvectors for the $X$ Pauli operator. The first measurement $M_{1}^{0}$ is performed on the qubit $1$ with a $\theta =0$ angle, which means it has to be projected onto the $\langle \pm |$ states. The second measurement $[M_{2}^{-\lambda }]^{s_{1}}$ is performed with respect to the $-\lambda$ angle, i.e. the second qubit has to be projected on the $\langle 0|\pm e^{i\lambda }\langle 1|$ state. However, if the outcome from the previous measurement has been $\langle -|$, the sign of the $\lambda$ angle has to be flipped, and the second qubit will be projected to the $\langle 0|+e^{-i\lambda }\langle 1|$ state; if the outcome from the first measurement has been $\langle +|$, no flip needs to be performed. The same operations have to be repeated for the third $[M_{3}^{\theta }]^{s_{2}}$ and the fourth $[M_{4}^{\phi }]^{s_{1}+s_{3}}$ measurements, according to the respective angles and sign flips. The sign over the $\phi$ angle is set to be $(-)^{s_{1}+s_{3}}$. Eventually the fifth qubit (the only one not to be measured) figures out to be the output state.
At last, the corrections $Z_{5}^{s_{1}+s_{3}}X_{5}^{s_{2}+s_{4}}$ over the output state have to be performed via the byproduct operators. For instance, if the measurements over the second and the fourth qubits turned to be $\langle \phi _{+}|$ and $\langle \lambda _{+}|$, no correction will be conducted by the $X_{5}$ operator, as $s_{2}=s_{4}=0$. The same result holds for a $\langle \phi _{-}|$ $\langle \lambda _{-}|$ outcome, as $s_{2}=s_{4}=1$ and thus the squared Pauli operator $X^{2}$ returns the identity.
As seen in such example, in the measurement-based computation model, the physical input qubit (the first one) and output qubit (the third one) may differ each other.

## Equivalence between quantum circuit model and MBQC

The one-way quantum computer allows the implementation of a circuit of unitary transformations through the operations of entanglement and measurement. At the same time, any quantum circuit can be in turn converted into a CME pattern: a technique to translate quantum circuits into a MBQC pattern of measurements has been formulated by V. Danos et al.
Such conversion can be carried on by using a universal set of logic gates composed by the $CZ$ and the $J(\theta )$ operators: therefore, any circuit can be decomposed into a set of $CZ$ and the $J(\theta )$ gates. The $J(\theta )$ single-qubit operator is defined as follows:
    $J(\theta )={\frac {1}{\sqrt {2}}}{\begin{pmatrix}1&e^{i\theta }\\1&-e^{i\theta }\end{pmatrix}}$.
The $J(\theta )$ can be converted into a CME pattern as follows, with qubit 1 being the input and qubit 2 being the output:
    $J(\theta )=X_{2}^{s_{1}}M_{1}^{-\theta }E_{1,2}$
which means, to implement a $J(\theta )$ operator, the input qubits $|\psi \rangle$ must be entangled with an ancilla qubit $|+\rangle$, therefore the input must be measured on the $X$-$Y$ plane, thereafter the output qubit is corrected by the $X_{2}$ byproduct. Once every $J(\theta )$ gate has been decomposed into the CME pattern, the operations in the overall computation will consist of $E_{ij}$ entanglements, $M_{i}^{-\theta _{i}}$ measurements and $X_{j}$ corrections. In order to lead the whole flow of computation to a CME pattern, some rules are provided.

### Standardization

In order to move all the $E_{ij}$ entanglements at the beginning of the process, some rules of commutation must be pointed out:
    $E_{ij}Z_{i}^{s}=Z_{i}^{s}E_{ij}$
    $E_{ij}X_{i}^{s}=X_{i}^{s}Z_{j}^{s}E_{ij}$
    $E_{ij}A_{k}=A_{k}E_{ij}$.
The entanglement operator $E_{ij}$ commutes with the $Z$ Pauli operators and with any other operator $A_{k}$ acting on a qubit $k\neq i,j$, but not with the $X$ Pauli operators acting on the $i$-th or $j$-th qubits.

### Pauli simplification

The measurement operations $M_{i}^{\theta }$ commute with the corrections in the following manner:
    $M_{i}^{\theta }X_{i}^{s}=[M_{i}^{\theta }]^{s}$
    $M_{i}^{\theta }Z_{i}^{t}=S_{i}^{t}M_{i}^{\theta }$,
where $[M_{i}^{\theta }]^{s}=M_{i}^{(-)^{s}\theta }$. Such operation means that, when shifting the $X$ corrections at the end of the pattern, some dependencies between the measurements may occur. The $S_{i}^{t}$ operator is called signal shifting, whose action will be explained in the next paragraph. For particular $\theta$ angles, some simplifications, called Pauli simplifications, can be introduced:
    $M_{i}^{0}X_{i}^{s}=M_{i}^{0}$
    $M_{i}^{\pi /2}X_{i}^{s}=M_{i}^{\pi /2}Z_{i}^{s}$.

### Signal shifting

The action of the signal shifting operator $S_{i}^{t}$ can be explained through its rules of commutation:
    $X_{i}^{s}S_{i}^{t}=S_{i}^{t}X_{i}^{s[(s_{i}+t)/s_{i}]}$
    $Z_{i}^{s}S_{i}^{t}=S_{i}^{t}Z_{i}^{s[(s_{i}+t)/s_{i}]}$.
The $s[(t+s_{i})/s_{i}]$ operation has to be explained: suppose to have a sequence of signals $s$, consisting of $s_{1}+s_{2}+...+s_{i}+...$, the operation $s[(t+s_{i})/s_{i}]$ means to substitute $s_{i}$ with $s_{i}+t$ in the sequence $s$, which becomes $s_{1}+s_{2}+...+s_{i}+t+...$. If no $s_{i}$ appears in the $s$ sequence, no substitution will occur. To perform a correct CME pattern, every signal shifting operator $S_{i}^{t}$ must be translated at the end of the pattern.

## Stabilizer formalism

Algebraic structure → Group theory Group theory :
Basic notions
Subgroup
Normal subgroup
Group action
Quotient group
(Semi-)direct product
Direct sum
Free product
Wreath product
Group homomorphisms
kernel
image
simple
finite
infinite
continuous
multiplicative
additive
cyclic
abelian
dihedral
nilpotent
solvable
Glossary of group theory
List of group theory topics :
Finite groups
Cyclic group Z$_n$
Symmetric group S$_n$
Alternating group A$_n$
Dihedral group D$_n$
Quaternion group Q
Cauchy's theorem
Lagrange's theorem
Sylow theorems
Hall's theorem
p-group
Elementary abelian group
Frobenius group
Schur multiplier
Classification of finite simple groups
cyclic
alternating
Lie type
sporadic :
Discrete groupsLattices
Integers ($\mathbb {Z}$)
Free group
Modular groups PSL(2, $\mathbb {Z}$)SL(2, $\mathbb {Z}$)
Arithmetic group
Lattice
Hyperbolic group :
Topological and Lie groups
Solenoid
Circle
General linear GL(n)
Special linear SL(n)
Orthogonal O(n)
Euclidean E(n)
Special orthogonal SO(n)
Unitary U(n)
Special unitary SU(n)
Symplectic Sp(n)
G$_2$
F$_4$
E$_6$
E$_7$
E$_8$
Lorentz
Poincaré
Conformal
Diffeomorphism
Loop
Infinite dimensional Lie group O(∞)SU(∞)Sp(∞) :
Algebraic groups
Linear algebraic group
Reductive group
Abelian variety
Elliptic curve :
vte :
When preparing the source state of entangled qubits, a graph representation can be given by the stabilizer group. The stabilizer group ${\mathcal {S}}_{n}$ is an abelian subgroup from the Pauli group ${\mathcal {P}}_{n}$, which one can be described by its generators $\{\pm 1,\pm i\}\times \{I,X,Y,Z\}^{\otimes n}$. A stabilizer state is a $n$-qubit state $|\Psi \rangle$ which is a unique eigenstate for the generators $S_{i}$ of the ${\mathcal {S}}_{n}$ stabilizer group:
    $S_{i}|\Psi \rangle =|\Psi \rangle .$
Of course, $S_{i}\in {\mathcal {S}}_{n}\,\forall i$.
It is therefore possible to define a $n$ qubit graph state $|G\rangle$ as a quantum state associated with a graph, i.e. a set $G=(V,E)$ whose vertices $V$ correspond to the qubits, while the edges $E$ represent the entanglements between the qubits themselves. The vertices can be labelled by a $i$ index, while the edges, linking the $i$-th vertex to the $j$-th one, by two-indices labels, such as $(i,j)$. In the stabilizer formalism, such graph structure can be encoded by the $K_{i}$ generators of ${\mathcal {S}}_{n}$, defined as
    $K_{i}=X_{i}\prod _{j\in (i,j)}Z_{j}$,
where ${j\in (i,j)}$ stands for all the $j$ qubits neighboring with the $i$-th one, i.e. the $j$ vertices linked by a $(i,j)$ edge with the $i$ vertex. Each $K_{i}$ generator commute with all the others. A graph composed by $n$ vertices can be described by $n$ generators from the stabilizer group:
    $\langle K_{1},K_{2},...,K_{n}\rangle$.
While the number of $X_{i}$ is fixed for each $K_{i}$ generator, the number of $Z_{j}$ may differ, with respect to the connections implemented by the edges in the graph.

### The Clifford group

The Clifford group ${\mathcal {C}}_{n}$ is composed by elements which leave invariant the elements from the Pauli's group ${\mathcal {P}}_{n}$:
    ${\mathcal {C}}_{n}=\{U\in SU(2^{n})\;|\;USU^{\dagger }\in {\mathcal {P}}_{n},S\in {\mathcal {P}}_{n}\}$.
The Clifford group requires three generators, which can be chosen as the Hadamard gate $H$ and the phase rotation $S$ for the single-qubit gates, and another two-qubits gate from the $CNOT$ (controlled NOT gate) or the $CZ$ (controlled phase gate):
    $H={\frac {1}{\sqrt {2}}}{\begin{bmatrix}1&1\\1&-1\end{bmatrix}},\quad S={\begin{bmatrix}1&0\\0&i\end{bmatrix}},\quad CNOT={\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{bmatrix}}$.
Consider a state $|G\rangle$ which is stabilized by a set of stabilizers $S_{i}$. Acting via an element $U$ from the Clifford group on such state, the following equalities hold:
    $U|G\rangle =US_{i}|G\rangle =US_{i}U^{\dagger }U|G\rangle =S'_{i}U|G\rangle$.
Therefore, the $U$ operations map the $|G\rangle$ state to $U|G\rangle$ and its $S_{i}$ stabilizers to $US_{i}U^{\dagger }$. Such operation may give rise to different representations for the $K_{i}$ generators of the stabilizer group.
The Gottesman–Knill theorem states that, given a set of logic gates from the Clifford group, followed by $Z$ measurements, such computation can be efficiently simulated on a classical computer in the strong sense, i.e. a computation which elaborates in a polynomial-time the probability $P(x)$ for a given output $x$ from the circuit.

## Hardware and applications
### Topological cluster state quantum computer

Measurement-based computation on a periodic 3D lattice cluster state can be used to implement topological quantum error correction. Topological cluster state computation is closely related to Kitaev's toric code, as the 3D topological cluster state can be constructed and measured over time by a repeated sequence of gates on a 2D array.

### Implementations

One-way quantum computation has been demonstrated by running the 2 qubit Grover's algorithm on a 2x2 cluster state of photons. A linear optics quantum computer based on one-way computation has been proposed.
Cluster states have also been created in optical lattices, but were not used for computation as the atom qubits were too close together to measure individually.

### AKLT state as a resource

It has been shown that the (spin ${\tfrac {3}{2}}$) AKLT state on a 2D honeycomb lattice can be used as a resource for MBQC. More recently it has been shown that a spin-mixture AKLT state can be used as a resource.