13.
13.1 Guest speaker Maria Schuld on quantum kernels
I guess this is interesting because the kernel research (in progress) could be developed to become the OS kernel (?) for future quantum computing. Most interesting is that Schuld is now working for Xanadu, and she mentions how Xanadu implemented kernel with quantum squeezing operator. She puts efforts in showing some pre-assignment notebook with python, as well as Pennylane from Xanadu! Hope I can get acquainted with her and Seth Lloyd to discuss my research in quantum intelligence.
Secondly, Schuld mentions similarity analysis, which is very interesting not only for quantum intelligence, but in general there can be many applications.
13.2 Video exercises of Quantum Fourier transformation (QFT)
QFT helps the quantum Turing machine of quantum data in and quantum data out. In quantum annealing or QAOA, our Turing machine is classical data in and out. However, because of Born rule, states will be changed after measurement. You must repeat entire calculation process of state preparation. This is called state tomography and is time-consuming. QFT, on the other hand, reduces dependencies between qubits.
13.2.1 Difficulties of Quantum Tomography
Here is a definition from wiki: Quantum tomography or quantum state tomography is the process of reconstructing the quantum state (density matrix) for a source of quantum systems by measurements on the systems coming from the source. The source may be any device or system which prepares quantum states either consistently into quantum pure states or otherwise into general mixed states. To be able to uniquely identify the state, the measurements must be tomographically complete. That is, the measured operators must form an operator basis on the Hilbert space of the system, providing all the information about the state. Such a set of observations is sometimes called a quorum. On the other hand, Quantum process or measurement tomography uses known states to find out the way to describe the process, or what measurement is being performed.
The hints of this exercise reveal that from the beginning of the course we emphasize quantum state is a probability distribution (with some special properties), but measuring the state only gives one sample, it does not reveal the entire probability distribution. Since from Born rule, a measurement changes the state, you have to repeat the entire calculation again to obtain another sample.
The wrong statement is that State tomography is the inverse of state preparation, and therefore it may significantly increase circuit depth. My guess is: State tomography is not the inverse of state preparation. Process tomography is the inverse of state preparation.
The other wrong statement is that Quantum coherence is hard to maintain until repeated measurements are finished to collect enough samples. My guess is: not all quantum coherence is like that, although most of quantum coherence like tomography is hard to maintain.
13.2.2 Amplitude encoding
Quantum Fourier transformation uses amplitude encoding.
13.2.3 Advantage of Quantum Fourier Transformation
The derivation of the quantum algorithm is long, but eventually we find the $U$ unitary that performs the desired transformation in the form (1/ √ N) (|0⟩+e2πi0.xn|1⟩) ⊗...⊗ (|0⟩+e2πi0.x1.x2...xn−1.xn|1⟩). The reason why this form is advantageous is because It reduces dependency between qubits: only the last qubit depends on the value of all the others, the remaining qubits depend less and less on the input qubits. Does this mean this form uses single-qubit operations throughout? Not necessarily. And also, the form does not mean a binary representation of numbers to be implemented on qubit registers.
One student says QFT should reduce dependencies to zero, i.e. all qubits are totally independent. I guess the instructor don’t want to say it that absolute.
13.3 Video exercises of Quantum Phase Estimation
Quantum phase estimation must include an inverse quantum Fourier transformation (but not quantum Fourier transformation).
The exercises are simple if you catch the key words in the lecture: complex unit circle, finite precision, and superposition.
13.3.3 Superposition
Before the inverse quantum Fourier transformation, we apply a series of controlled unitary applications to create a superposition of U as it is applied for different durations.
13.4 Assignment 13_Quantum_Phase_Estimation
Finally, a fundamental quantum computing theory, QFT, can be coded in Python. This is why for years quantum computing stays as a big hurdle for students because it can only be taught as theory proofs. In a 2015 international quantum computing conference in Taipei, I asked Physics Professor Quan Xi-sheng of National Taiwan university, the only person in Taiwan to offer a course in quantum computing, if he taught the course with computer lab. He smiled awkwardly, since there is no hardware and no software. The situation starts improving in 2016 when IBM 5-qubit Q-experience computer and various simulation software packages become available for public use. In 2014 the hardware resource from DWAVE was still limited and I failed in a research competition about selected user to the famous DWAVE machine via cloud. However, anyone can register an IBM account to user IBM quantum computers for free.
QFT in Rieffel’s textbook (Chap 7) is introduced amongst quantum circuit teaching and then applied for Shor’s algorithm (Chap 8). I was totally in ignorance how it comes about when I first self-learned it in 2014. This time (2019) QFT is introduced by Nielson’s textbook (Chap 5), as follows:
Conclusion: I don’t know (1) what is required (quantum state?) to check my answer. Finally, I see the grading report to check the qft circuit’s amplitude to get it right. (2) The ways to improve my ignorance about quantum circuits are (2.1) The table of all the universal quantum gates presented in this document should have two more columns to tell why applying a gate and what would be the result (e.g. for a Hadamard gate, why—in order to get superposition, & what -- acts as a control input to the next circuit, and the target gets inverted only when the control is 1.) If the table does not have space for two more columns, a separate table is needed. (2.2) additional column is needed for qiskit python function name, such as circuit.rz for Rz rotation, circuit.h for Hadamard, etc. the 2019 Koch paper put all these function names together and can be a good reference without going to the IBM qiskit documentation. (2.3) it’s time to build another table and summarize all the circuit rules. (3) how do eigen values relate to the circuits? I still don’t know.
13.4.2 Coding inverse-QFT (iqft)
This exercise asks students to implement inverse-QFT on a single-qubit system. Nielson textbook also has exercise 5.5 to ask student circuits for iqft of a general qubit system but give no clue. The pre-assignment gives iqft for a 3-qubit system as follows (qpe, circuit for phase estimation, should be iqft in our case):
qpe.swap(q[0], q[1])
qpe.h(q[1])
qpe.cu1(-π / 2, q[0], q[1])
qpe.h(q[0])
qpe.swap(q[0], q[1])
How to get iqft circuit on a single-qubit system? I have gone very far to search python source code for iqft and in vain. Finally, checking with grading report I have the amplitude check value, which is the same as qft for the single qubit system:
q = QuantumRegister(1, 'q')
c = ClassicalRegister(1, 'c')
iqft = QuantumCircuit(q, c)
iqft.h(q[0])
print (get_amplitudes(iqft))
circuit_drawer(iqft)
and the circuit is completely the same as qft.