I am reading this paper and trying to implement a quantum circuit it has provided in Figure 11. I want to code this circuit using Qiskit. The circuit I am trying to implement is attached.
I have coded some parts of the circuit so far. This is my code.
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
n = 3
qr = QuantumRegister(n, 'q')
an = QuantumRegister(1, 'ancilla')
circuit = QuantumCircuit(an, qr)
circuit.h(qr[2])
circuit.cx(qr[2], qr[1])
circuit.cx(qr[1], qr[0])
circuit.x(qr[1])
circuit.swap(qr[0], qr[1])
circuit.cu1("Pi", an[0], qr[1])
circuit.cu1("Pi/3", an[0], qr[0])
circuit.swap(qr[0], qr[1])
circuit.x(qr[1])
circuit.cx(qr[1], qr[0])
circuit.cx(qr[2], qr[1])
circuit.h(qr[2])
circuit.draw(output='latex')
This code generates following output. Please help me with this code.