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

add basic expectation value benchmark #96

Merged
merged 5 commits into from
Nov 27, 2024
Merged

Conversation

natestemen
Copy link
Member

closes #66

Review notes

  1. How should I store the results? Right now they are just printed to stdout, which I know is not ideal.
  2. I had to copy a lot of code from cirq_compile, qiskit_compile, and pytket_compile. Should I DRY this up by moving it to common.py?
  3. The circuit and observable were chosen somewhat arbitrarily to get things set up. Please let me know if you have input here.

@natestemen
Copy link
Member Author

@jordandsullivan I've made the changes we discussed today during standup. Ready for review 🫡.

@natestemen natestemen self-assigned this Nov 27, 2024
@jordandsullivan jordandsullivan added this to the 0.2.0 milestone Nov 27, 2024
@jordandsullivan
Copy link
Collaborator

Okay because the way you were storing data was different than the existing benchmarks, I did some reorganizing of the results and updated some naming conventions: https://github.com/unitaryfund/ucc/tree/97-reorg-files

I'm not sure the best practice for merging everything into main, but #97 should contain everything here and the data format updates.

@natestemen
Copy link
Member Author

I'm not sure the best practice for merging everything into main

Merge this PR (if it's approved), then open a PR for your commits on top of it? No strong feelings.

the way you were storing data was different than the existing benchmarks

JSON usually makes more sense to me since this avoids manipulating lists of data, but I agree it's best to have everything in the same format. Thanks for working on it!

@jordandsullivan jordandsullivan merged commit fa37872 into main Nov 27, 2024
Copy link
Collaborator

@jordandsullivan jordandsullivan left a comment

Choose a reason for hiding this comment

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

Lgtm

jordandsullivan added a commit that referenced this pull request Dec 3, 2024
* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
jordandsullivan added a commit that referenced this pull request Dec 3, 2024
* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
jordandsullivan added a commit that referenced this pull request Dec 3, 2024
* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
jordandsullivan added a commit that referenced this pull request Dec 3, 2024
* Initial dockerfile, breaking out requirements.

* Install requirements in Dockerfile, add -e pip flag

* Automated deploy script to AWS

* merge in new shell script changes (#104)

* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>

* Update PyTKET rebase pass

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
jordandsullivan added a commit that referenced this pull request Dec 3, 2024
* remove unnecessary script

* merge in recent changes from main  (#106)

* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>

* merge in main (#107)

* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>

* Delete benchmarks/scripts/deploy_benchmark_task.py

No longer needed, build-spec lives on AWS

* remove unnecessary .gitignore line

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
jordandsullivan added a commit that referenced this pull request Dec 6, 2024
* Add a couple comments, correct typo

* Add final basis set remapping step to transpilation when passed a Qiskit backend

* First hardware benchmark notebook

* merge in main (#109)

* Initial dockerfile, breaking out requirements.

* Install requirements in Dockerfile, add -e pip flag

* Automated deploy script to AWS

* merge in new shell script changes (#104)

* Move and expand test for logical equivalence

Test moved to test_compile.py

* Delete test_circuit_equivalence.py

Test moved to test_compile.py

* Remove unnecessary qubit parameterizations

Remove unnecessary qubit parameterizations in `test_compiled_circuits_equivalent` and `test_compilation_retains_gateset`

* add basic expectation value benchmark (#96)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Add bug label to new bug report issues

* Add feature tag to feature template issues

* 97 reorg files (#98)

* add basic expectation value benchmark

* move compile function to `common.py`

* write data out to json

* make data pipeline more functional

* simplify real check

* Update naming convention for different benchmarks

* Dry up save results into common function

* Fix init import issue

* Move gate_counters into scripts/common.py for simplicity

* Fix notebook errors, remove old data

* Remove duplicate funciton definitions

* Remove duplicate lines

* Add folder to docstring, call out alterntive benchmark name

---------

Co-authored-by: nate stemen <[email protected]>

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>

* Update PyTKET rebase pass

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>

* Real hardware benchmark

* Remove unrelated file

* Remove unnecessary .gitignore line

---------

Co-authored-by: Misty-W <[email protected]>
Co-authored-by: nate stemen <[email protected]>
@jordandsullivan jordandsullivan deleted the nts-expval-benchmark branch December 6, 2024 22:14
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.

Add expectation value benchmark
2 participants