This notebook is based on the paper of Radhakrishnan Balu, Daniel Castillo, and George Siopsis, "Physical realization of topological quantum walks on IBM-Q and beyond" arXiv:1710.03615 [quant-ph](2017).
Keita Takeuchi (Univ. of Tokyo) and Rudy Raymond (IBM Research - Tokyo)
We define Hilbert space of quantum walker states and coin states as $\mathcal{H}_{\mathcal{w}}=\{\vert x \rangle, x\in\mathbb{Z}_N\}, \mathcal{H}_{\mathcal{c}}=\{\vert 0 \rangle, \vert 1 \rangle\}$, respectively. Then, step operator is defined as
$$ S^+ := \vert 0 \rangle_c \langle 0 \vert \otimes L^+ + \vert 1 \rangle_c \langle 1 \vert \otimes \mathbb{I}\\ S^- := \vert 0 \rangle_c \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle_c \langle 1 \vert \otimes L^-, $$where
$$ L^{\pm}\vert x \rangle_{\mathcal w} := \vert (x\pm1)\ \rm{mod}\ N \rangle_{\mathcal w} $$is a shift operator. The boundary condition is included. Also, we define the coin operator as
$$ T(\theta):=e^{-i\theta Y} = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}. $$One step of quantum walk is the unitary operator defined as below that uses two mode of coins, i.e., $\theta_1$ and $\theta_2$:
$$ W := S^- T(\theta_2)S^+ T(\theta_1). $$Intuitively speaking, the walk consists of flipping coin states and based on the outcome of the coins, the shifting operator is applied to determine the next position of the walk.
Next, we consider a walk with two phases that depend on the current position:
$$ (\theta_1,\theta_2) = \begin{cases} (\theta_{1}^{-},\ \theta_{2}^{-}) & 0 \leq x < \frac{N}{2} \\ (\theta_{1}^{+},\ \theta_{2}^{+}) & \frac{N}{2} \leq x < N. \end{cases} $$Then, two coin operators are rewritten as
$$ \mathcal T_i = \sum^{N-1}_{x=0}e^{-i\theta_i(x) Y_c}\otimes \vert x \rangle_w \langle x \vert,\ i=1,2. $$By using this, one step of quantum walk is equal to
$$ W = S^- \mathcal T_2 S^+ \mathcal T_1. $$In principle, we can execute the quantum walk by multiplying $W$ many times, but then we need many circuit elements to construct it. This is not possible with the current approximate quantum computers due to large errors produced after each application of circuit elements (gates).
Altenatively, we can think of time evolution of the states. The Hamiltonian $H$ is regarded as $H=\lim_{n \to \infty}W^n$(See below for further details.).
For example, when $(\theta_1,\ \theta_2) = (0,\ \pi/2)$, the Schrödinger equation is
$$ i\frac{d}{dt}\vert \Psi \rangle = H_{\rm I} \vert \Psi \rangle,\ H_{\rm I} = -Y\otimes [2\mathbb I+L^+ + L^-]. $$If Hamiltonian is time independent, the solution of the Schrödinger equation is
$$ \vert \Psi(t) \rangle = e^{-iHt} \vert \Psi(0) \rangle, $$so we can get the final state at arbitrary time $t$ at once without operating W step by step, if we know the corresponding Hamiltonian.
The Hamiltonian can be computed as below.
Set $(\theta_1,\ \theta_2) = (\epsilon,\ \pi/2+\epsilon)$, and $\epsilon\to 0$ and the number of step $s\to \infty$ while $se=t/2$(finite variable). Then, \begin{align*} H_I&=\lim_{n \to \infty}W^n\\ \rm{(LHS)} &= \mathbb{I}-iH_{I}t+O(t^2)\\ \rm{(RHS)} &= \lim_{\substack{s\to \infty\\ \epsilon\to 0}}(W^4)^{s/4}= \lim_{\substack{s\to \infty\\ \epsilon\to0}}(\mathbb{I}+O(\epsilon))^{s/4}\\ &\simeq \lim_{\substack{s\to \infty\\ \epsilon\to 0}}\mathbb{I}+\frac{s}{4}O(\epsilon)\\ &= \lim_{\epsilon\to 0}\mathbb{I}+iY\otimes [2\mathbb I+L^+ + L^-]t+O(\epsilon). \end{align*} Therefore, $$H_{\rm I} = -Y\otimes [2\mathbb I+L^+ + L^-].$$
In order to check the correctness of results of the implementation of quantum walk by using IBMQ, we investigate two models, which have different features of coin phases. Let the number of positions on the line $n$ is 4.
That is, the former is a quantum walk on a line with two phases of coins, while the latter is that with only one phase of coins.
The Hamiltonian operators for each of the walk on the line are, respectively, $$ H_{\rm I/II} = Y \otimes \mathbb I \otimes \frac{\mathbb I + Z}{2}\\ H_{\rm I} = Y\otimes (2\mathbb I\otimes \mathbb I + \mathbb I\otimes X + X \otimes X). $$
Then, we want to implement the above Hamiltonian operators with the unitary operators as product of two-qubit gates CNOTs, CZs, and single-qubit gate rotation matrices. Notice that the CNOT and CZ gates are \begin{align*} \rm{CNOT_{ct}}&=\left |0\right\rangle_c\left\langle0\right | \otimes I_t + \left |1\right\rangle_c\left\langle1\right | \otimes X_t\\ \rm{CZ_{ct}}&=\left |0\right\rangle_c\left\langle0\right | \otimes I_t + \left |1\right\rangle_c\left\langle1\right | \otimes Z_t. \end{align*}
Below is the reference of converting Hamiltonian into unitary operators useful for the topological quantum walk.
| unitary operator | product of circuit elements |
|---|---|
| $e^{-i\theta X_c X_j}$ | $\rm{CNOT_{cj}}\cdot e^{-i\theta X_c t}\cdot \rm{CNOT_{cj}}$ |
| $e^{-i\theta X_c Z_j}$ | $\rm{CZ_{cj}}\cdot e^{-i\theta X_c t}\cdot \rm{CZ_{cj}}$ |
| $e^{-i\theta Y_c X_j}$ | $\rm{CNOT_{cj}}\cdot e^{i\theta Y_c t}\cdot \rm{CNOT_{cj}}$ |
| $e^{-i\theta Y_c Z_j}$ | $\rm{CNOT_{jc}}\cdot e^{-i\theta Y_c t}\cdot \rm{CNOT_{jc}}$ |
| $e^{-i\theta Z_c X_j}$ | $\rm{CZ_{cj}}\cdot e^{-i\theta X_j t}\cdot \rm{CZ_{cj}}$ |
| $e^{-i\theta Z_c Z_j}$ | $\rm{CNOT_{jc}}\cdot e^{-i\theta Z_c t}\cdot \rm{CNOT_{jc}}$ |
By using these formula, the unitary operators are represented by only CNOT, CZ, and rotation matrices, so we can implement them by using IBM Q, as below.
In [1]:
#initialization
import sys
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
# importing QISKit
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import Aer, IBMQ, execute
from qiskit.wrapper.jupyter import *
from qiskit.backends.ibmq import least_busy
from qiskit.tools.visualization import matplotlib_circuit_drawer as circuit_drawer
from qiskit.tools.visualization import plot_histogram, qx_color_scheme
In [2]:
IBMQ.load_accounts()
sim_backend = Aer.get_backend('qasm_simulator')
device_backend = least_busy(IBMQ.backends(operational=True, simulator=False))
device_coupling = device_backend.configuration()['coupling_map']
print("the best backend is " + device_backend.name() + " with coupling " + str(device_coupling))
Quantum walk, phase I/II on $N=4$ lattice$(t=8)$
In [3]:
t=8 #time
q1_2 = QuantumRegister(3)
c1_2 = ClassicalRegister(3)
qw1_2 = QuantumCircuit(q1_2, c1_2)
qw1_2.x(q1_2[2])
qw1_2.u3(t, 0, 0, q1_2[1])
qw1_2.cx(q1_2[2], q1_2[1])
qw1_2.u3(t, 0, 0, q1_2[1])
qw1_2.cx(q1_2[2], q1_2[1])
qw1_2.measure(q1_2[0], c1_2[0])
qw1_2.measure(q1_2[1], c1_2[2])
qw1_2.measure(q1_2[2], c1_2[1])
print(qw1_2.qasm())
circuit_drawer(qw1_2, style=qx_color_scheme())
Below is the result when executing the circuit on the simulator.
In [4]:
job = execute(qw1_2, sim_backend, shots=1000)
result = job.result()
plot_histogram(result.get_counts())
And below is the result when executing the circuit on the real device.
In [5]:
%%qiskit_job_status
HTMLProgressBar()
job = execute(qw1_2, backend=device_backend, coupling_map=device_coupling, shots=100)
In [6]:
result = job.result()
plot_histogram(result.get_counts())
Conclusion: The walker is bounded at the initial state, which is the boundary of two phases, when the quantum walk on the line has two phases.
Quantum walk, phase I on $N=4$ lattice$(t=8)$
In [7]:
t=8 #time
q1 = QuantumRegister(3)
c1 = ClassicalRegister(3)
qw1 = QuantumCircuit(q1, c1)
qw1.x(q1[1])
qw1.cx(q1[2], q1[1])
qw1.u3(t, 0, 0, q1[2])
qw1.cx(q1[2], q1[0])
qw1.u3(t, 0, 0, q1[2])
qw1.cx(q1[2], q1[0])
qw1.cx(q1[2], q1[1])
qw1.u3(2*t, 0, 0, q1[2])
qw1.measure(q1[0], c1[0])
qw1.measure(q1[1], c1[1])
qw1.measure(q1[2], c1[2])
print(qw1.qasm())
circuit_drawer(qw1, style=qx_color_scheme())
Below is the result when executing the circuit on the simulator.
In [8]:
job = execute(qw1, sim_backend, shots=1000)
result = job.result()
plot_histogram(result.get_counts())
And below is the result when executing the circuit on the real device.
In [9]:
%%qiskit_job_status
HTMLProgressBar()
job = execute(qw1, backend=device_backend, coupling_map=device_coupling, shots=100)
In [10]:
result = job.result()
plot_histogram(result.get_counts())
Conclusion: The walker is unbounded when the quantum walk on the line has one phase.
We can see that the results from simulators match those from real devices. This hints that IBM Q systems can be used to experiments with topological quantum walk.
In [ ]: