**2.3 Quantum circuits**

∣0i � ∣00i ¼ ∣0i ⊗ ∣0i ¼

∣1i � ∣01i ¼ ∣0i ⊗ ∣1i ¼

∣2i � ∣10i ¼ ∣1i ⊗ ∣0i ¼

∣3i � ∣11i ¼ ∣1i ⊗ ∣1i ¼

can, for the sake of brevity, be labeled in base 10 as

lently be expressed in base 2 as

example, be <sup>∣</sup>*q*i � <sup>∣</sup>*qn*�<sup>1</sup>*qn*�<sup>2</sup>⋯*q*1*q*0i.

binary expansion

**16**

1 0

*Real Perspective of Fourier Transforms and Current Developments in Superconductivity*

1 0

!

0 1

0 1

To generalize this example for *n* qubits, the set of computational basis vectors

On the other hand, in order to highlight the qubit values, this basis can equiva-

where *ki* ∈f g 0, 1 for *i* ¼ 1, ⋯, *n*. In other words, f g *k*1, *k*2, ⋯, *kn* represents the

for the *<sup>k</sup>th* basis vector <sup>∣</sup>*k*i � <sup>∣</sup>*k*1*k*2⋯*kn*i. We have chosen this bit index ordering as it will prove convenient for the QFT formulation in the next section. An equally acceptable (and, quite typical) bit index convention for an *n* qubit system could, for

Eq. (15) tells us that the *n* qubit basis is derived from the tensor product of single qubits. This is important to keep in mind in order to avoid confusion when using the symbol ∣0i. For example, when using *n* ¼ 1 qubit, ∣0i in decimal is equivalent to ∣0i in binary; however,, when using *n* ¼ 3 qubits, ∣0i in decimal is equivalent to ∣000i in binary. Hence, the number of qubits *n* is the anchor for the relationship between Eq. (14) and Eq. (15). Assuming *n* qubits, there are 2*<sup>n</sup>* basis vectors that can be used to construct a quantum state. Hence, all 2*<sup>n</sup>* basis vectors will simultaneously evolve with their associated probabilities; again, this is the source of quantum parallelism.

*<sup>k</sup>* <sup>¼</sup> *<sup>k</sup>*12*<sup>n</sup>*�<sup>1</sup> <sup>þ</sup> *<sup>k</sup>*22*<sup>n</sup>*�<sup>2</sup> <sup>þ</sup> <sup>⋯</sup> <sup>þ</sup> *kn*�12<sup>1</sup> <sup>þ</sup> *kn*2<sup>0</sup> <sup>¼</sup> <sup>X</sup>*<sup>n</sup>*

!

!

!

⊗ 1 0

⊗

⊗

⊗

!

0 1

1 0

0 1

!

!

!

¼

¼

¼

¼

<sup>j</sup>0i, <sup>j</sup>1i, <sup>j</sup>2i, <sup>⋯</sup>, <sup>j</sup>2*<sup>n</sup>* f g � <sup>1</sup><sup>i</sup> *:* (14)

∣*k*1*k*2⋯*kn*i ¼ ∣*k*1i ⊗ ∣*k*2i ⊗ ∣⋯ ⊗ ∣*kn*i (15)

*t*¼1

*kt*2*<sup>n</sup>*�*<sup>t</sup>* (16)

1

CCCCCA

0

BBBBB@

1

CCCCCA

1

(13)

CCCCCA

0

BBBBB@

0

BBBBB@

1

CCCCCA

0

BBBBB@

One particularly useful application of Eq. (12) arises when building up *n* qubit quantum circuits (i.e. schematic depictions of quantum operations on qubits). For instance, assume a two qubit system ∣*q*1*q*0i where two unitary operators *H* and *Z* act on single qubits as

$$H|q\_1\rangle, Z|q\_0\rangle \tag{17}$$

and the result is desired to be combined as

$$H|q\_1\rangle \otimes Z|q\_0\rangle. \tag{18}$$

Eq. (12) tells us that this action is equivalent to

$$(H \otimes Z) \big( |q\_1\rangle \otimes |q\_0\rangle \big). \tag{19}$$

However, by construction, ∣*q*1i ⊗ ∣*q*0i ¼ ∣*q*1*q*0i. Therefore,

$$(H|q\_1\rangle \otimes Z|q\_0\rangle = (H \otimes Z)|q\_1q\_0\rangle \tag{20}$$

making it straightforward to develop multiple qubit quantum systems from unitary operators. The schematic representation of ð Þ *H* ⊗ *Z* ∣*q*1*q*0i is show in **Figure 1**.

With the groundwork laid for multiple qubits, it becomes possible to introduce more unitary operators that facilitate reversible computation. For example, the controlled NOT (CNOT) function can be phrased as a two qubit reversible XOR operator

$$\text{CNOT} = \begin{bmatrix} \mathbf{1} & \mathbf{0} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{1} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \mathbf{1} \\ \mathbf{0} & \mathbf{0} & \mathbf{1} & \mathbf{0} \end{bmatrix}. \tag{21}$$

where *c* represents the control bit, *t* represents the target XOR function and ∣*q*1*q*0i ¼ ∣*ct*i. This operator is a permutation matrix that is consistent with **Table 1** in that it swaps the ∣11i and ∣10i qubits. The XOR operation, by itself, can act as an irreversible controlled NOT operation. For the sake of quantum computation, the CNOT operator is unitary and a reversible XOR function is achieved because the control bit ∣*q*1i is preserved from input to output.

There exist powerful tools for the simulation of quantum operations (referred to as '*quantum gates*') and for the rendering of multiple qubit quantum circuits [11].

**Figure 1.** *Two qubit quantum circuit for H*ð Þ ⊗ *Z* ∣*q*1*q*0i*.*

### *Real Perspective of Fourier Transforms and Current Developments in Superconductivity*


**Table 1.** *Controlled NOT.*

**Figure 2** shows a schematic representation of the CNOT circuit corresponding to **Table 1**. In this circuit, the control bit is used to swap the target ∣*q*0i (using an *X* gate) if ∣*q*1i ¼ ∣1i.

For the sake of this work, we point out that an equally valid interpretation of the quantum CNOT function can be realized if the roles of the control and target are interchanged where ∣*q*1*q*0i ¼ ∣*tc*i (see **Table 2**). In this case the CNOT operator becomes

$$\mathbf{CNOT} = \begin{bmatrix} \mathbf{1} & \mathbf{0} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \mathbf{0} & \mathbf{1} \\ \mathbf{0} & \mathbf{0} & \mathbf{1} & \mathbf{0} \\ \mathbf{0} & \mathbf{1} & \mathbf{0} & \mathbf{0} \end{bmatrix}. \tag{22}$$

**3. The quantum Fourier transform**

*Two qubit CNOT quantum circuit swap of* ∣11i *and* ∣01i*.*

*Quantum Fourier Operators and Their Application DOI: http://dx.doi.org/10.5772/intechopen.94902*

**Figure 3.**

The QFT matrix is defined as

or, for n = 2,

**19**

It should be clear that the DFT matrix in Eq. (2) is unitary where

attempts to improve the computational complexity [4, 7, 9, 15, 16].

*<sup>Q</sup>* <sup>¼</sup> <sup>1</sup> ffiffiffiffi *N* <sup>p</sup> <sup>X</sup> *N*�1

*<sup>Q</sup>* <sup>¼</sup> <sup>1</sup> 2

*<sup>Q</sup>*† <sup>¼</sup> <sup>1</sup>

ffiffiffiffi *N* <sup>p</sup> <sup>X</sup> *N*�1

*j*¼0

As expected, this operator is unitary where, with

*j*¼0

For example, with *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>* and n = 1, we recover the Hadamard matrix

*<sup>Q</sup>* <sup>¼</sup> <sup>1</sup> ffiffi 2 p

X *N*�1

*k*¼0 *e i* 2*π*

11 1 1

1 *i* �1 �*i*

11 1 �1

1 �*i* �1 *i*

X *N*�1

*k*¼0 *e* �*i* 2*π*

*F*†

and *F*† is the Hermitian conjugate of *F*. Because of this unitarity, the potential for using the DFT within the context of quantum computation naturally follows. However, such an application requires a decomposition involving tensor products of unitary operations typically applied in quantum computation. As with the FFT, the choice of the decomposition dictates the algorithmic complexity. There is much introductory literature available regarding the QFT [3, 12–14]. Given a specific quantum algorithm where the QFT is applied, current research endeavors reside in

*F* ¼ *I* (23)

*<sup>N</sup>jk*∣*k*ih*j*∣*:* (24)

*:* (26)

*<sup>N</sup>jk*∣*j*ih*k*∣, (27)

� �, (25)

which is a permutation matrix that swaps the ∣11i and ∣01i qubits and corresponds to the circuit in **Figure 3**.

We shall have more to say about this implementation in the following sections. For now, with this brief overview of quantum computation, we can now introduce the quantum Fourier transform.

### **Figure 2.**

*Two qubit CNOT quantum circuit swap of* ∣11i *and* ∣10i *using Qiskit [11].*


**Table 2.** *Controlled NOT where* ∣*q*1*q*0i ¼ ∣*tc*i*.* *Quantum Fourier Operators and Their Application DOI: http://dx.doi.org/10.5772/intechopen.94902*

**Figure 3.** *Two qubit CNOT quantum circuit swap of* ∣11i *and* ∣01i*.*

### **3. The quantum Fourier transform**

**Figure 2** shows a schematic representation of the CNOT circuit corresponding to **Table 1**. In this circuit, the control bit is used to swap the target ∣*q*0i (using an *X*

*c*in *t*in *c*out *t*out 000 0 010 1 101 1 1110

*Real Perspective of Fourier Transforms and Current Developments in Superconductivity*

which is a permutation matrix that swaps the ∣11i and ∣01i qubits and

We shall have more to say about this implementation in the following sections. For now, with this brief overview of quantum computation, we can now introduce

*t*in *c*in *t*out *c*out 0 00 0 0 11 1 1 01 0 1 10 1

*CNOT* ¼

*Two qubit CNOT quantum circuit swap of* ∣11i *and* ∣10i *using Qiskit [11].*

corresponds to the circuit in **Figure 3**.

the quantum Fourier transform.

For the sake of this work, we point out that an equally valid interpretation of the quantum CNOT function can be realized if the roles of the control and target are interchanged where ∣*q*1*q*0i ¼ ∣*tc*i (see **Table 2**). In this case the CNOT operator

*:* (22)

gate) if ∣*q*1i ¼ ∣1i.

becomes

**Figure 2.**

**Table 2.**

**18**

*Controlled NOT where* ∣*q*1*q*0i ¼ ∣*tc*i*.*

**Table 1.** *Controlled NOT.*

It should be clear that the DFT matrix in Eq. (2) is unitary where

$$F^\dagger F = I \tag{23}$$

and *F*† is the Hermitian conjugate of *F*. Because of this unitarity, the potential for using the DFT within the context of quantum computation naturally follows. However, such an application requires a decomposition involving tensor products of unitary operations typically applied in quantum computation. As with the FFT, the choice of the decomposition dictates the algorithmic complexity. There is much introductory literature available regarding the QFT [3, 12–14]. Given a specific quantum algorithm where the QFT is applied, current research endeavors reside in attempts to improve the computational complexity [4, 7, 9, 15, 16].

The QFT matrix is defined as

$$Q = \frac{1}{\sqrt{N}} \sum\_{j=0}^{N-1} \sum\_{k=0}^{N-1} e^{j\frac{2\pi jk}{N}} |k\rangle\langle j|. \tag{24}$$

For example, with *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>* and n = 1, we recover the Hadamard matrix

$$Q = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ 1 & -1 \end{bmatrix},\tag{25}$$

or, for n = 2,

$$\mathbf{Q} = \frac{\mathbf{1}}{2} \begin{bmatrix} \mathbf{1} & \mathbf{1} & \mathbf{1} & \mathbf{1} \\\\ \mathbf{1} & i & -\mathbf{1} & -i \\\\ \mathbf{1} & \mathbf{1} & \mathbf{1} & -\mathbf{1} \\\\ \mathbf{1} & -i & -\mathbf{1} & i \end{bmatrix}.\tag{26}$$

As expected, this operator is unitary where, with

$$\boldsymbol{Q}^{\dagger} = \frac{1}{\sqrt{N}} \sum\_{j=0}^{N-1} \sum\_{k=0}^{N-1} e^{-i\frac{2\pi jk}{N}} |j\rangle\langle k|,\tag{27}$$

it should be clear that

$$\begin{split} \left| QQ^{\dagger} \right| &= \left( \frac{1}{\sqrt{N}} \sum\_{j=0}^{N-1} \sum\_{k=0}^{N-1} e^{i\frac{2\pi jk}{N}} |k\rangle \langle j| \right) \left( \frac{1}{\sqrt{N}} \sum\_{j'=0}^{N-1} \sum\_{k'=0}^{N-1} e^{-i\hat{\pi} j'k'} |j'\rangle \langle k'| \right) \\ &= \frac{1}{N} \sum\_{k'=0}^{N-1} \sum\_{k=0}^{N-1} \sum\_{j'=0}^{N-1} \sum\_{j=0}^{N-1} e^{i\frac{2\pi}{N}(k-j'k')} |k\rangle \langle j| \langle k'| \\ &= \frac{1}{N} \sum\_{k'=0}^{N-1} \sum\_{k=0}^{N-1} \sum\_{j'=0}^{N-1} e^{i\frac{2\pi}{N}(k-j'k')} \delta\_{j'j} |k\rangle \langle k'| \\ &= \frac{1}{N} \sum\_{k'=0}^{N-1} \sum\_{k=0}^{N-1} \sum\_{j'=0}^{N-1} e^{i\frac{2\pi}{N}(k-k')} |k\rangle \langle k'| \\ &= \frac{1}{N} \sum\_{k'=0}^{N-1} \sum\_{k=0}^{N-1} (N\delta\_{k'k}) |k\rangle \langle k'| \\ &= \sum\_{k=0}^{N-1} |k\rangle \langle k| \\ &= 1. \end{split} \tag{28}$$

In general, given a state vector

$$|\psi\rangle = \sum\_{j=0}^{N-1} a\_j |j\rangle$$

$$\langle \mathbf{29} | \psi \rangle$$

given Eqs. (15) and (16), it will be more helpful to express this relation as

∣*k*1*k*2⋯*kn*i*:*

*<sup>i</sup>*2*πj k*12�1þ*k*22�2þ⋯þ*kn*�12�ð Þ *<sup>n</sup>*�<sup>1</sup> <sup>þ</sup>*kn*2�*<sup>n</sup>* ð Þ∣*k*1*k*2⋯*kn*i*:*

*i*2*πj*2�*<sup>v</sup>*

*i* 2*πj* <sup>2</sup> j1i

> ffiffi 2 p

ffiffi 2 p

> 1 *j* <sup>2</sup>⋯ *j <sup>n</sup>*�<sup>1</sup>*: <sup>j</sup> n*

> 1*: j* <sup>2</sup>⋯ *j <sup>n</sup>*�<sup>1</sup> *<sup>j</sup> n*

> > 1 *j* <sup>2</sup>⋯ *j <sup>n</sup>*�<sup>1</sup> *<sup>j</sup> n*

1 *j* <sup>2</sup>⋯*j <sup>n</sup>*�<sup>2</sup>*: <sup>j</sup> <sup>n</sup>*�<sup>1</sup> *<sup>j</sup> n*

1 1

1 �1

!

*<sup>i</sup>*2*πj k*12�1þ*k*22�2þ⋯þ*kn*�12�ð Þ *<sup>n</sup>*�<sup>1</sup> <sup>þ</sup>*kn*2�*<sup>n</sup>* ð Þ∣*k*1<sup>i</sup> ⊗ ∣*k*2<sup>i</sup> ⊗ ∣⋯ ⊗ ∣*kn*i*:*

(32)

j1iÞ*:* (33)

� �*:* (34)

! (35)

could lead to a

1 *j* <sup>2</sup>⋯ *j*

experiences successive

*<sup>n</sup>*i. As

(36)

*QFT*f g <sup>j</sup>*j*<sup>i</sup> <sup>¼</sup> <sup>1</sup>

2*<sup>n</sup>=*<sup>2</sup>

<sup>¼</sup> <sup>1</sup> 2*<sup>n</sup>=*<sup>2</sup>

<sup>¼</sup> <sup>1</sup> 2*<sup>n</sup>=*<sup>2</sup>

<sup>¼</sup> <sup>1</sup> <sup>2</sup>*<sup>n</sup>=*<sup>2</sup> <sup>⊗</sup> *n v*¼1 X1 *kv*¼0 *e*

This leads to the result that

**3.1 QFT qubit representation**

**21**

X1 *k*1¼0

*Quantum Fourier Operators and Their Application DOI: http://dx.doi.org/10.5772/intechopen.94902*

> X1 *k*1¼0

> X1 *k*1¼0

X1 *k*2¼0

X1 *k*2¼0

X1 *k*2¼0

⋯X<sup>1</sup> *kn*¼0 *e i*2*πj* X*n t*¼1 *kt*2�*<sup>t</sup>* !

⋯X<sup>1</sup> *kn*¼0 *e*

⋯X<sup>1</sup> *kn*¼0 *e*

*<sup>i</sup>*2*πj kv*2�*<sup>v</sup>* ð Þ∣*kv*i*:*

*<sup>Q</sup>*∣*j*i ¼ <sup>1</sup>

<sup>2</sup>*<sup>n</sup>=*<sup>2</sup> <sup>⊗</sup> *n v*¼1

*<sup>Q</sup>*∣*j*i ¼ <sup>1</sup>

ffiffi 2

ffiffi 2

that the *v* ¼ 1 contribution to Eq. (10) should be a Hadamard gate.

algorithm, it will be helpful to consider the qubit representation ∣*j*i ¼ ∣ *j*

*<sup>v</sup>* <sup>¼</sup> <sup>1</sup> : *<sup>j</sup>*2�<sup>1</sup> ) *<sup>j</sup>*

⋮ *<sup>v</sup>* <sup>¼</sup> *<sup>n</sup>* � <sup>1</sup> : *<sup>j</sup>*2�ð Þ *<sup>n</sup>*�<sup>1</sup> ) *<sup>j</sup>*

*<sup>v</sup>* <sup>¼</sup> *<sup>n</sup>* : *<sup>j</sup>*2�*<sup>n</sup>* ) <sup>0</sup>*: <sup>j</sup>*

*<sup>v</sup>* <sup>¼</sup> <sup>2</sup> : *<sup>j</sup>*2�<sup>2</sup> ) *<sup>j</sup>*

(where *v*≥2), the keen eye will recognize that the terms *ei*2*πj*2�*<sup>v</sup>*

the index *v* ranges from 1 to *n*, the index *j* in the term *ei*2*πj*2�*<sup>v</sup>*

Then, for each qubit state ∣*j*i ¼ ∣0i, ∣1i, it follows that

*<sup>Q</sup>*∣0i ¼ <sup>1</sup>

*<sup>Q</sup>*∣1i ¼ <sup>1</sup>

ffiffi 2 p j0i þ *e*

ðj0i þ *e*

To forge a path toward efficient implementation, it is important to recognize how Eq. (33) can be decomposed into a set of operators relevant to quantum computation (see Section 2.1). First, consider the *n* ¼ 1 single qubit case,

<sup>p</sup> ð Þ¼ <sup>j</sup>0iþj1<sup>i</sup> <sup>1</sup>

<sup>p</sup> ð Þ¼ <sup>j</sup>0i�j1<sup>i</sup> <sup>1</sup>

To handle the phase factors in the other contributions to the tensor product

unitary quantum mechanical operator. Before leveraging this observation in a QFT

divisions by 2 (i.e. successive right shifts of its binary representation by one bit):

as expected since *Q* ¼ *H* for the single qubit case. Hence, it should be nn surprise

the QFT operates on ∣*ψ*i to form

$$\begin{aligned} \vert \Psi \rangle &= QFT \{ \vert \nu \rangle \} = QFT \left\{ \sum\_{j=0}^{N-1} a\_j \vert j \rangle \right\} \\ &= \sum\_{j=0}^{N-1} a\_j QFT \{ \vert j \rangle \} \\ &= \sum\_{j=0}^{N-1} a\_j Q \vert j \rangle. \end{aligned} \tag{30}$$

Given this result, let us consider the QFT of a single *n* qubit basis vector ∣*j*i where *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>*. First, observe that while

$$QFT\{|\dot{j}\rangle\} = Q|\dot{j}\rangle = \frac{1}{2^{n/2}} \sum\_{j'=0}^{N-1} \sum\_{k=0}^{N-1} e^{i\tilde{\mathfrak{P}}^{jk}} |k\rangle \langle \dot{j}'|\dot{j}\rangle$$

$$= \frac{1}{2^{n/2}} \sum\_{j'=0}^{N-1} \sum\_{k=0}^{N-1} e^{i\tilde{\mathfrak{P}}^{jk}} |k\rangle \delta\_{\tilde{j}j} \tag{31}$$

$$= \frac{1}{2^{n/2}} \sum\_{k=0}^{2^n - 1} e^{i\frac{2\tilde{\mathfrak{P}}^{jk}}{2^{n/2}}} |k\rangle,$$

it should be clear that

*QQ*† <sup>¼</sup> <sup>1</sup>

¼ 1 *N* X *N*�1

¼ 1 *N* X *N*�1

¼ 1 *N* X *N*�1

¼ 1 *N* X *N*�1

<sup>¼</sup> <sup>X</sup> *N*�1

¼ *I:*

*k*¼0

In general, given a state vector

the QFT operates on ∣*ψ*i to form

*<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>*. First, observe that while

**20**

ffiffiffiffi *N* <sup>p</sup> <sup>X</sup> *N*�1

*k*0 ¼0

*k*0 ¼0

*k*0 ¼0

> *k*0 ¼0

*j*¼0

X *N*�1

*k*¼0

X *N*�1

*k*¼0

X *N*�1

*k*¼0

X *N*�1

*k*¼0

∣*k*ih*k*∣

X *N*�1

! 1

X *N*�1

*j*¼0 *e i* 2*π <sup>N</sup> jk*� *j* 0 *<sup>k</sup>*<sup>0</sup> ð Þ∣*k*<sup>i</sup> *<sup>j</sup>*<sup>j</sup> *<sup>j</sup>*

X *N*�1

*j*¼0 *e i* 2*π <sup>N</sup> jk*� *j* 0 *<sup>k</sup>*<sup>0</sup> ð Þ*δ <sup>j</sup>*

*<sup>N</sup>j k*�*k*<sup>0</sup> ð Þ∣*k*ih*k*<sup>0</sup>

*Real Perspective of Fourier Transforms and Current Developments in Superconductivity*

∣

<sup>∣</sup>*ψ*i ¼ <sup>X</sup> *N*�1

<sup>∣</sup>Ψi ¼ *QFT*f g <sup>j</sup>*ψ*<sup>i</sup> <sup>¼</sup> *QFT* <sup>X</sup>

*a jQFT*f g j *j*i

Given this result, let us consider the QFT of a single *n* qubit basis vector ∣*j*i where

2*<sup>n</sup>=*<sup>2</sup>

<sup>¼</sup> <sup>1</sup> 2*<sup>n</sup>=*<sup>2</sup>

<sup>¼</sup> <sup>1</sup> 2*<sup>n</sup>=*<sup>2</sup> X *N*�1

X *N*�1

X *N*�1

*k*¼0 *e i* 2*π Nj* 0 *k* ∣*k*i *j* <sup>0</sup> h ij*j*

X *N*�1

*k*¼0 *e i* 2*π Nj* 0 *k* ∣*k*i*δ<sup>j</sup>* 0 *j*

*j* 0 ¼0

*j* 0 ¼0

2 X*n*�1

*k*¼0 *e i* 2*π* <sup>2</sup>*njk*∣*k*i,

*a jQ*∣*j*i*:*

<sup>¼</sup> <sup>X</sup> *N*�1

<sup>¼</sup> <sup>X</sup> *N*�1

*j*¼0

*j*¼0

*QFT*f g <sup>j</sup>*j*<sup>i</sup> <sup>¼</sup> *<sup>Q</sup>*∣*j*i ¼ <sup>1</sup>

*j*¼0

*N*�1

*j*¼0

*a <sup>j</sup>*j *j*i ( )

*a <sup>j</sup>*∣*j*i (29)

ffiffiffiffi *N* <sup>p</sup> <sup>X</sup> *N*�1

*j* 0 ¼0

0 *j*∣*k*ih*k*<sup>0</sup> ∣

∣

X *N*�1

!

(28)

(30)

(31)

*k*0 ¼0 *e* �*i* 2*π N j* 0 *k*0 ∣ *j* 0 ih*k*<sup>0</sup> ∣

<sup>0</sup> h ih*k*<sup>0</sup> ∣

*k*¼0 *e i* 2*π <sup>N</sup>jk*j*k*ih*j*<sup>j</sup>

X *N*�1

X *N*�1

> *j* 0 ¼0

X *N*�1

*j*¼0 *e i* 2*π*

*Nδk*<sup>0</sup> *<sup>k</sup>* ð Þ∣*k*ih*k*<sup>0</sup>

*j* 0 ¼0 given Eqs. (15) and (16), it will be more helpful to express this relation as

$$\begin{split}QFT\{|j\rangle\} &= \frac{1}{2^{n/2}} \sum\_{k\_1=0}^{1} \sum\_{k\_2=0}^{1} \cdots \sum\_{k\_n=0}^{1} e^{j2\pi \left(\sum\_{t=1}^{n} k\_t 2^{-t}\right)} |k\_1 k\_2 \cdots k\_n\rangle. \\ &= \frac{1}{2^{n/2}} \sum\_{k\_1=0}^{1} \sum\_{k\_2=0}^{1} \cdots \sum\_{k\_n=0}^{1} e^{j2\pi (k\_1 2^{-1} + k\_2 2^{-2} + \cdots + k\_{n-1} 2^{-(n-1)} + k\_2 2^{-n})} |k\_1 k\_2 \cdots k\_n\rangle. \\ &= \frac{1}{2^{n/2}} \sum\_{k\_1=0}^{1} \sum\_{k\_2=0}^{1} \cdots \sum\_{k\_n=0}^{1} e^{j2\pi (k\_1 2^{-1} + k\_2 2^{-2} + \cdots + k\_{n-1} 2^{-(n-1)} + k\_n 2^{-n})} |k\_1\rangle \otimes |k\_2\rangle \otimes |\cdots \otimes |k\_n\rangle. \\ &= \frac{1}{2^{n/2}} \sum\_{v=1}^{n} \sum\_{k\_v=0}^{1} e^{j2\pi (k\_2 2^{-v})} |k\_v\rangle. \end{split}$$

This leads to the result that

$$|Q|j\rangle = \frac{1}{2^{n/2}} \underset{v=1}{\overset{n}{\otimes}} (|0\rangle + e^{i2\pi j2^{-v}}|1\rangle). \tag{33}$$

### **3.1 QFT qubit representation**

To forge a path toward efficient implementation, it is important to recognize how Eq. (33) can be decomposed into a set of operators relevant to quantum computation (see Section 2.1). First, consider the *n* ¼ 1 single qubit case,

$$|Q|\dot{\jmath}\rangle = \frac{1}{\sqrt{2}}\left(|0\rangle + e^{i\frac{2\dot{q}}{\overline{\tau}}}|1\rangle\right). \tag{34}$$

Then, for each qubit state ∣*j*i ¼ ∣0i, ∣1i, it follows that

$$\begin{aligned} \mathbf{Q}|\mathbf{0}\rangle &= \frac{\mathbf{1}}{\sqrt{2}}(|\mathbf{0}\rangle + |\mathbf{1}\rangle) = \frac{\mathbf{1}}{\sqrt{2}} \begin{pmatrix} \mathbf{1} \\ \mathbf{1} \end{pmatrix} \\ \mathbf{Q}|\mathbf{1}\rangle &= \frac{\mathbf{1}}{\sqrt{2}}(|\mathbf{0}\rangle - |\mathbf{1}\rangle) = \frac{\mathbf{1}}{\sqrt{2}} \begin{pmatrix} \mathbf{1} \\ -\mathbf{1} \end{pmatrix} \end{aligned} \tag{35}$$

as expected since *Q* ¼ *H* for the single qubit case. Hence, it should be nn surprise that the *v* ¼ 1 contribution to Eq. (10) should be a Hadamard gate.

To handle the phase factors in the other contributions to the tensor product (where *v*≥2), the keen eye will recognize that the terms *ei*2*πj*2�*<sup>v</sup>* could lead to a unitary quantum mechanical operator. Before leveraging this observation in a QFT algorithm, it will be helpful to consider the qubit representation ∣*j*i ¼ ∣ *j* 1 *j* <sup>2</sup>⋯ *j <sup>n</sup>*i. As the index *v* ranges from 1 to *n*, the index *j* in the term *ei*2*πj*2�*<sup>v</sup>* experiences successive divisions by 2 (i.e. successive right shifts of its binary representation by one bit):

$$\begin{array}{ccccc} v = 1: & j2^{-1} & \Rightarrow & j\_1 j\_2 \cdots j\_{n-1} j\_n \\ v = 2: & j2^{-2} & \Rightarrow & j\_1 j\_2 \cdots j\_{n-2} j\_{n-1} j\_n \\ & & \vdots & & & \\ v = n - 1: & j2^{-(n-1)} & \Rightarrow & j\_1 j\_2 \cdots j\_{n-1} j\_n \\ v = n: & j2^{-n} & \Rightarrow & 0. j\_1 j\_2 \cdots j\_{n-1} j\_n \\ \end{array} \tag{36}$$

Since these values appear in the phase factor, the integer parts will only result in integer multiples of 2*π* and can therefore be discarded. Eq. (33) can then be expressed as

Hence, the control bit determines when to introduce the phase factor involving

The goal of this section is to introduce enough nomenclature in order to put the next section of this work in context. The reader is encouraged to visit the provided references in order to fill in the details of a generalized quantum circuit that can implement an *n* qubit QFT. For now, we provide an *n* ¼ 2 qubit example to illustrate an algorithm for performing the QFT. Whatever principled series of operations is chosen, the goal of the quantum algorithm (and, hence, the associated

> <sup>1</sup>i ⊗ ∣ *j* 2i

<sup>1</sup> controlled by *j*

*i*2*π j* 12�<sup>1</sup> j1i � � ⊗ ∣ *<sup>j</sup>*

*i*2*π j*

*i*2*π j* <sup>2</sup>2�2<sup>þ</sup> *<sup>j</sup>* <sup>1</sup>2�<sup>1</sup> ð Þj1<sup>i</sup> � � <sup>⊗</sup>

1 *j* 2i,

(43)

<sup>2</sup>i (44)

*i*2*π j* 22�<sup>1</sup> j1i

(45)

� �

2i

1 ffiffi 2 p j0i þ *e*

<sup>2</sup>. This yields

<sup>2</sup>2�2<sup>þ</sup> *<sup>j</sup>* <sup>1</sup>2�<sup>1</sup> ð Þj1<sup>i</sup> � � ⊗ ∣ *<sup>j</sup>*

> *i*2*πj* <sup>21</sup> j1i � �

quantum circuit) is to reproduce Eq. (11). Starting with ∣*j*i ¼ ∣ *j*

<sup>2</sup>i ! *H*∣ *j*

¼ 1 ffiffi 2 p j0i þ *e*

<sup>2</sup>i ! <sup>1</sup> ffiffi 2 p j0i þ *e*

<sup>2</sup>i ! <sup>1</sup> ffiffi 2 p j0i þ *e*

<sup>2</sup> <sup>j</sup>0i þ *<sup>e</sup>*

*i*2*πj* <sup>22</sup> j1i � � <sup>⊗</sup> <sup>j</sup>0i þ *<sup>e</sup>*

Comparing this result with either Eq. (33) or Eq. (37), it is clear that this algorithm, derived using quantum reversible operators, recovers the QFT from Eq. (38) with one slight difference: the bit ordering is reversed. Given *n* qubits, it is possible to apply *n=*2 swaps using, for example, tensor products involving an *X* operator (see Section 2.1) in order to reverse the bit order. Such bit reversal permutations are reminiscent of the radix-2 FFT algorithm. If one generalizes this algorithm to *<sup>n</sup>* qubits, it can be shown that the algorithmic complexity is <sup>O</sup> *<sup>n</sup>*<sup>2</sup> ð Þ. With *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>*, this is a considerable improvement over *<sup>N</sup>* log *<sup>N</sup>* <sup>¼</sup> *<sup>n</sup>*2*<sup>n</sup>* for the radix-2 FFT. However, algorithmic improvements and variations have been developed that

Universal computation, by its very nature, must involve some set of permutation operators [17–20]. As with other universal gates applied in quantum computation, in this section, we show that the QFT can generate operators that have the properties of a permutation. Consider a successive application of the QFT such as *<sup>Q</sup>*<sup>2</sup> <sup>¼</sup> *QQ* and let us analyze the matrix elements

¼ 1

can further reduce QFT complexity to Oð Þ *n* log *n* [9, 15].

<sup>1</sup>i so that

*Quantum Fourier Operators and Their Application DOI: http://dx.doi.org/10.5772/intechopen.94902*

> ∣ *j* <sup>1</sup>i ⊗ ∣ *j*

b. Apply *CR*<sup>2</sup> to target qubit *j*

*i*2*π j* 12�<sup>1</sup> j1i � � ⊗ ∣ *<sup>j</sup>*

2i

the target bit.

a. Apply *H* to ∣ *j*

1 ffiffi 2 p j0i þ *e*

1 ffiffi 2 p j0i þ *e*

c. Apply *H* to ∣ *j*

*i*2*π j* <sup>2</sup>2�2<sup>þ</sup> *<sup>j</sup>* <sup>1</sup>2�<sup>1</sup> ð Þj1<sup>i</sup> � � ⊗ ∣ *<sup>j</sup>*

**4. QFT permutations**

of such an operation:

**23**

$$\begin{split}QFT\{|j\rangle\} &= \frac{1}{2^{n/2}} [\left(|\mathbf{0}\rangle + \epsilon^{j2\pi j\_n 2^{-1}} |\mathbf{1}\rangle\right) \otimes \left(|\mathbf{0}\rangle + \epsilon^{j2\pi \left(\begin{array}{c} j\_{n-1} 2^{-1} + j\_n 2^{-2} \end{array}\right)} |\mathbf{1}\rangle\right) \otimes \cdots \\ &\cdots \otimes \left(|\mathbf{0}\rangle + \epsilon^{j2\pi \left(\begin{array}{c} j\_1 2^{-1} + j\_2 2^{-2} + \dots + j\_n 2^{-n} \end{array}\right)} |\mathbf{1}\rangle\right). \end{split} \tag{37}$$

It is often this version of the QFT that is used as a starting point for quantum circuit implementation when *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>* [3].

As an example, consider the two qubit case where *n* ¼ 2 and ∣*j*i ¼ ∣ *j* 1 *j* <sup>2</sup>i, then

$$\begin{split} \langle Q|j \rangle &= Q|j\_1 j\_2 \rangle \\ &= \frac{1}{2} \left( |\mathbf{0}\rangle + e^{i2\pi j\_2 2^{-1}} |\mathbf{1}\rangle \right) \otimes \left( |\mathbf{0}\rangle + e^{i2\pi \left( \begin{array}{c} j\_1 2^{-1} + j\_2 2^{-2} \end{array} \right)} |\mathbf{1}\rangle \right) \end{split} \tag{38}$$

If we let ∣ *j* 1 *j* <sup>2</sup>i ¼ ∣01i, then

$$\begin{split} Q|j\rangle &= Q|\mathbf{01}\rangle \\ &= \frac{1}{2} \left( |\mathbf{0}\rangle + e^{i2\pi(1)2^{-1}} |\mathbf{1}\rangle \right) \otimes \left( |\mathbf{0}\rangle + e^{i2\pi\left( (0)2^{-1} + (1)2^{-2} \right)} |\mathbf{1}\rangle \right) \\ &= \frac{1}{2} (|\mathbf{0}\rangle - |\mathbf{1}\rangle) \otimes (|\mathbf{0}\rangle + i|\mathbf{1}\rangle) \\ &= \frac{1}{2} (|\mathbf{0}\mathbf{0}\rangle + i|\mathbf{01}\rangle - |\mathbf{10}\rangle - i|\mathbf{11}\rangle) \end{split} \tag{39}$$

which corresponds to the column ∣01i entries in Eq. (26). If not already obvious, it should be emphasized that the tensor product is *not commutative* and that consistent qubit ordering is instrumental to the success of this calculation.

### **3.2 Quantum implementation**

Based upon Eq. (37), it is sensible to introduce an iterable version of the *R* operator introduced in Section 2.1:

$$R\_v = \begin{bmatrix} \mathbf{1} & \mathbf{0} \\ \mathbf{0} & e^{\frac{\partial \mathbf{z}}{\partial t}} \end{bmatrix}. \tag{40}$$

Furthermore, because each qubit contribution contains phase terms involving the binary expansion of *j*, one approach to addressing these interactions is to introduce a controlled version of *Rv*:

$$\mathbf{CR}\_v = \begin{bmatrix} I & \mathbf{0} \\ \mathbf{0} & R\_v \end{bmatrix}. \tag{41}$$

This operator can be used to induce the correct phase factor as follows. Assume *tc*i is the target/control structure for single qubits *j r j <sup>s</sup>* were *s* >*r* in the binary representation of ∣*j*i. Then, the following holds true

$$\begin{aligned} \mathbf{CR}\_v |j\_r \mathbf{0}\rangle &= |j\_r \mathbf{0}\rangle\\ \mathbf{CR}\_v |j\_r \mathbf{1}\rangle &= e^{i\mathbf{2}\mathbf{r}\_f} |j\_r \mathbf{1}\rangle \end{aligned} \tag{42}$$

*Quantum Fourier Operators and Their Application DOI: http://dx.doi.org/10.5772/intechopen.94902*

Hence, the control bit determines when to introduce the phase factor involving the target bit.

The goal of this section is to introduce enough nomenclature in order to put the next section of this work in context. The reader is encouraged to visit the provided references in order to fill in the details of a generalized quantum circuit that can implement an *n* qubit QFT. For now, we provide an *n* ¼ 2 qubit example to illustrate an algorithm for performing the QFT. Whatever principled series of operations is chosen, the goal of the quantum algorithm (and, hence, the associated quantum circuit) is to reproduce Eq. (11). Starting with ∣*j*i ¼ ∣ *j* 1 *j* 2i,

a. Apply *H* to ∣ *j* <sup>1</sup>i so that

Since these values appear in the phase factor, the integer parts will only result in

⊗ j0i þ *e*

<sup>2</sup>2�2þ⋯<sup>þ</sup> *<sup>j</sup> <sup>n</sup>*2�*<sup>n</sup>* ð Þj1<sup>i</sup> 

⊗ j0i þ *e*

⊗ j0i þ *e*

which corresponds to the column ∣01i entries in Eq. (26). If not already obvious,

it should be emphasized that the tensor product is *not commutative* and that consistent qubit ordering is instrumental to the success of this calculation.

Based upon Eq. (37), it is sensible to introduce an iterable version of the *R*

*Rv* <sup>¼</sup> 1 0 0 *e i*2*π* 2*v* 

the binary expansion of *j*, one approach to addressing these interactions is to

*CRv*∣ *j*

*CRv*∣ *j*

*CRv* <sup>¼</sup> *<sup>I</sup>* <sup>0</sup>

0 *Rv* 

*r*0i

*r j*

This operator can be used to induce the correct phase factor as follows. Assume

*<sup>r</sup>*0i ¼ ∣ *j*

*<sup>r</sup>*1i ¼ *e i*2*π* <sup>2</sup>*<sup>v</sup> j r*∣ *j*

Furthermore, because each qubit contribution contains phase terms involving

It is often this version of the QFT that is used as a starting point for quantum

*i*2*π j*

*<sup>n</sup>*�12�1<sup>þ</sup> *<sup>j</sup> <sup>n</sup>*2�<sup>2</sup> ð Þj1<sup>i</sup> 

*:*

*i*2*π j*

<sup>1</sup>2�1<sup>þ</sup> *<sup>j</sup>* <sup>2</sup>2�<sup>2</sup> ð Þj1<sup>i</sup> (38)

*<sup>i</sup>*2*<sup>π</sup>* ð Þ <sup>0</sup> <sup>2</sup>�1þð Þ<sup>1</sup> <sup>2</sup>�<sup>2</sup> ð Þj1<sup>i</sup> 

*:* (40)

*:* (41)

*<sup>s</sup>* were *s* >*r* in the binary

*<sup>r</sup>*1<sup>i</sup> (42)

⊗ ⋯

1 *j*

<sup>2</sup>i, then

(39)

(37)

integer multiples of 2*π* and can therefore be discarded. Eq. (33) can then be

*Real Perspective of Fourier Transforms and Current Developments in Superconductivity*

<sup>1</sup>2�1<sup>þ</sup> *<sup>j</sup>*

As an example, consider the two qubit case where *n* ¼ 2 and ∣*j*i ¼ ∣ *j*

expressed as

*QFT*f g <sup>j</sup> *<sup>j</sup>*<sup>i</sup> <sup>¼</sup> <sup>1</sup>

If we let ∣ *j*

1 *j*

*Q*∣*j*i ¼ *Q*∣01i ¼ 1

> ¼ 1 2

> ¼ 1 2

**3.2 Quantum implementation**

operator introduced in Section 2.1:

introduce a controlled version of *Rv*:

**22**

*tc*i is the target/control structure for single qubits *j*

representation of ∣*j*i. Then, the following holds true

<sup>2</sup>*n=*<sup>2</sup> ½ j0i þ *<sup>e</sup>*

circuit implementation when *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>* [3].

*Q*∣*j*i ¼ *Q*∣ *j*

¼ 1

<sup>2</sup>i ¼ ∣01i, then

<sup>2</sup> <sup>j</sup>0i þ *<sup>e</sup>*

⋯ ⊗ j0i þ *e*

1 *j* 2i

<sup>2</sup> <sup>j</sup>0i þ *<sup>e</sup>*

*i*2*π j n*2�<sup>1</sup> j1i

*i*2*π j*

*i*2*π j* 22�<sup>1</sup> j1i

*<sup>i</sup>*2*π*ð Þ<sup>1</sup> <sup>2</sup>�<sup>1</sup>

ð Þ j0i�j1i ⊗ ð Þ j0i þ *i*j1i

ð Þ j00i þ *i*j01i�j10i � *i*j11i

j1i

$$\begin{aligned} |j\_1\rangle \otimes |j\_2\rangle &\to H|j\_1\rangle \otimes |j\_2\rangle\\ &= \frac{1}{\sqrt{2}} \left( |0\rangle + e^{i2\pi j\_1 2^{-1}} |1\rangle \right) \otimes |j\_2\rangle \end{aligned} \tag{43}$$

b. Apply *CR*<sup>2</sup> to target qubit *j* <sup>1</sup> controlled by *j* <sup>2</sup>. This yields

$$\frac{1}{\sqrt{2}}\left(|\mathbf{0}\rangle + e^{i2\pi j\_1 2^{-1}}|\mathbf{1}\rangle\right) \otimes |j\_2\rangle \to \frac{1}{\sqrt{2}}\left(|\mathbf{0}\rangle + e^{i2\pi \left(\begin{array}{c} j\_1 2^{-2} + j\_1 2^{-1} \end{array}\right)}|\mathbf{1}\rangle\right) \otimes |j\_2\rangle\tag{44}$$

c. Apply *H* to ∣ *j* 2i

$$\begin{split} \frac{1}{\sqrt{2}} \left( |\mathsf{0}\rangle + \epsilon^{j2\pi \left( \begin{array}{c} j\_2 2^{-1} + j\_1 2^{-1} \end{array} \right)} |\mathsf{1}\rangle \right) \otimes |j\_2\rangle \to \frac{1}{\sqrt{2}} \left( |\mathsf{0}\rangle + \epsilon^{j2\pi \left( \begin{array}{c} j\_2 2^{-1} + j\_1 2^{-1} \end{array} \right)} |\mathsf{1}\rangle \right) \otimes \frac{1}{\sqrt{2}} \left( |\mathsf{0}\rangle + \epsilon^{j2\pi \left( \begin{array}{c} j\_2 2^{-1} \end{array} \right)} |\mathsf{1}\rangle \right) \\ = \frac{1}{2} \left( |\mathsf{0}\rangle + \epsilon^{j2\pi} |\mathsf{1}\rangle \right) \otimes \left( |\mathsf{0}\rangle + \epsilon^{j2\pi} |\mathsf{1}\rangle \right) \end{split} \tag{45}$$

Comparing this result with either Eq. (33) or Eq. (37), it is clear that this algorithm, derived using quantum reversible operators, recovers the QFT from Eq. (38) with one slight difference: the bit ordering is reversed. Given *n* qubits, it is possible to apply *n=*2 swaps using, for example, tensor products involving an *X* operator (see Section 2.1) in order to reverse the bit order. Such bit reversal permutations are reminiscent of the radix-2 FFT algorithm. If one generalizes this algorithm to *<sup>n</sup>* qubits, it can be shown that the algorithmic complexity is <sup>O</sup> *<sup>n</sup>*<sup>2</sup> ð Þ. With *<sup>N</sup>* <sup>¼</sup> <sup>2</sup>*<sup>n</sup>*, this is a considerable improvement over *<sup>N</sup>* log *<sup>N</sup>* <sup>¼</sup> *<sup>n</sup>*2*<sup>n</sup>* for the radix-2 FFT. However, algorithmic improvements and variations have been developed that can further reduce QFT complexity to Oð Þ *n* log *n* [9, 15].
