Updated Glued Trees notebook to use Classiq's built in Pauli decomposition function
Hello! Since Classiq recently added a built-in Pauli decomposition function matrix_to_hamiltonian, I have updated the glued trees notebook to include it instead of using Qiskit as a dependency. This means that all of the helper methods converting the Pauli list to Classiq's Hamiltonian object format are no longer necessary.
For the purpose of the (optional) caching used in the notebook, I have added the jsonpickle library to cache the Hamiltonian object directly as opposed to using a list of tuples which is then converted into the Hamiltonian object as was used previously.
Overall, I think this makes the notebook a lot cleaner and more focused on the actual quantum algorithm as opposed to type conversions. Let me know if you have any questions or if there is anything I need to fix!
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@adam-godel Great contribution!
1 - in order for the test to pass, put !pip install jsonpickle in the notebook
2 - All latex except for the big matrix will be rendered correctly so better to leave it as latex and not as images
@orsa-classiq I have made the requested changes! I think the test is still failing because the testing script can't locate the cache file, but I think it should be okay since it's not due to any changes from this pull request.
It fails becuase of the tqdm package (I think the same trick of !pip install should work here)
@orsa-classiq I have added it. I believe the test is still failing for the reason I stated above.
@adam-godel Indeed now we got to the problem you said I've merge a potential fix. Please try to rebase and see if the test is solved now