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

fix 🐛 Fix bug on "gate" in gate names #8

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Conversation

DRovara
Copy link
Collaborator

@DRovara DRovara commented Aug 9, 2024

Description

Previously, the debugger checked whether an instruction is a custom gate definition by testing if its text contains "gate ". Of course, this could fail if a custom gate or a register name ends with "gate".

With this pull request, we now store a set of custom gate definitions instead. Now, only the CodePreprocessor has to check for the "gate" keyword, and in this step, we have access to the tokenized code, so when we encounter the "gate" token, we can be sure it is actually a custom gate.

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.

@codecov-commenter
Copy link

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.4%. Comparing base (89928c6) to head (5301615).

❗ 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      #8     +/-   ##
=======================================
+ Coverage   65.1%   70.4%   +5.3%     
=======================================
  Files         13      13             
  Lines       1599    1599             
  Branches     230     229      -1     
=======================================
+ Hits        1042    1127     +85     
+ Misses       557     472     -85     
Flag Coverage Δ *Carryforward flag
cpp 78.0% <100.0%> (+6.0%) ⬆️
python 18.7% <ø> (ø) Carriedforward from 89928c6

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
src/backend/dd/DDSimDebug.cpp 83.0% <100.0%> (+4.0%) ⬆️
src/common/parsing/CodePreprocessing.cpp 96.4% <100.0%> (ø)

... and 1 file with indirect coverage changes

@DRovara DRovara merged commit 7469237 into main Aug 9, 2024
28 checks passed
@DRovara DRovara deleted the bugfix/gate-in-gate-name branch August 9, 2024 13:58
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.

2 participants