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

New Applications + New Features DEV -> Main #70

Merged
merged 81 commits into from
Jan 29, 2025
Merged

New Applications + New Features DEV -> Main #70

merged 81 commits into from
Jan 29, 2025

Conversation

JonhasSC
Copy link
Collaborator

This PR is focused on merging features on Dev onto Main. This includes new features such as:

  • improved SQ decomposition
  • improved quantum chem workflows using DF block encoding + Qubitized Phase Estimation
  • Script to support Quantum DF + QPE
  • Improved CPT transformations + CPT resource estimate extraction
  • Quantum Chromodynamics Application + Script
  • Maglab Application 2 + Script
  • Improvement on grabbing metadata for an application
  • Exotic Phases Script

JonhasSC and others added 30 commits October 12, 2024 00:26
* wrote some down and added block of code for state prep

* wrote more on background of application and initial state

* finished writing background for qcd problem

* dynamics implemented for qcd

* cleaned up nb

* getting resource estimates now from qcd that actually includes correct neighbor interactions

* cleaned up qcd notebook

* cleaned up qcd notebook

* fixed bug for normalization factor

* made changes to random variables to grab random numbers from a normal gaussian distribution and changed evolution time to be sqrt(N) where N is the number of neutrinos

* modified grabbing params for hamiltonian generation

* adding script file to generate resource estimates for QCD

* modified gitignore to account for DS_STORE files

* tweaks to qcd script

* added files and section for analysis of resource estimates from performing a sweep

* Updated pylint badge

* Updated pylint badge

* improve readability and fix typos

---------

Co-authored-by: Jonhas Saul Colina <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Zain Mughal <[email protected]>
… to not include disclaimer regarding WIP notebooks (#57)
…ument ordering in the estimate methods to be more consistent
…lso fixed the convention with using objects as arguments and defaulting them to None
github-actions bot and others added 18 commits January 7, 2025 23:54
…sts, but value_per_circuit or repetetions_per_application is undefined
HotFix/Feature: added value_per_t_gate to the resource estimate
* Adding application 2: GSEE in RuCl notebook

* Added RuCL GSEE script, modified RuCl dynamics script, updated RuCl pdf

* Consolidated RuCl scripts to one with flag for mode, added changes to RuCl notebook.

* Removed QPE cells

* modified syntax, added csv file input for rucl script

* updated rucl pdf

* hot fix for rucl-application-2, in regards to init state, input data csv file, and upgrade pyliqtr version req

* changes to syntax and to clean up code

* add row and lattice size to circuit name for notebook

* changes to make sure the graph is not being built more than once

* changes to notebook for minimizing building rucl graph

* notebook function call for ham gen

* updated pdf for rucl
* new pyLIQTR version

* qchem script cleanup

* cleaned up value_per_t_gate and added analytical use case for gsee

* made change to allow unique file name when performing a sweep

* responded to issue of improper gate synth accuracy. pyLIQTR handles it differently depending on the function?

* allow trotter to use use_analytical

* fix typo

* Updated pylint badge

* doing 1e-10 rther than string

* accidentally scaling num_qubits

* Updated pylint badge

* adding exotic phases script and moving print statement for generating trotterized subprocess gsee to AFTER we create circuit

* changed field from value_per_circuit to value. Additionally, cleaned up some code to make sure we getting right value per t gate

* fixed capitalization on ars

---------

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

@zain2864 zain2864 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a first run of this PR, I am still WIP. Here are some things I have seen so far.

scripts/AP-RE.py Show resolved Hide resolved
scripts/AP-RE.py Outdated Show resolved Hide resolved
scripts/AP-RE.py Outdated Show resolved Hide resolved
scripts/AP-RE.py Outdated Show resolved Hide resolved
scripts/DickeModel.py Outdated Show resolved Hide resolved
scripts/DickeModel.py Show resolved Hide resolved
scripts/ExoticPhasesRe.py Outdated Show resolved Hide resolved
scripts/ExoticPhasesRe.py Show resolved Hide resolved
scripts/QCD-RE.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@zain2864 zain2864 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went over it again, and with the new fixes this LGTM!

@JonhasSC JonhasSC merged commit 6e95be5 into main Jan 29, 2025
2 of 4 checks passed
@@ -193,8 +202,6 @@
"print()\n",
"print('Tavis-Cummings Hamiltonian')\n",
"print(H_tavis_cummings)\n",
"#print(g_dicke.nodes)\n",
"#print(g_dicke.edges)\n",
"pos = get_node_attributes(g_dicke, 'pos')\n",
"labels = get_node_attributes(g_dicke, 'label')\n",
"draw(g_dicke, pos=pos, labels=labels, with_labels=True)\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep the commented out lines below?

"name": "stderr",
"output_type": "stream",
"text": [
"/Users/gsgrattan/.conda/envs/qc-apps/lib/python3.11/site-packages/cotengra/hyperoptimizers/hyper.py:33: UserWarning: Couldn't import `kahypar` - skipping from default hyper optimizer and using basic `labels` method instead.\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rerun to remove warning

"name": "stderr",
"output_type": "stream",
"text": [
"/Users/gsgrattan/.conda/envs/qc-apps/lib/python3.11/site-packages/cotengra/hyperoptimizers/hyper.py:33: UserWarning: Couldn't import `kahypar` - skipping from default hyper optimizer and using basic `labels` method instead.\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rerun to remove warning

@@ -184,7 +179,8 @@
"outputs": [],
"source": [
"molecular_hamiltonians = []\n",
"pathway = [1, 14, 15, 16, 24, 25, 26, 27]\n",
"# pathway = [1, 14, 15, 16, 24, 25, 26, 27]\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the commented out values?

"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Total time to run through this notebook: 4212.176184124999\n"
"[juliapkg] Found dependencies: /Users/jonhas/envs/qca/lib/python3.12/site-packages/juliapkg/juliapkg.json\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to suppress this output from julia?

"\n",
"from qca.utils.utils import plot_histogram, gen_resource_estimate, re_as_json, EstimateMetaData\n",
"from qca.utils.utils import plot_histogram, gen_resource_estimate, re_as_json, QSPMetaData, TrotterMetaData,GSEEMetaData, circuit_estimate\n",
"from qca.utils.algo_utils import estimate_qsp, estimate_trotter, gsee_resource_estimation\n",
"from qca.utils.hamiltonian_utils import flatten_nx_graph, assign_hexagon_labels, pyliqtr_hamiltonian_to_openfermion_qubit_operator"
]
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the cell below there are 4 instances of \label for different equations, which is an undefined control sequence in KaTeX. They aren't referenced anywhere so it is safe to delete them to remove this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants