Add Continuous-Time Quantum Walk Notebook#1507
Add Continuous-Time Quantum Walk Notebook#1507king-p3nguin wants to merge 4 commits intoClassiq:mainfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
🔥 New notebook just dropped! @amir-naveh , @TomerGoldfriend — come check out this shiny new addition to our repo. |
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
our documentation doesn't parse well the \bra and \ket, so please replace all of the to |...\rangle
Reply via ReviewNB
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
I am missing something in the big picture - what is the purpose of the quantum walk in this case?
And what quantity are we measuring?
Reply via ReviewNB
There was a problem hiding this comment.
Note, that the Hamiltonian is quadratic, therefore for an initial fermionic gaussian state such as the vaccum state, or any slater determinate state such as a_m^\dagger....a_1^\dagger|vaccum> the dynamics can be solved in polynomial time in the number of qubits on a classical compute (basically be diagonalizing the single electron Hamiltonian h, where H = sum_{n,m} a_m^\dagger h_{mn}a_n).
see for example https://arxiv.org/abs/2111.08343,
In addition, there are quantum methods to perform efficient and exact propagation of a Gaussian fermionic state, when the dynamics is generated by a quadratic Hamiltonian, so there is no need for Trotterization. See for example: https://arxiv.org/abs/1711.05395
There was a problem hiding this comment.
Here, the quantum walk is used to see the exciton population dynamics in the FMO complex. We are measuring the exciton population in each pigment by sampling.
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
There was a problem hiding this comment.
We are measuring the exciton population in each pigment by sampling.
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
Line #10. def main(qnum: Output[QNum]):
I think that you can set time_point as a parameter of main. Then you can synthesize just once, and pass time as a parameter to execution every iteration (see Execution Parameters in the docs)
Reply via ReviewNB
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
Line #12. suzuki_trotter(
notice that since the number of repetitions stay the same, you loose accuracy with the increase in time.
You can either increase it or explain it in the graph you plot
Reply via ReviewNB
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
Line #43. print(duration)
write text before each number to explain it or just remove the prints
Reply via ReviewNB
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
why did you choose to plot points only on the peaks? It will be more convincing if you have more points \ points on other trends
Reply via ReviewNB
There was a problem hiding this comment.
I thought increasing the number of plots would take too much time, but using ExecutionSession solved the issue. I increased the number of points.
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
There was a problem hiding this comment.
Yes, the J_mn is the off-diagonal element in the Hamiltonian.
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
Is H already in qubits or fermionic?
If it is in qubits, so instead of your create_projector function, I think you can use the matrix_to_hamiltonian function.
BTW in this case is the algorithm scalable? because it seems that the input already scales with the exponent of the number of qubits
Reply via ReviewNB
There was a problem hiding this comment.
I was not able to use matrix_to_hamiltonian function due to the following error:
AssertionError: Matrix dimension is not a power of 2
I believe this code is necessary because the algorithm must work even when the number of pigments is not a power of two.
The Frenkel exciton Hamiltonian restricts the excitation to the single-exciton manifold, so it is not scalable. However, for a better description of energy-transfer dynamics, we need to mix single-exciton states with ground-state or multiexciton states, and in this case, the computational complexity scales exponentially with the number of pigments (J. Chem. TheoryComput. 2022, 18, 1347−1358). I will mention this in the notebook.
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
"Since it is difficult to directly execute ..." - I would use another words. Talk about approximating the evolution.
Reply via ReviewNB
|
@orsa-classiq Thank you for the review. I changed the notebook as requested. The URL can be accessed without issue, yet it failed the test. Should I delete the problematic URL? |
If that's the case, and the URL works fine, then add it to |
PR Description
I added a notebook for running a continuous-time quantum walk using FMO Hamiltonian.
The notebook includes:
classiq*This notebook was created during an internship at Classiq Japan
Some notes
Please make sure that the notebook runs successfully with the latest Classiq version.
Please make sure that you placed the files in an appropriate folder
.ipynband.qmodto be unique across this repository..qmod,.synthesis_options.json,.metadata.jsonIf applicable, please include link to the paper on which the notebook is based, in the notebook itself.
Please use
rebaseon your branch (no merge commits)Please link this PR to the relevant issue
Please make sure to run
pre-commitwhen commiting changesgitin the terminal, make sure to installpre-commitvia runningpip install pre-commitfollowed bypre-commit installpre-commitdocumentationpre-commit.pre-commitmay minorly alter some files. Make sure togit addthe changes done bypre-commit