q-optimize / c3

Toolset for control, calibration and characterization of physical systems
https://c3-toolset.readthedocs.io/
Apache License 2.0
66 stars 36 forks source link

Physics simulation for Qiskit circuits #165

Closed lazyoracle closed 2 years ago

lazyoracle commented 2 years ago

What

Physics simulation for Qiskit circuits

Why

Simulating qiskit circuits by solving full physical dynamics of the system model (incl of classical electronics and imperfections) provies an easy interface to the rich simulator of c3-toolset

How

Use the (now no longer) new methods for evaluating qasm representation of sequences

Remarks

Pending TODOs

c3/qiskit/c3_backend.py:275:        # TODO List correct set of basis gates
c3/qiskit/c3_backend.py:383:        # TODO (Check) Assume all qubits have same Hilbert dims
c3/qiskit/c3_backend.py:389:        # TODO set simulator seed, check qiskit python qasm simulator
c3/qiskit/c3_backend.py:422:        # TODO a more sophisticated readout/measurement routine
c3/qiskit/c3_backend.py:477:        # TODO Coupling map from config file
c3/qiskit/c3_backend.py:479:        # TODO Basis gates from config file
c3/qiskit/c3_backend.py:552:        # TODO only simulate qubits used in circuit
c3/qiskit/c3_backend.py:562:        # TODO (Check) Assume all qubits have same Hilbert dims
c3/qiskit/c3_backend.py:568:        # TODO set simulator seed, check qiskit python qasm simulator
c3/qiskit/c3_backend.py:578:        # TODO generate shots style readout ref Perfect Simulator
c3/qiskit/c3_backend.py:579:        # TODO a sophisticated readout/measurement routine (w/ SPAM)

Checklist

Please include and complete the following checklist. Your Pull Request is (in most cases) not ready for review until the following have been completed. You can create a draft PR while you are still completing the checklist. Check the Contribution Guidelines for more details. You can mark an item as complete with the - [x] prefix

lgtm-com[bot] commented 2 years ago

This pull request fixes 2 alerts when merging 0370d011fd4bb1948203a1160847bffd38a04f91 into af38dae1e85d6016783467c3167f145034f9ff78 - view on LGTM.com

fixed alerts:

shaimach commented 2 years ago

When we talk next time, please explain this to me.

On Wed, 29 Dec 2021, 5:03 Anurag Saha Roy, @.***> wrote:

What

Physics simulation for Qiskit circuits Why

Simulating qiskit circuits by solving full physical dynamics of the system model (incl of classical electronics and imperfections) provies an easy interface to the rich simulator of c3-toolset How

Use the (now no longer) new methods for evaluating qasm representation of sequences Remarks

Add notes on possible known quirks/drawbacks of this solution. If this introduces an API-breaking change, please provide an explanation on why it is necessary to break API compatibility and how users should update their notebook/script workflows once this PR is merged. Checklist

Please include and complete the following checklist. Your Pull Request is (in most cases) not ready for review until the following have been completed. You can create a draft PR while you are still completing the checklist. Check the Contribution Guidelines https://github.com/q-optimize/c3/blob/dev/CONTRIBUTING.md for more details. You can mark an item as complete with the - [x] prefix

  • Tests - Added unit tests for new code, regression tests for bugs and updated the integration tests if required
  • Formatting & Linting - black and flake8 have been used to ensure styling guidelines are met
  • Type Annotations - All new code has been type annotated in the function signatures using type hints
  • Docstrings - Docstrings have been provided for functions in the numpydoc style
  • Documentation - The tutorial style documentation has been updated to explain changes & new features
  • Notebooks - Example notebooks have been updated to incorporate changes and new features
  • Changelog - A short note on this PR has been added to the Upcoming Release section

You can view, comment on, or merge this pull request online at:

https://github.com/q-optimize/c3/pull/165 Commit Summary

File Changes

(6 files https://github.com/q-optimize/c3/pull/165/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/q-optimize/c3/pull/165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH3Q4IAOROZC3NTSKG4F3LUTJ3ANANCNFSM5K5FFLLQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

codecov[bot] commented 2 years ago

Codecov Report

Merging #165 (eac7c24) into dev (af38dae) will increase coverage by 0.40%. The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #165      +/-   ##
==========================================
+ Coverage   71.81%   72.22%   +0.40%     
==========================================
  Files          36       36              
  Lines        5475     5476       +1     
==========================================
+ Hits         3932     3955      +23     
+ Misses       1543     1521      -22     
Impacted Files Coverage Δ
c3/experiment.py 78.41% <ø> (+0.35%) :arrow_up:
c3/libraries/propagation.py 57.09% <0.00%> (ø)
c3/qiskit/c3_backend.py 89.78% <100.00%> (+10.86%) :arrow_up:
c3/qiskit/c3_backend_utils.py 60.71% <0.00%> (+1.78%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update af38dae...eac7c24. Read the comment docs.

lgtm-com[bot] commented 2 years ago

This pull request fixes 2 alerts when merging 1ca37326106a3d07f8f52b64051688e662fe2e79 into af38dae1e85d6016783467c3167f145034f9ff78 - view on LGTM.com

fixed alerts:

lgtm-com[bot] commented 2 years ago

This pull request fixes 2 alerts when merging d5da67f751aefff503947bd310bb92665525a390 into af38dae1e85d6016783467c3167f145034f9ff78 - view on LGTM.com

fixed alerts:

lgtm-com[bot] commented 2 years ago

This pull request fixes 2 alerts when merging eac7c243ad8d6c4b8c5c36889116d0c0e86e61f4 into af38dae1e85d6016783467c3167f145034f9ff78 - view on LGTM.com

fixed alerts: