# Glossary

Quantum computation is marked by a set of unitary matrices (quantum gates) acting on qubit states followed by measurement. The most used representation is the circuit model of computation, comprising straight lines and boxes. The horizontal lines represent qubits and boxes represent single qubit unitary gates. A two qubit unitary gate links one qubit from another via vertical lines. Some useful notations are given below.

### Quantum States

• ${\displaystyle |+\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle +|1\rangle ),\quad |-\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle -|1\rangle )}$
• X basis/Diagonal basis/x basis: ${\displaystyle \{|+\rangle ,|-\rangle \}}$
• Z basis/Rectilinear basis/+ basis: ${\displaystyle \{|0\rangle ,|1\rangle \}}$

### Unitary Operations

• ${\displaystyle {\text{X (NOT gate)}}}$: ${\displaystyle X|0\rangle \,\to \,\ |1\rangle ,\quad X|1\rangle \,\to \,\ |0\rangle ,\quad X|+\rangle \,\to \,\ |+\rangle ,\quad *X|-\rangle \,\to \,\ -|-\rangle }$
• ${\displaystyle {\text{Z}}}$: ${\displaystyle Z|+\rangle \,\to \,\ |-\rangle ,\quad Z|-\rangle \,\to \,\ |+\rangle ,\quad Z|0\rangle \,\to \,\ |0\rangle ,\quad Z|1\rangle \,\to \,\ -|1\rangle }$

Thus, ${\displaystyle |0\rangle }$, ${\displaystyle |1\rangle }$ are eigenstates of Z gate and ${\displaystyle |+\rangle }$, ${\displaystyle |-\rangle }$ are eigenstates of X gate.

• ${\displaystyle {\text{H (Hadamard gate)}}}$: ${\displaystyle H|0\rangle \,\to \,\ |+\rangle }$ or ${\displaystyle H|1\rangle \,\to \,\ |-\rangle }$
• ${\displaystyle {\text{P (Phase Gate)}}}$: Gates in this class operate on a single qubit. They are represented by 2 x 2 matrices of the form ${\displaystyle R(\theta )}$, as shown below. Here ${\displaystyle \theta }$ is the phase shift.

${\displaystyle R(\theta )=\left[{\begin{array}{cc}1&0\\0&e^{i\theta }\\\end{array}}\right],\quad X=\left[{\begin{array}{cc}0&1\\1&0\\\end{array}}\right],\quad Z=\left[{\begin{array}{cc}1&0\\0&-1\\\end{array}}\right],\quad H={\frac {1}{\sqrt {2}}}\left[{\begin{array}{cc}1&1\\1&-1\\\end{array}}\right]\quad }$

• ${\displaystyle {\text{Controlled-U(CU)}}}$: uses two inputs, control qubit and target qubit. It operates U on the second(target) qubit only when the first (source) qubit is 1. C-U gates are used to produce entangled states, when the target qubit is ${\displaystyle |+\rangle }$ and control qubit is not an eigenstate of U. In the given equation 'i' denotes the source qubit and 'j', the target qubit. Following are two important C-U gates.

${\displaystyle {\text{Controlled-NOT(C-X or CNOT): }}CX_{ij}|+\rangle _{i}|0\rangle _{j}\,\to \,\ {\frac {1}{\sqrt {2}}}(|0_{i}0_{j}\rangle +|1_{i}1_{j}\rangle )}$
${\displaystyle {\text{Controlled-Z (C-Z):}}CZ_{ij}|+\rangle _{i}|+\rangle _{j}\,\to \,\ {\frac {1}{\sqrt {2}}}(|0_{i}+_{j}\rangle +|1_{i}-_{j}\rangle )}$

The commutation relations for the above gates are as follows:
${\displaystyle XH=HZ,\quad XZ=-ZX}$
${\displaystyle (X\otimes I)CZ=CZ(X\otimes Z),\quad (Z\otimes I)CZ=CZ(Z\otimes I)}$

### Hierarchy of Quantum Gates

There are different class of quantum gates as follows,

• Pauli Gates(U): Single Qubit Gates I (Identity), X, Y, Z. All the gates in this set follow ${\displaystyle U^{2}=I}$
• Clifford Gates(C): Pauli Gates, Phase Gate, C-NOT. This set of gates can be simulated on classical computer. All the gates in this set follow CU=U'C, where U and U' are two different Pauli gates depending on C
• Universal Set of gates: This set consists of all Clifford gates and one Non-Clifford gate (T gate). If a model can realise Universal Set of gates, it can imlement any quantum computation efficiently. T gates follow ${\displaystyle UT=P^{a}U'T}$, where P is the phase gate and U, U' are any two Pauli gates depending on C. Parameter ${\displaystyle a\epsilon {0,1}}$ is obtained from U, such that ${\displaystyle P^{0}=I}$, ${\displaystyle P^{1}=P}$.

To summarize, if ${\displaystyle C^{1}=}$P, ${\displaystyle C^{2}=}$C, ${\displaystyle C^{3}=}$T, then ${\displaystyle C^{k}=\{U:UQU=C^{k-1}|Q\epsilon C^{1}\}}$

### Magic States

It is any state that, if you have an unlimited supply of them, can be used to give you universal quantum computation when used in conjunction with perfect Clifford operations. The standard example is that if you can produce the state ${\displaystyle (|0\rangle +e^{i\pi /4}|1\rangle )/{\sqrt {2}}}$, then you can combine this with Clifford operations in order to apply a T gate, and we know that T+Clifford is universal.

### Universal Resource

A set of ${\displaystyle |+_{\theta }\rangle }$states on which applying Clifford operations is enough for universal quantum computation.

### Superposition

Superposition is a fundamental concept in quantum mechanics which states if two states ${\displaystyle |\psi \rangle }$ and ${\displaystyle |\phi \rangle }$ are representing two valid state in a Hilbert space, their linear combination exist in the same Hilbert space as well and refer to another valid states. We call state ${\displaystyle \alpha |\psi \rangle +\beta |\phi \rangle }$ a superposition of the two states. This property leads to most of the non-classical properties of quantum mechanics such as entanglement.

### Entangled States

An entangled state is the quantum state of a group of particled (or a two party or multiparty system) that cannot be described as the independent states of these particles (or subsystems). The subsystems of such a quantum state, have quantum correlation even over a long distance. Mathematically, a multiparty entangled state cannot be written in following way:
${\displaystyle |\psi _{1-N}\rangle =|\psi _{1}\rangle \otimes ...\otimes |\psi _{N}\rangle }$
The states that can be written in the above from, are called separable states.

### EPR Pairs

EPR pairs refer to the pairs of particles with a conjugate physical property such as angular momentum. This concept has been introduced for the first time by the EPR (Einstein–Podolsky–Rosen) paradox which is a thought experiment challenging the explanation of physical reality provided by Quantum Mechanics. The particles that have been used in the EPR paradox had perfect correlation in such a way that measuring a quantity of a particle A will cause the conjugated quantity of particle B to become undetermined, even if there was no contact, no classical disturbance. A two party quantum state with above property can be described with the following state:
${\displaystyle |\Phi ^{+}\rangle ={\frac {1}{sqrt{2}}}(|00\rangle +|11\rangle )}$
This is one of the Bell states.

### Bell States

Bell states are maximally-entangled two-qubit states. These are the states that violate the Bell's inequality with maximal value of ${\displaystyle 2{\sqrt {2}}}$. These states make a compelete basis for the two-qubit (4 dimensional) Hilbert space:

${\displaystyle |\Phi ^{+}\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle _{A}\otimes |0\rangle _{B}+|1\rangle _{A}\otimes |1\rangle _{B})}$
${\displaystyle |\Phi ^{-}\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle _{A}\otimes |0\rangle _{B}-|1\rangle _{A}\otimes |1\rangle _{B})}$
${\displaystyle |\Psi ^{+}\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle _{A}\otimes |1\rangle _{B}+|1\rangle _{A}\otimes |0\rangle _{B})}$

${\displaystyle |\Psi ^{-}\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle _{A}\otimes |1\rangle _{B}-|1\rangle _{A}\otimes |0\rangle _{B})}$

### Bell State Measurement

Bell state measurement is termed as the projection of two qubits into one of the four Bell States as described above. It is done operating a Hadamard gate on one qubit and then, operating a C-NOT gate with this qubit as control and the other qubit as target. More on BSM can be found in [1]

### Fidelity

The Fidelity is a quantum distance measure between two quantum states. For two general state $\rho$ and $\sigma$ it is defined as followes:

${\displaystyle F(\rho ,\sigma )=[Tr({\sqrt {{\sqrt {\rho }}\sigma {\sqrt {\rho }}}})]^{2}}$
The definition reduces to the squared overlap between the pure states ${\displaystyle |\psi _{\rho }\rangle \and\|\psi _{\sigma }\rangle }$:
${\displaystyle F(|\psi _{\rho }\rangle ,|\psi _{\sigma }\rangle )=|\langle \psi _{\rho }|\psi _{\sigma }\rangle |^{2}}$

### Density Matrix, Pure and Mixed states

A density matrix is the matrix representation of a statistical state in quantum mechanics. This is a useful representation for mixed states. The mixed states are the states which cannot be described with a single vector $|\psi\rangle$ in Hilbert space. Instead, they are statistical mixture of several pure states. These states are also useful for describing the quantum state of a subsystem of a multi-party or larger quantum sysytem where the overall state can be shown as pure states. a density matrix in general can be shown as:

${\displaystyle \rho =\sum _{i}p_{i}|\psi _{i}\rangle \langle \psi _{i}|}$
where ${\displaystyle |\psi _{i}\rangle }$ are pure states and ${\displaystyle p_{i}}$ are the relative probabilities. For a pure quantum state ${\displaystyle |\psi \rangle }$ the density matrix representation will be:
${\displaystyle \rho =|\psi \rangle \langle \psi |}$

### Unitary transformation

A unitary transformation is an isomorphism between two Hilbert spaces, These transformation preserve the inner products of the vector states and can be shown as matrices where ${\displaystyle UU^{\dagger }=U^{\dagger }U=I}$.

### Monogomy of entanglement

Monogamy is one of the most fundamental properties of entanglement and can, in its extremal form, be expressed as follows: If two qubits A and B are maximally quantumly correlated they cannot be correlated at all with a third qubit C. In general, there is a trade-off between the amount of entanglement between qubits A and B and the same qubit A and qubit C. This is mathematically expressed as:
${\displaystyle E(A|B1)+E(A|B2)\leq E(A|B1B2)}$
where ${\displaystyle E()}$ is a measure for entanglement.

### Ancilla or Ancillary states

Ancillary states are extra states used in some quantum algorithms and are usually measured or discarded at the end of the procedure or they represent the state of an extra quantum system that is used for computation or etc.

### Bloch Sphere

In quantum mechanics, the Bloch sphere is a geometrical representation of the pure state space of a two-level quantum mechanical system (qubit). The Bloch sphere is a unit 2-sphere, with antipodal points corresponding to a pair of mutually orthogonal state vectors. The north and south poles of the Bloch sphere are typically chosen to correspond to the standard basis vectors ${\displaystyle |0\rangle }$, ${\displaystyle |1\rangle }$ respectively, which in turn might correspond e.g. to the spin-up and spin-down states of an electron. This choice is arbitrary, however. The points on the surface of the sphere correspond to the pure states of the system, whereas the interior points correspond to the mixed states.

### Quantum One Way Function

• Classical To Quantum QOWF

Based on the fundamental principles of quantum mechanics, QOWF was proposed by Gottesman and Chuang [2] and its definition is presented as follows.
Definition 1 Let k, ${\displaystyle |f_{k}\rangle }$ be classical bits string of length ${\displaystyle L_{1}}$, quantum state of ${\displaystyle L_{2}}$ qubits, respectively. A function ${\displaystyle f:k\rightarrow |f_{k}\rangle }$, where ${\displaystyle |f_{k}\rangle }$ satisfies ${\displaystyle \langle f_{k}|f_{k'}\rangle \leq \delta <1}$ for ${\displaystyle k\neq k'}$, is called a QOWF under physical mechanics if

1. Easy to compute: The mapping ${\displaystyle f:k\rightarrow |f_{k}\rangle }$ is easy to compute by a quantum polynomial-time algorithm.
2. Hard to invert: Given ${\displaystyle |f_{k}\rangle }$, it is impossible to invert k by virtue of fundamental quantum information theory.

### Gate Teleportation

The idea comes from one-qubit teleporation. This means that one can transfer an unknown qubit |ψi without actually sending it via a quantum channel. The underlying equations explain the notion. See Figure 1 for circuit.

Figure 1: One Bit Teleportation

${\displaystyle (H\otimes I)(CZ_{12})|\psi \rangle _{1}|+\rangle _{2}}$

${\displaystyle (H\otimes I)(CZ_{12})(a|0\rangle _{1}+b|1\rangle _{1})|+\rangle _{2}}$ ${\displaystyle (H\otimes I)(a|0\rangle _{1}|+\rangle _{2}+b|1\rangle _{1}|-\rangle _{2})}$ ${\displaystyle a|+\rangle _{1}|+\rangle _{2}+b|-\rangle _{1}|-\rangle _{2}}$ ${\displaystyle |0\rangle _{1}\otimes (a|+\rangle _{2}+b|-\rangle _{2})+|1\rangle _{1}\otimes (a|+\rangle _{2}-b|-\rangle _{2})}$ ${\displaystyle |0\rangle _{1}\otimes (a|+\rangle _{2}+b|-\rangle _{2})+|1\rangle _{1}\otimes X(a|+\rangle _{2}+b|-\rangle _{2})}$ ${\displaystyle |0\rangle _{1}\otimes H(a\rangle 0\rangle _{2}+b\rangle 1\rangle _{2})+|1\rangle _{1}\otimes XH(a|0\rangle _{2}+b|1\rangle _{2})}$ ${\displaystyle |0\rangle _{1}\otimes H|\psi \rangle _{2}+|1\rangle _{1}\otimes X|\psi \rangle _{2}}$ ${\displaystyle |m\rangle \otimes X^{m}H|\psi \rangle }$

Similarly if we have the input state rotated by a ${\displaystyle \mathrm {Z} (\theta )}$ gate the circuit would look like Figure 2a. As the rotation gate ${\displaystyle \mathrm {Z} (\theta )}$ commutes with Controlled-Phase gate. Hence, Figure 2b is justified.

• 2(a)Modified Input
• 2(b)Gate Teleportation

This shows that for a pair of ${\displaystyle \mathrm {CZ} }$ entangled qubits, if the second qubit is in ${\displaystyle |+\rangle }$ state (not an eigen value of ${\displaystyle \mathrm {Z} }$) then one can teleport (transfer) the first qubit state operated by any unitary gate ${\displaystyle \mathrm {U} }$ to the second qubit by performing operations only on the first qubit and measuring it. Next, we would need to make certain Pauli corrections (in this case ${\displaystyle {\mathrm {X} }^{\mathrm {m} }}$) to obtain ${\displaystyle \mathrm {U} |\psi \rangle }$. In other words, we can say the operated state is teleported to the second qubit by a rotated basis measurement of the first qubit with additional Pauli corrections.

### Graph states

The above operation can also be viewed as a graph state with two nodes and one edge. The qubit 1 is measured in a rotated basis ${\displaystyle \mathrm {HZ} (\theta )}$, thus leaving qubit 2 in desired state and Pauli Correction ${\displaystyle \mathrm {X} ^{|}\mathrm {s1} \rangle \mathrm {HZ} (\theta _{1})|\psi \rangle }$, where ${\displaystyle \mathrm {s1} }$ is the measurement outcome of qubit 1. See Figure 3

Figure 3: Graph State for Single Qubit Gates

Now, suppose we need to operate the state with two unitary gates ${\displaystyle \mathrm {Z} (\theta _{1})}$ and ${\displaystyle \mathrm {Z} (\theta _{2})}$. This can be done by taking the output state of ${\displaystyle \mathrm {Z} (\theta _{1})}$ gate as the input state of ${\displaystyle \mathrm {Z} (\theta _{2})}$ gate and then repeating gate teleportation for this setup, as described above. Thus, following the same pattern for graph states we have now three nodes (two measurement qubits for two operators and one output qubit) with two edges, entangled as one dimensional chain (See Figure 4).

Figure 4: Gate Teleporation for Multiple Single Qubit Gates

The measurement on qubit ${\displaystyle \mathrm {1} }$ will operate ${\displaystyle \mathrm {X} ^{\mathrm {s1} }\mathrm {HZ} (\theta _{1})|\psi \rangle \otimes I}$ on qubits ${\displaystyle \mathrm {2} }$ and ${\displaystyle \mathrm {3} }$. If qubit ${\displaystyle \mathrm {2} }$ when measured in the given basis yields outcome ${\displaystyle \mathrm {s2} }$, qubit ${\displaystyle \mathrm {3} }$ results in the following state ${\displaystyle {\mathrm {X} }^{\mathrm {s2} }\mathrm {HZ} (\theta _{2}){\mathrm {X} }^{\mathrm {s1} }\mathrm {HZ} (\theta _{1})|\psi \rangle }$. Using the relation we shift all the Pauli corrections to one end i.e. qubit ${\displaystyle \mathrm {3} }$ becomes ${\displaystyle {\mathrm {X} }^{\mathrm {s2} }\mathrm {HZ} (\theta _{2})\mathrm {HZ} (\theta _{1})|\psi \rangle }$ (${\displaystyle {\mathrm {Z} }^{\mathrm {s1} }\mathrm {H} ={\mathrm {HX} }^{\mathrm {s1} }}$). This method of computation requires sequential measurement of states i.e. all the states should not be measured simultaneously. As outcome of qubit ${\displaystyle \mathrm {1} }$ can be used to choose sign of ${\displaystyle \pm \theta _{2}}$. This technique is also known as adaptive measurement. With each measurement, the qubits before the one measured at present have been destroyed by measurement. It is a feed-forward mechanism, hence known as one way quantum computation.

### Measurement Based Quantum Computation (MBQC)

MBQC is a formalism used for quantum computation by operating only single qubit measurements on a fixed set of entangled states, also known as graph states. Graph states denote any graph where each node represents a quantum state, and the edges denote entanglement between any two vertices. The measurement on successive layers of qubits is decided by previous measurement outcomes. Outcomes of last qubit layer gives the result of concerned computation. Following, we illustrate certain primitives necessary to understand the working of MBQC.

#### Cluster States

In case of multi-qubit quatum circuits, one needs a 2-dimensional graph state. Cluster State is a square lattice used as substrate for such computation. All the nodes are in ${\displaystyle |+\rangle }$ entangled by ${\displaystyle \mathrm {CZ} }$ indicated by the edges. It is known to be universal i.e. it can simulate any quatum gate.

Figure 5: Cluster State

Each row would thus represent the teleporation of starting qubit in that row horizontally. On the other hand, vertical edges indicate different input qubits linked with multi-qubit gates (same as circuit model). For example, see Figure Figure 6 to understand the conversion from circuit model to graph state model. As the computation relation follows ${\displaystyle X=HZH}$, thus, Figure Figure 6a represents Circuit diagram for ${\displaystyle \mathrm {CNOT} }$ gate in terms of ${\displaystyle \mathrm {CZ} }$ gate and Single Qubit Gate ${\displaystyle \mathrm {H} }$.

• (a)Circuit Diagram to implement C-NOT
• (b)Graph State Pattern for C-NOT
• Figure 6: Measurement Pattern from Circuit Model

Figure 6b shows implementation of the first Hadamard gate on the second input state as measurement ${\displaystyle \mathrm {M} _{\mathrm {2} }}$ on qubit ${\displaystyle \mathrm {2} }$. Then ${\displaystyle \mathrm {CZ} }$ gate is implemented by the entangled qubits ${\displaystyle \mathrm {3} }$ and ${\displaystyle \mathrm {1} }$ in the graph state. Qubit ${\displaystyle \mathrm {3} }$ is entangled to another qubit ${\displaystyle \mathrm {4} }$ to record the output while measurement ${\displaystyle \mathrm {M} _{\mathrm {3} }}$ on qubit ${\displaystyle \mathrm {3} }$ implements the second Hadamard gate. Finally, the states to which qubits ${\displaystyle \mathrm {(1)} }$ and ${\displaystyle \mathrm {(4)} }$ are reduced to determine the output states of the two input qubits after ${\displaystyle \mathrm {CNOT} }$ gate operation.
It is evident that one needs to remove certain nodes from the cluster state in order to implement the above shown graph state. This can be done by Z-basis measurements. Such measurements would leave the remaining qubits in the cluster state with extra Pauli corrections. This can be explained as follows. Consider a two-dimesional graph state ${\displaystyle \{\mathrm {1,2} \}}$. If qubit ${\displaystyle \mathrm {1} }$ is to be eliminated, we operate ${\displaystyle \mathrm {CZ} }$ with ${\displaystyle \mathrm {2} }$ as target and ${\displaystyle \mathrm {1} }$ as control.

${\displaystyle {\mathrm {CZ} }_{\mathrm {12} }{|+\rangle }_{1}|+\rangle _{2}=|0\rangle _{1}|+\rangle _{2}+|1\rangle _{1}|-\rangle _{2}}$

Thus, if measurement on ${\displaystyle \mathrm {1} }$ yields ${\displaystyle \mathrm {m} }$, qubit ${\displaystyle \mathrm {2} }$ would be in the state ${\displaystyle \mathrm {Z} ^{\mathrm {m} }|+\rangle }$. Hence, such Z-basis measurements invoke an extra ${\displaystyle \mathrm {Z} ^{\mathrm {m} }}$ Pauli correction on all the neighbouring sites of 1 with 1 eliminated, in the resulting graph state. Thus, to summarise, we design a measurement pattern from gate teleportation circuit of the desired computation as shown above. The cluster state is converted into the required graph state by Z-basis measurement on extraneous sites. Measuring all the qubits in the required basis and we get the required computation in the form of classical outcome register from measurement of the last layer of qubits. If it is a quantum function, the last layer of qubits is the output quantum register.

#### Brickwork States

Although cluster states are universal for MBQC, yet we need to tailor these to the specific computation by performing some computational (Z) basis measurements. If we were to use this principle for blind quantum computing, Client would have to reveal information about the structure of the underlying graph state. Thus, for the UBQC protocol, we introduce a new family of states called the Brickwork states which are universal for X − Y plane measurements and thus do not require the initial computational basis measurements. It was later shown that the Z-basis measurements can be dropped for cluster states and hence cluster states are also universal in X-Y measurements.

Figure 7: Brickwork State

Definition 1 A brickwork state Gn×m, where m ≡ 5 (mod 8), is an entangled state of n × m qubits constructed as follows (see also Figure 7):

1. Prepare all qubits in state |+i and assign to each qubit an index (i,j), i being a column (i ∈ [n]) and j being a row (j ∈ [m]).
2. For each row, apply the operator c-Z on qubits (i,j) and (i,j + 1) where 1 ≤ j ≤ m − 1.
3. For each column j ≡ 3 (mod 8) and each odd row i, apply the operator c-Z on qubits (i,j) and (i + 1,j) and also on qubits (i,j + 2) and (i + 1,j + 2).
4. For each column j ≡ 7 (mod 8) and each even row i, apply the operator c-Z on qubits (i,j) and (i + 1,j) and also on qubits (i,j + 2) and (i + 1,j + 2).

#### Cylinder Brickwork States

File:Brickwork state cylinder.png
Figure 8: Cylinder Brickwork State

The cylinder brickwork state ${\displaystyle G_{n*m}^{C}}$ is a modification of the brickwork state of size ${\displaystyle n*m}$, for even n, where the first and the last rows are connected such that the regular brickwork structure is preserved while introducing rotational symmetry. A tape ${\displaystyle T_{i}}$, shown in Fig 8.3, present in a cylinder brickwork graph is the subgraph which includes all the states in the random rows ${\displaystyle i}$ and ${\displaystyle i+1}$.

If all the nodes in ${\displaystyle T_{i}}$ of the graph ${\displaystyle G_{n*m}^{C}}$ are prepared in the dummy qubit state, ${\displaystyle |z\rangle }$ where ${\displaystyle z\in {0,1}}$ and the rest of the nodes are prepared in the state ${\displaystyle |+_{\theta _{i}}\rangle }$, then after entangling according to the cylinder brickwork state, the nodes are completely disentangled from the rest of the graph. The final obtained graph would be ${\displaystyle G_{(n-1)*m}^{C}\bigotimes _{i=1}^{m}|z\rangle }$.

The steps to perform single trap verifiable universal blind quantum computing are:

• A random qubit is chosen to be the trap qubit (red node in Fig 8.1)
• All other vertices in the tape containing the trap qubit (solid black nodes in Fig 8.2), are set to be dummy qubits
• This results in an isolated trap qubit in the state ${\displaystyle |+_{\theta _{i}}\rangle }$ together with many dummy qubits after entanglement operations (Fig 8.3)
• The net result, after discarding the dummy qubits, is a disentangled trap qubit in a product state with a brickwork state (Fig 8.4)

#### Flow Construction-Determinism

Measurement outcomes of qubits is not certain, hence it renders MBQC a non-deterministic model. This can still be rectified by invoking Pauli corrections based on the previous outcomes, as evident from above. For example, to implement Hadamard gate on input state ${\displaystyle |\psi \rangle =a|0\rangle +b|1\rangle }$, we consider the case of a two qubit graph state ${\displaystyle {\mathcal {C}}_{2{\text{x}}1}}$.

${\displaystyle {\mathcal {C}}_{2{\text{x}}1}=CZ_{ij}|\psi _{i}\rangle |+_{i}\rangle =a|00\rangle +a|01\rangle +b|10\rangle -b|11\rangle }$

If one measures qubit i in ${\displaystyle \{|+\rangle ,|-\rangle \}}$ basis and gets outcome s, qubit j reduces to,

${\displaystyle =(a+b)|0\rangle +(a-b)|1\rangle ,{\text{if s=0}}}$
${\displaystyle =(a-b)|0\rangle +(a+b)|1\rangle ,{\text{if s=1}}}$

As, the two possible output states are different, it shows this method is non-deterministic. One could end up with any of the two states and there is no certainty. Nevertheless, we observe that if X gate is operated on the second qubit after measurement if outcome is 1, both the equations would be same and hence, obtained state is ${\displaystyle H|\psi \rangle }$.
Flow construction is the semanticism to construct the measurement pattern for a given graph state. It gives the Pauli corrections for a particular qubit in the graph state, called X and Z dependencies. In simpler words, it records the effect of shifting all Pauli X and Z corrections to the left of (after performing) Entanglement and Entanglement operations, respectively, for each qubit. The result is recorded as sets of X, Z corrections required for each site. These sets depend on the graph state and not the computation or measurement results. Hence, it can be computed while choosing the graph state for a required computation. Following we illustrate how to construct such models with ease using Measurement Calculus to invoke determinism in One-Way Quantum Computation(MBQC).
Choose a unitary gate for the circuit and hence, its measurement pattern. In order to implement this pattern on a graph state, there are four basic steps: Preparation, Entanglement, Measurement, Corrections.

• Preparation prepares all input qubits in the required state, generally represented as ${\displaystyle |+_{\theta }={\frac {1}{\sqrt {2}}}(|0\rangle +e^{i\theta }|1\rangle )}$ where ${\displaystyle \theta \epsilon [0,2\pi ]}$.
• Entanglement entangles all the qubits according to the required graph state. This operation is denoted by ${\displaystyle E_{ij}}$, where C-Z is operated with i as control qubit and j as target qubit.
• Measurement assigns measurement angle in X-Y plane for each qubit. Measurement operator is notated as ${\displaystyle M_{i}^{\alpha }}$: the qubit ’i’ would be measured in ${\displaystyle \{|+_{\alpha }\rangle ,|-_{\alpha }\rangle \}}$ basis i.e. if the state is ${\displaystyle {\frac {1}{\sqrt {2}}}(|0\rangle +e^{i\alpha }|1\rangle )}$ one gets outcome 0 and if the state is ${\displaystyle {\frac {1}{\sqrt {2}}}(|0\rangle -e^{i\alpha }|1\rangle )}$, the outcome is 1.
• Correction calculates all Pauli corrections to be applied on a given qubit in the pattern. The set of such parameters are called Dependencies for X and Z operators individually. To calculate all the Pauli Corrections on a given qubit, one needs to take into account the measurement outcomes of previous qubits as well as commutation relations. Both affect the Pauli corrections for a given qubit. Below is a formalism to explain the process with an example.

The effect of X gate on a measurement angle (${\displaystyle \alpha }$) in X-Y plane is to change its sign and Z gate is to add a phase ${\displaystyle \pi }$.

${\displaystyle ^{t}[M_{i}^{\alpha }]^{s}=M_{i}^{\alpha }Z^{t}X^{s}=M_{i}^{(-1)^{s}\alpha +t\pi }}$

We shall denote measurement in X-basis (${\displaystyle M_{i}^{0}}$) as ${\displaystyle M_{i}^{x}}$ and Y-basis (${\displaystyle M_{i}^{\frac {\pi }{2}}}$) as ${\displaystyle M_{i}^{y}}$

Commutation relations:

${\displaystyle E_{ij}X_{i}^{s}=X_{i}^{s}Z_{i}^{s}E_{ij}\quad \quad (EX)}$
${\displaystyle E_{ij}X_{j}^{s}=X_{j}^{s}Z_{j}^{s}E_{ij}\quad \quad (EX)}$
${\displaystyle E_{ij}Z_{i}^{t}=Z_{i}^{t}E_{ij}\quad \quad (EZ)}$
${\displaystyle E_{ij}Z_{j}^{t}=Z_{j}^{t}E_{ij}\quad \quad (EZ)}$
${\displaystyle ^{t}[M_{i}^{\alpha }]^{s}X_{i}^{r}=^{t}[M_{i}^{\alpha }]^{s+r}\quad \quad (MX)}$
${\displaystyle M_{i}^{x}X_{i}^{s}=M_{i}^{x}\quad \quad (MX)}$

${\displaystyle ^{t}[M_{i}^{\alpha }]^{s}Z_{i}^{r}=^{t+r}[M_{i}^{\alpha }]^{s}\quad \quad (MZ)}$

The last second equation is implied from the fact that for ${\displaystyle M_{i}^{x}}$, ${\displaystyle x=0=-0}$. Thus, X gate has no effect on measurement in X-basis for the given states. Using above notations we express the equation for circuit model of C-NOT from Figure 6 with two inputs and two outputs: Qubits: 1,2,3,4
Outcomes: ${\displaystyle s_{1},s_{2},s_{3},s_{4}}$
Circuit Operation: ${\displaystyle X_{4}^{s_{3}}M_{3}^{x}E_{34}E_{13}X_{3}^{s_{2}}M_{2}^{x}E_{23}}$

${\displaystyle X_{4}^{s_{3}}M_{3}^{x}E_{34}\mathbf {E_{13}X_{3}^{s_{2}}} M_{2}^{x}E_{23}{\overset {\text{EX}}{\implies }}}$
${\displaystyle X_{4}^{s_{3}}Z_{1}^{s_{2}}M_{3}^{x}\mathbf {E_{34}X_{3}^{s_{2}}} M_{2}^{x}E_{13}E_{23}{\overset {\text{EX}}{\implies }}}$
${\displaystyle X_{4}^{s_{3}}Z_{4}^{s_{2}}Z_{1}^{s_{2}}\mathbf {M_{3}^{x}X_{3}^{s_{2}}} M_{2}^{x}E_{13}E_{23}E_{34}{\overset {\text{MX}}{\implies }}}$

${\displaystyle X_{4}^{s_{3}}Z_{4}^{s_{2}}Z_{1}^{s_{2}}M_{3}^{x}M_{2}^{x}E_{13}E_{234}}$

Hence, we obtain a measurement pattern to implement C-NOT gate with a T-shaped graph state with three qubits entangled chain ${\displaystyle \{2,3,4\}}$ and 1 entangled to 3. X dependency sets for qubit ${\displaystyle 1:\{s_{3}\}}$, ${\displaystyle 2:\phi }$, ${\displaystyle 3:\phi }$, ${\displaystyle 4:\phi }$. Z dependency sets for qubit ${\displaystyle 1:\{s_{2}\}}$, ${\displaystyle 2:\phi }$, ${\displaystyle 3:\phi }$, ${\displaystyle 4:\{s_{2}\}}$. The measurements are independent of any outcome so they can all be performed in parallel. In the end, Pauli corrections are performed as such. Parity (modulo 2 sum) of all the previous outcomes in the dependency set is calculated for each qubit (i), for X (${\displaystyle s_{i}^{X}=s_{1}\oplus s_{2}\oplus ...}$) and Z (${\displaystyle s_{i}^{Z}=s_{1}\oplus s_{2}\oplus ...}$), separately. Thus, ${\displaystyle X^{s_{i}^{X}}Z^{s_{i}^{Z}}}$ is operated on qubit i.

### Quantum SWAP test

Error creating thumbnail: Error code: -1
Figure 9: Gate Teleporation for Multiple Single Qubit Gates

Quantum SWAP test (1) helps to compare two quantum states ${\displaystyle |\psi \rangle }$ and ${\displaystyle |\psi '\rangle }$. An ancilla qubit is prepared here in the state ${\displaystyle {\frac {|0\rangle +|1\rangle }{2}}}$ and a controlled swap test is performed on two states ${\displaystyle |\psi \rangle }$ and ${\displaystyle |\psi '\rangle }$.

If ${\displaystyle |\psi \rangle }$ = ${\displaystyle |\psi '\rangle }$, then the ancilla qubit, after performing a Hadamard operation, yields ${\displaystyle |0\rangle }$ when measurement is applied in computational basis. The SWAP test passes here.

If ${\displaystyle |\psi \langle |\psi '\rangle \leq \delta }$, then the ancilla qubit, after performing a Hadamard Gate and upon measurement, passes the test with probability ${\displaystyle {\frac {1+\delta ^{2}}{2}}}$ and fails the test with probability ${\displaystyle {\frac {1-\delta ^{2}}{2}}}$. Hence, the SWAP test always passes for the same inputs and sometimes fails if they are different. By repeating the SWAP test, its efficiency can be amplified.

### Quantum Capable Homomorphic Encryption

• Homomorphic Encryption
A homomorphic encryption scheme HE is a scheme to carry out classical computation from the Server while hiding the inputs, outputs and computation. It can be divided into following four stages.
• Key Generation. The algorithm (pk,evk,sk) ← HE.Keygen(1λ) takes a λ, a security parameter as input and outputs a public key encryption key pk, a public evaluation key evk and a secret decryption key sk.
• Encryption. The algorithm c ← HE.Encpk(µ) takes the public key pk and a single bit message µ ∈ {0,1} and outputs a ciphertext c. The notation HE.Encpk(µ;r) is be used to represent the encryption of a bit µ using randomness r.
• Decryption. The algorithm µ∗ ← HE.Decsk(c) takes the secret key sk and a ciphertext c and outputs a message µ∗ ∈ {0,1}.
• Homomorphic Evaluation The algorithm cf ← HE.Evalevk(f,c1,...,cl) takes the evaluation key evk, a function f : {0,1}l → {0,1} and a set of l ciphertexts c1,...,cl, and outputs a ciphertext cf. It must be the case that:

HE.Decsk(cf) = f(HE.Decsk(c1),...,HE.Decsk(cl)) (1) with all but negligible probability in λ. This means classical HE decrypts ciphertext bit by bit. HE scheme is compact if HE.Eval is independent of any inputs or computation. It is fully homomorphic if it can compute any boolean computation.

• Quantum Capable: A classical HE scheme is quantum capable if it can be used to evaluate quantum circuits. Any HE scheme to be quantum capable requires the following two properties.
• invariance of ciphertext:
• natural XOR operation: