updating spin-chain-vqe tutorial to use SPSA#4744
updating spin-chain-vqe tutorial to use SPSA#4744nathanearnestnoble wants to merge 16 commits intomainfrom
Conversation
Work done by Aryaman Manish Kolhe (Chasmiccoder) and Ritajit Majumdar (ritajitmajumdar1)
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
One or more of the following people are relevant to this code: |
|
Resolves issue 3632 (#3632) |
| @@ -1,411 +1,470 @@ | |||
| { | |||
There was a problem hiding this comment.
Looks like this needs the title and metadata tags at the very top of the file. You should be able to replace this cell with the following:
--- title: Ground-state energy estimation of the Heisenberg chain with VQE description: Build, deploy, and run a Qiskit pattern for simulating a Heisenberg chain and estimating its ground state energy. --- *Usage estimate: 37 minutes on a Heron processor (NOTE: This is an estimate only. Your runtime might vary.)*
Reply via ReviewNB
docs/tutorials/spin-chain-vqe.ipynb
Outdated
| "name": "python3" | ||
| ], | ||
| "metadata": { | ||
| "description": "Build, deploy, and run a Qiskit pattern for simulating a Heisenberg chain and estimating its ground state energy.", |
There was a problem hiding this comment.
| "description": "Build, deploy, and run a Qiskit pattern for simulating a Heisenberg chain and estimating its ground state energy.", |
There was a problem hiding this comment.
The title and metadata tags now need to go at the top of the file (though I'm not totally sure when that changed 😅 )
docs/tutorials/spin-chain-vqe.ipynb
Outdated
| "pygments_lexer": "ipython3", | ||
| "version": "3.13.3" | ||
| }, | ||
| "title": "Ground state energy estimation of the Heisenberg chain with VQE" |
There was a problem hiding this comment.
| "title": "Ground state energy estimation of the Heisenberg chain with VQE" |
|
@kaelynj @nathanearnestnoble I fixed the metadata but am getting an error regarding an unused variable can you help clear the error? I can then clear the rest of the checks, like converting the output to images. |
|
Hi @abbycross and everyone. Thank you for helping merge this work. I believe from the code snippet you have shared, the error can be fixed as follows: with Session(backend=backend) as _:The problem might be that if you write with Session(backend=backend) as session:then the variable |
|
Rather just do
This ensures the entire block runs as a single session. Unless the Estimator is initiated with session, I presume it would run in a job mode. |
| "<Admonition type=\"tip\" title=\"Recommendations\">\n", | ||
| "If you found this work interesting, you might be interested in the following material:\n", | ||
| "</Admonition>" |
There was a problem hiding this comment.
Are there any suggestions to add here, for what to read or other tutorials to explore after doing this tutorial? If not, we can remove this whole cell.
There was a problem hiding this comment.
Not sure if there are any tutorials as follow up. Since this is variational, the only variational algorithm in the current tutorials is QAOA. But it is not an extension of this tutorial.
Work done by Aryaman Manish Kolhe (@Chasmiccoder) and Ritajit Majumdar (@ritajitmajumdar1). Would like to update tutorial with this SPSA implementation.
Fixes #3632