Skip to content

This is the hackathon project done with my teammates two years ago, I want to do some improvement now.

Notifications You must be signed in to change notification settings

Kuo-TingKai/IBMQcamp2020_VQE_team

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTUQ Hackathon

Github issue #10 "Variational Quantum Eigensolver"

Topic

Quantum computing has been considered to possess the capability of tackling some classically intractable problems such as quantum many-body simulation. However the reliability and scalability of the state-of-the-art quantum hardware, called Noisy Intermediate-Scale Quantum(NISQ) device, has not reached the threshold to implement any useful pure quantum algorithms. Thus in the NISQ era, hybrid-quantum-classical(HQC) algorithms are getting popular, where variational quantum eigensolver(VQE) is one of the currently applicable methods[1]. VQE consists of four main parts including Hamiltonian definition, ansatz design, measurement, and optimization. For Qiskit beginners, as the first step they may try to implement a VQE program from scratch for some pre-defined problem such as molecular energy calculation. Moreover, the design of ansatz(e.g. hardware-efficient ones[2] or problem-specific ones such as UCCSD[3]), strategy for efficient measurement[4], ways of optimization(e.g. gradient-based[5] or not) are all open to question. Participants are encouraged to discuss or study about any aspect of the VQE procedure.

Discussion

  • suggestion: establish the topic and make a github repository first

  • 可以請Coach把今天提到的論文丟上來嗎

  • 如果有人想了解一下Quantum Machine Learining,可以參考Variational classifier[5],它有提到如何把傳統資料iris dataset encode映射成Qubit的形式。 "State preparation is not as simple as when we represent a bitstring with a basis state. Every input x has to be translated into a set of angles which can get fed into a small routine for state preparation. To simplify things a bit, we will work with data from the positive subspace, so that we can ignore signs (which would require another cascade of rotations around the z axis)." 文章中也有程式碼。

  • 剛剛跟峻瑋討論說,如果用VQE做QNN的話,可以用Pennylane,那可能會需要看一下PennyLane-Qiskit Plugin這個repo跟doc

  • 有人還記得兩個subsystem的Hamiltonian分別訓練的那篇叫甚麼嗎? (Solved: Please view [6])

  • 醫療研究中藥物分子的化學表達式(SMILES)

    • 有一個python輕量級處理SMILES格式的套件pysmiles
    • label是甚麼?
    • 問題:如果要用SMILES資料的話,不一定能轉成Hamiltonian
  • Variational encoding a way to encode the input classical data into a quantum state.

  • optimizer

    • cobyla : gradient-free
    • spsa : noisy-resistant but convergent slower
  • LSTM-meta-learner的解釋

  • more entaglement, more powerful

    • explaination: 假如沒有糾纏態(product state)的話,比較像是每個qubit分別預測0~9的二進位表示中的個別位元而不是預測整個數字。
  • 二進位表示的label導致數字之間常常只有一個位元有所差異

Reference

Reference [1] Nature communications 5, 4213 (2014)

[2] Nature 549, 242-246(2017)

[3] Nature communications 5, 4213 (2014)

[4] J. Chem. Phys. 152, 124114 (2020)

[5] Phys. Rev. A 99, 032331 (2019)

[6] Alberto Peruzzo etal., "A variational eigenvalue solver on a quantum processor", Nature communications 5, 4213 (2014)

[7] Rongxin Xia and Sabre Kais, "Hybrid Quantum-Classical Neural Network for Calculating Ground State Energies of Molecules", (2020)

[8] Pennylane(Xanadu),"A brief overview of VQE".

[9] Pennylane(Xanadu), "Accelerating VQEs with quantum natural gradient".

[10] Pennylane(Xanadu), "Variational classifier".

[11] K. Fujii etal., "Deep Variational Quantum Eigensolver: a divide-and-conquer method for solving a larger problem with smaller size quantum computers", (2020)

[12] V. Verteletskyi etal., "Measurement Optimization in the Variational Quantum Eigensolver Using a Minimum Clique Cover", (2020)

[13] Möttönen, etal. Transformation of quantum states using uniformly controlled rotations, (2008)]

Result

4-qubit circuit ryN + CNOT

  • training curve

Training [5%] Loss: 0.6041 Training [10%] Loss: 0.4719 Training [15%] Loss: 0.4082 Training [20%] Loss: 0.3702 Training [25%] Loss: 0.3507 Training [30%] Loss: 0.3410 Training [35%] Loss: 0.3345 Training [40%] Loss: 0.3281 Training [45%] Loss: 0.3248 Training [50%] Loss: 0.3213 Training [55%] Loss: 0.3199 Training [60%] Loss: 0.3177 Training [65%] Loss: 0.3170 Training [70%] Loss: 0.3172 Training [75%] Loss: 0.3165 Training [80%] Loss: 0.3173 Training [85%] Loss: 0.3165 Training [90%] Loss: 0.3143 Training [95%] Loss: 0.3180 Training [100%] Loss: 0.3146

  • accurancy

Performance on test data is is: 398/400 = 99.5%

4-qubit circuit ryN

├── LiH (Hydrogen-like molecules)
    ├── train
        ├── class1(IIII)
            ├── coefficient
        ├── class2(IIIZ)
            ├── coefficient
        ├── class3 (IIZI)
            ├── coefficient
        ├── ...
    ├── val
    ├── test
 -> save to csv
 
 Implement MLP (doing regression)

st=>start: dictionary of 4-qubit pauli operators (from exact eigensolver)
e=>end: predict energy
op=>operation: MLP (fully connected layer)
op2=>operation: Quantum circuit
op3=>operation: calculate loss
cond=>condition: 是或否?

st->op->op2->op3->e

About

This is the hackathon project done with my teammates two years ago, I want to do some improvement now.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.4%
  • Python 0.6%