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 out-of-bounds error in ZX EdgeIterator and needless dummy register in empty circuit construction #758

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

burgholzer
Copy link
Member

Description

This PR fixes an out-of-bounds error in the ZX packages EdgeIterator that would happen whenever a ZX diagram would only consist of eliminated nodes.

In addition, this PR fixes an oversight in the QuantumComputation constructor where an empty qubit register "q" was added even on a zero-qubit circuit.

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.

@burgholzer burgholzer added fix Fix for something that isn't working ZX Anything related to the ZX package Core Anything related to the Core library and IR c++ Anything related to C++ code labels Nov 25, 2024
@burgholzer burgholzer added this to the ZX Package Improvements milestone Nov 25, 2024
@burgholzer burgholzer self-assigned this Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.1%. Comparing base (7ef1ccb) to head (4ed96d5).
Report is 141 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #758   +/-   ##
=====================================
  Coverage   92.1%   92.1%           
=====================================
  Files        125     125           
  Lines      13770   13775    +5     
  Branches    2157    2160    +3     
=====================================
+ Hits       12684   12690    +6     
+ Misses      1086    1085    -1     
Flag Coverage Δ
cpp 91.8% <100.0%> (+<0.1%) ⬆️
python 99.7% <ø> (ø)
Files with missing lines Coverage Δ
include/mqt-core/ir/QuantumComputation.hpp 91.9% <100.0%> (+<0.1%) ⬆️
src/zx/Utils.cpp 83.1% <100.0%> (+1.7%) ⬆️

@burgholzer burgholzer enabled auto-merge (squash) November 25, 2024 21:50
@burgholzer burgholzer merged commit 04a1b37 into main Nov 25, 2024
28 checks passed
@burgholzer burgholzer deleted the zx-fixes branch November 25, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code Core Anything related to the Core library and IR fix Fix for something that isn't working ZX Anything related to the ZX package
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant