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

✨ Upgrade Diagnosis Capabilities #20

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

DRovara
Copy link
Collaborator

@DRovara DRovara commented Sep 19, 2024

Description

This pull request improves the diagnosis capabilities, in particular, how it interprets the uses of variables:

  • We now recognise the uses of variables inside custom gate calls. E.g. data dependencies now spread into the contents of custom gates.
  • This includes a better analysis of substitutions. Renamings of variables through custom gate calls are now covered.
  • Compact gate calls on full registers are now also understood. E.g. in the code qreg q[2]; x q; h q[0]; we can now recognise the data dependency between x q and h q[0] even though the variable is not exactly equal.

This pull request also introduces several new test to check these features.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

…tions, but it is not yet possible to "inspect out" of a custom gate
…ction call, even if the diagnosis was started in the same scope

Previously, data dependency analysis was only able to step outside of functions that were entered during the analysis (i.e. where the analysis knows from where the function was entered). Now, the parameter `includeCallers` can be passed to allow the analysis to step out. In this case, all possible callers will be included as dependencies.
…he full register (e.g. `x q` rather than `x q[0]`)
@DRovara DRovara added c++ enhancement New feature or request labels Sep 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 99.08257% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.7%. Comparing base (fc5c418) to head (3285634).

Files with missing lines Patch % Lines
src/backend/dd/DDSimDebug.cpp 98.2% 1 Missing ⚠️
src/backend/dd/DDSimDiagnostics.cpp 99.0% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #20     +/-   ##
=======================================
+ Coverage   98.5%   98.7%   +0.2%     
=======================================
  Files          9       9             
  Lines       1399    1582    +183     
  Branches     241     289     +48     
=======================================
+ Hits        1379    1563    +184     
+ Misses        20      19      -1     
Flag Coverage Δ
cpp 98.7% <99.0%> (+0.2%) ⬆️
python 100.0% <ø> (ø)
Files with missing lines Coverage Δ
src/common/parsing/CodePreprocessing.cpp 98.6% <100.0%> (+0.1%) ⬆️
src/common/parsing/Utils.cpp 100.0% <100.0%> (ø)
src/backend/dd/DDSimDebug.cpp 98.4% <98.2%> (+0.2%) ⬆️
src/backend/dd/DDSimDiagnostics.cpp 99.6% <99.0%> (+0.2%) ⬆️

@DRovara DRovara merged commit 8d6a313 into main Sep 19, 2024
27 checks passed
@DRovara DRovara deleted the feature/diagnosis-into-custom-gates branch September 19, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants