Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantum Chemistry Notebook Documentation #30

Merged
merged 21 commits into from
Apr 29, 2024
Merged

Quantum Chemistry Notebook Documentation #30

merged 21 commits into from
Apr 29, 2024

Conversation

JonhasSC
Copy link
Collaborator

This PR involves adding additional documentation and code for grabbing resource estimates for estimating the ground state energy of a state along a given reaction pathway. The catalyst used for water oxidation is Co2O9H12 and is the only mechanism we look at for this update. Given how the code is structured, any mechanism and any respective pathway will be accepted by the notebook.

@JonhasSC JonhasSC added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 19, 2024
@JonhasSC JonhasSC requested a review from zmorrell April 19, 2024 17:14
@zmorrell
Copy link
Collaborator

Once the most recent round of revisions has been incorporated, this should be good to pull in I believe. From what I can tell most of the other modified files are linting and removal of unused imports is this correct?

@JonhasSC
Copy link
Collaborator Author

Once the most recent round of revisions has been incorporated, this should be good to pull in I believe. From what I can tell most of the other modified files are linting and removal of unused imports is this correct?

That is correct

@zmorrell
Copy link
Collaborator

Looks good to me, merge when ready.

@JonhasSC JonhasSC merged commit f05c9cb into dev Apr 29, 2024
2 of 4 checks passed
@JonhasSC JonhasSC deleted the AP_Documentation branch May 7, 2024 17:10
JonhasSC added a commit that referenced this pull request Jun 4, 2024
* First commit to package qca with the introduction of a qca/utils module that contains utility functions reused in the photosynthesis and fermi hubbard notebooks

* responded to changes in gitignore and pyproject. Removed requirements.txt as pyproject now handles that

* fixed *.bak typo

* reverted versioning to be prev versions

* Feature/magnetic lattice 1.0 (#5)

* pyliqrt 1.0 support up to qsp estimation

* complete translation to pyliqtr1.0.0 for the magneticlattices notebook

* fixed bug with qsp estimation and went through the notebook

* made the change to pyliqtr1.0 to HightemperatureSuperConductorExample jupyter notebook

* added output for the notebook

* removed old fermi hubbard notebook

* removed unused imports

* added hamiltonian utils file. Would proabbly be moved to some hamiltonian module in the future

* have the notebook use the packaged utility functions

* finalized adding additional features for fermi hubbard support

* fixed pyproject versioning

* successfull running of magnetic lattice using pyliqtr1.0 ontop of modularized functionality

* adding back fermihubbard notebook from main

* forgot to remove requirements file

* changed generate_square_hamiltonian to generate_square_hamiltonian and generate_triangle_hamiltonian to better seperate the two

* changed notebook to respond to PR comments, i.e, changed shape_graph to graph_shape and just manually imported all functions that are needed

* Fermi Hubbard Notebook translation to pyLIQTR1.0 (#3)

* made the change to pyliqtr1.0 to HightemperatureSuperConductorExample jupyter notebook

* added output for the notebook

* removed old fermi hubbard notebook

* removed unused imports

* added hamiltonian utils file. Would proabbly be moved to some hamiltonian module in the future

* have the notebook use the packaged utility functions

* finalized adding additional features for fermi hubbard support

* fixed pyproject versioning

* PhotoSynthesis Notebook pyLIQTR1.0 Migration (#6)

* translated  PyLIQTR1.0 to Photosynthesis example. GSE object was originally just a wrapped PE object, so had to explicitly specify PE objects now for GSEE

* made the change to pyliqtr1.0 to HightemperatureSuperConductorExample jupyter notebook

* added output for the notebook

* whitespace changes t photosynthesis

* removed old fermi hubbard notebook

* removed unused imports

* added hamiltonian utils file. Would proabbly be moved to some hamiltonian module in the future

* have the notebook use the packaged utility functions

* finalized adding additional features for fermi hubbard support

* fixed pyproject versioning

* finished modularizing qca with respect to photosynthesis notebook

* RuCl migration of pyLIQTR-1.0 (#4)

* RuCl migration of pyLIQTR-1.0

* deleted old RuCl notebook

* Fix Trotter printing, update pyproject.toml to use pyLIQTR 1.0.0, update gitignore

* updated notebook to take out unused imports and fix unused colors issue

* structured RuCl notebook to use qca package, fixed plot_T_histogram header in qca.utils.utils

* removed unused functs and imports, changed the plot_histogram funct in qca, and reverted some previous changes, fixed plotting, changed assign_labels to allow generic x y z labels

* added default args to assign_hexagon_labels, removed the commented code for  plotting for qsp, made the labels uppercase

---------

Co-authored-by: Zain Mughal <[email protected]>
Co-authored-by: Zachary Alexander Morrell <[email protected]>

* RuCl documentation update (#7)

* Add documentation to RuCl notebook, Pin pyLIQTR to version 1.0.0, add local field term for resource estimates

* Add explanation of terms in table.  Fix appearance of Heisenberg terms in VSCode

* Add Zeeman terms to Hamiltonian in RuCl, fix typos

* State preparation ru cl (#13)

* Add state preparation documentation and fix RNG seeding

* fixed time varying terms and added approprimate terms for rucl lattice

* Add resource estimate for state preparation and measurement

* Add state prep and measurement resource estimates section, attempt to fix figures

* Reduce image size of Figure 1

* Remove unused variable from prepare_measurement_rucl

---------

Co-authored-by: Jonhas Colina <[email protected]>

* fixed gsee issue where it wasn't counting the current number of gates and depth for GSEE in the fermihubbard notebook (#12)

* Continuous Integration + Unit Test Suite (#17)

* pylint github action test

* changing action versioning and only building for 3.11 to check

* fixing again python versioning

* trying out mypy github action

* adding a on flag to mypy

* changing mypy file

* trailing dash and adding name to mypy

* removing name key

* changed settings for mypy

* adding config file for pr help

* forgot to add build config for mypy pr yml

* fixing syntax issue

* seperating build and mypy builds for pr

* seeing if this works now

* changing build configs for mypy

* adding -name for config

* fixing indentation

* see if works with pr

* see if works with pr

* checking if pyright works

* see if this fixes mypy pr integration

* see if this fixes mypy pr integration

* see if this fixes mypy pr integration

* see if this fixes mypy pr integration

* see if this fixes mypy pr integration

* see if this fixes mypy pr integration

* added test file and test config

* fixing ci

* fixing ci

* fixing ci

* fixing ci

* fixing ci

* fixing ci

* added more test cases

* adding test file to perform testing on hamiltonian utils file

* CI - Fixes/Changes (#21)

* testing new yml file for testing

* making some changes and removed erroneous requirements txt file

* reformated mypy config file

* other lint test

* fixing indent

* changing pylint action to see if work

* adding temp files to aid in testing

* trying another one

* testing dynamic badge pylint

* test requirements

* Updated pylint badge

* have tests run on pr

* changing settings for test file

* testing branch protection

* reverting back appropriate test to confirm that branch protection works

* renamed file to generate pylint-badge and cleaned up config files

* adding code coberage report

* cleaning things up and fixed FH NB keyboard correct error

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Json Standard Output Generation for Notebooks (#18)

* able to generate resource estimates as json, and streamlined it for trotter and qsp simulation. Should add trotter and qsp in utils for now so all notebooks will be using the same functions

* having notebooks generate jsons for logical resource estimates

* fixed json files to generate subcircuit info in one json file

* have the magnetic lattice notebook generate resource estimates as json files

* having the fermi hubbard notebook generating the appropriate re as a json

* adding unit test case for testing gen_resource_estimate

* have the json generating both subcircuit info and made the subcircuit info prettier

* ran fermihubbard to confirm generating appropriate json

* adding pdfs for changed notebooks. Modified notebooks to use estimate_qsp and estimate_trotter through utility functions to then be reused

* changed a bit the wording to include the fact that the trotter and qsp estimation functions are now defined as utilituy functions in the utils module

* removed the subcircuit occurences being multiplied by num magnus steps

* Updated pylint badge

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Fixing the License for qca's pyproject.toml (#23)

* fix license issue for qca

* lowercase license

* Bugfix for generating appropritate resource estimates for trotter circuit and for outputting trotter circuits (#28)

* indent fixes

* commit to fix the resource estimates generated for trotter circuits and for outputing appropriate qasm for trotter circuit and for the cpt trotter circuit

* name issue for subcircuit info fix

* change subcircuit key Trotter_Step -> Trotter_Unitary

* Updated pylint badge

* added param in gen_resource_estimate in utils_test to have tests run

* modifying the standard on how the json schema should look like. There are now three layers. Changed is_approximate flag to is_extrapolated

* modified MagneticLattice notebook to use correct function signature

* Modified RuCl notebook to use correct function signature for generating resource estimates

* Modified photosynthesis notebook to use correct function signature for generating resource estimates

* modified HTSC notebook to use correct function sig for circuit_estimate

* Updated pylint badge

* missed to add num_qubits key on second layer

* changed type of evolution time to float

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Patch to generate Clifford + T for InverseComposite subcircuit for qsp circuits (#29)

* generating Clifford + T for InverseComposite subcircuit for qsp circuits

* Updated pylint badge

* merged with dev

* have trotter re use print_to_openqasm as well

* remove unused import

* Updated pylint badge

* fixing merge conflicts again

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Quantum Chemistry Notebook Documentation (#30)

* Updated documentation content for quantum chemistry notebook about initial state prep and QPE for GSEE

* Added additional information regarding HF, measuring activation energy, and cleaning up the code

* changing name of xyz file from Co4O4 to Co2O9H12

* improved documentation for quantum chemistry notebook

* Updated pylint badge

* added a references section in the quantum chemistry notebook

* pylint fixes for algo_utils

* some pylint fixes for hamiltoniain_utils

* import grouping pylint fixes

* some pylint changes for utils.py

* Updated pylint badge

* Added a sentence to clarify the notebooks computational targets

* reran ap notebook for grabbing re

* made changes to specify how the scaling factor is defined

* reran notebook and assured resource estimates follow standard and makes sense

* Updated pylint badge

* fixed typo for nb

* adding clarified paragraph given feedback

* fixed typos

* rewrote active space comment

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* HTSC and RuCl Documentation Updates (#32)

* Add HTSC Documentation updates and allow for multiple virtual environments

* Add documentation for RuCl notebook

* Fix output directory in HTSC example

* Fix typos in HTSC and RuCl notebooks.

* Update RuCl and HTSC PDFs with latest versions

* WIP: functionality for new json schema and for complete decomposition (#34)

* functionality for new json schema and for complete decomposition. WIP

* Updated pylint badge

* chemistry utils added

* adding script for resource generation for quantum chemistry notebook

* Add support for new output format to HTSC notebook

* fixing chemistry utils for generatig resource estimates appropriately

* modified molecular_info to keep track of more information for the json schema

* removed unnecessary file

* added scripts directory

* added estimatemetadata for rucl notebook

* Updated pylint badge

* fixed test cases to remove a key that no longer appears in resource estimates

* Add Two Band HTSC Python script

* Add one band HTSC script for running from command line

* removed duplicate decomposition

* included the estimatemetadata for the quantum chemistry notebook

* making sure for metadata for qsp evaluation for rucl notebook is done

* wip improvemnts to rucl script

* modified RuCl-RE file to include lattice size as arg and not over a range

* fixed state prep cell for RuCl notebook to gen resource estimate appropriately

* making metadata optional for resource estimates

* Updated pylint badge

* made the metadata for resource estimates optional and created a utility function for qpe via a trotterized subprocess

* removing utility estimates and defaulting utility estimates to None

* Reran RuCl notebook with removed utility estimates

* Reran magnetic lattice notebook with removed utility estimates

* Reran quantum chem notebook with removed utility estimates

* reran HTSC notebook with removed utility estimates

* Updated pylint badge

* Reset default values for HTSC scripts

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Zachary Alexander Morrell <[email protected]>
Co-authored-by: Zachary Alexander Morrell <[email protected]>
Co-authored-by: Zain Mughal <[email protected]>
Co-authored-by: Jonhas Saul Colina - 391643 <[email protected]>

* Some cleanup prior to merging dev -> main (#35)

* cleaning up some functions, changed type return for circuit_estimate to correspond to returning a dict

* Updated pylint badge

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* WIP: Add three band HTSC instance and fix t3 terms (#38)

* Add three band HTSC instance and fix t3 terms

* Updated pylint badge

* Add three band script; Fix one and two band scripts

* Add value and repetition fields to HTSC scripts

* made sure to use phase_offset in gsee function call

* Updated pylint badge

* typo fixes to HSTC notebook

* fixed test suite for fermihubbard

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonhas Colina <[email protected]>

* PR to allow user to specify the inclusion of nested resource estimates (#39)

* commit to allow switching between the inclusion of nested resource estimates or not

* modified notebooks to make sure that generated resource estimates look good. Modified some parameters to adhere to new function signatures

* Updated pylint badge

* removed trailing commas

* Updated pylint badge

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* made changes to the README to note where the user can find exotic phases and dicke model notebooks

* changed feature leader to notebook/ for exotic phases and dicke model notebook branches

---------

Co-authored-by: Zain Mughal <[email protected]>
Co-authored-by: Zain Mughal <[email protected]>
Co-authored-by: Zachary Alexander Morrell <[email protected]>
Co-authored-by: zmorrell <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Zachary Alexander Morrell <[email protected]>
Co-authored-by: Zain Mughal <[email protected]>
Co-authored-by: Jonhas Saul Colina - 391643 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants