-
Notifications
You must be signed in to change notification settings - Fork 10
♻️ Removal of boost dependency from synthesis and simulation part of library #240
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
♻️ Removal of boost dependency from synthesis and simulation part of library #240
Conversation
…m synthesis classes were removed
…he line aware synthesis
…hat are also considered for all added gates of a circuit
…ntainer if they did not exist in the aggregate prior to the local scope
…er used in toggling operations of helper line.
…c_bitset datastructure
…naming scheme of other objects of mqt.syrec python library. Updated python library documentation
…build errors in documentation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Call-/UncallStatements are synthesized by inlining the statements of the called module, here the decrement operation would be inlined in line 6. Currently the gates generated for the inlined statements will have the line number of the original statement annotated (e.g. line 2 for the inlined decrement operation) but one could also annotate the inline line number instead. However, when the called module contains more than a single statement, the inlined statement line number would now overlap with the line numbers of the statements following the call. One solution could be to annotate additional information to the inlined statement like the following: Line number: 6 |
…circuit, added validation that control lines passed to local control line scopes are known in circuit
… control line scopes
…t is not added in constructor of Circuit class
…longer used to filter user provided control lines during creation of gate.
…ntrol lines no longer being filtered by deregistered control lines in propagation scopes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the contribution here! This is much appreciated.
I skimmed through all of the changes, and they look reasonable to me.
Considering the volume of testing, I believe we should merge this and address any issues as soon as we identify them.
…ger throws index-out-of-range error (#281) ## Description Prio to the first refactoring of the synthesis algorithm components for the transition to MQT Core (see issue #29) the check for repeating qubit indices in the operands of an expression via `SyrecSynthesis::checkRepeats()` did contain the following check: ```cpp bool SyrecSynthesis::checkRepeats() { std::vector checkLhsVec(...); std::vector checkRhsVec(...); ... for (auto const& i: checkLhsVec) { for (auto const& j: checkRhsVec) { if (i == j) { ... return true; } } } return false; } ``` And was refactoring in #240 to which refactored introduced the invalid assumption that the `checkLhsVec` and `checkRhsVec` containers have the same size which is not the case in an expression of the form `(a ^ (b ^ c))` (`checkLhsVec.size()` = 2, `checkRhsVec.size()` = 1) and will lead to an index-out-of-range access in said expression. ```cpp bool SyrecSynthesis::checkRepeats() { std::vector checkLhsVec(...); std::vector checkRhsVec(...); bool foundRepeat = false; ... for (std::size_t i = 0; i < checkLhsVec.size() && !foundRepeat; ++i) { foundRepeat = checkLhsVec[i] == checkRhsVec[i]; } ... return foundRepeat; } ``` This PR fixes the index-out-of-range access. Fixes #280 ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [X] The pull request only contains commits that are related to it. - [X] I have added appropriate tests and documentation. - [ ] I have made sure that all CI jobs on GitHub pass. - [X] The pull request introduces no new warnings and follows the project's style guidelines. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
This PR removes parts of the boost dependency from the synthesis and simulation part of the library
dynamic_bitset
boost data structure was replaced with the custom data structureNBitValuesContainer
offering only a reduced feature set (required for the functions of thesimple_simulation
interface ) of thedynamic_bitset
(see boost reference interface).adjacency_list
andsignal
boost dependencies were removed due to no longer being needed in the refactored synthesis code.boost::spirit
andboost::fusion
. This dependency is removed in ♻️ Replacement of boost::fusion and boost::spirit with ANTLR4 components for SyReC grammar and parser #220Towards #27
Checklist: