Add Continuous-Time Quantum Walk Notebook#1507
Add Continuous-Time Quantum Walk Notebook#1507king-p3nguin wants to merge 3 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
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
| @@ -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
| @@ -0,0 +1,444 @@ | |||
| { | |||
There was a problem hiding this comment.
| @@ -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
| @@ -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
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