-
Notifications
You must be signed in to change notification settings - Fork 10
🐛 Fix of duplicate qubit label generation during synthesis #327
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
base: main
Are you sure you want to change the base?
🐛 Fix of duplicate qubit label generation during synthesis #327
Conversation
…optional creation of inline stack so that release builds can skip this potentially unneeded step in the synthesis process
…bly causes by std::unique_ptr default holder type created via python bindings
…be set when adding qubits for variables when 'feature' is not activated in synthesis settings.
…label in circuit view
…rovide information how information can be queried in GUI
…inal qubit label GUI elements are disabled if the value of the label is empty.
…e information widget
…bits when set cannot be a nullptr or empty since the inline stack should contain at least one entry (i.e. the main module of a SyReC program).
…ne qubit information
…of identifier of module and any of its parameters or local variables
…e hard-coded redundant definitions of qubit label prefix with a single unified "source of truth"
…terOrVariable() of syrec::Module.
…nto syrec::InternalQubitLabelBuilder
…ine information when said feature is activated in synthesis settings
…its generated during synthesis of module synthesis shared same inline stack instance instead of the latter creating a new copy on every call. Added tests for qubit inline information for N-dimensional variables.
…dability of test code
… synthesis algorithms if qubit inline information should not be recorded
…on in annotatable quantum computation
…that the qubit is clickable in the CircuitView and selectable in the qubit label combobox of the qubit inline information widget
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…in synthesis base implementation
…t inlining stack as well as missing tests for the latter
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.
Looks reasonable to me. Just a handful of minor comments.
src/CMakeLists.txt
Outdated
if(NOT TARGET ${MQT_SYREC_TARGET_NAME}-antlr-parser OR NOT TARGET | ||
${MQT_SYREC_PARSER_TARGET_NAME}-synthesis) | ||
add_library(${MQT_SYREC_TARGET_NAME}-utils INTERFACE) | ||
target_include_directories( | ||
${MQT_SYREC_TARGET_NAME}-utils | ||
INTERFACE ${MQT_SYREC_INCLUDE_BUILD_DIR}/algorithms/synthesis/internal_qubit_label_builder.hpp) | ||
target_link_libraries(${MQT_SYREC_TARGET_NAME}-utils INTERFACE MQT::ProjectWarnings | ||
MQT::ProjectOptions) | ||
add_library(MQT::SyReC-Utils ALIAS ${MQT_SYREC_TARGET_NAME}-utils) | ||
endif() |
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.
I am personally not the biggest fan of utils libraries as they tend to become a hot mess of unrelated functions.
This clearly belongs to the synthesis part of the syrec library. Why not add it to one of the existing targets?
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.
A separate utility library might be overkill, now the header file of the library is only included in the synthesis as well as antlr-parser library, it is included in the latter to prevent having to link the synthesis library for a single header file, with the utilities library being removed from all other targets. @burgholzer Are these changes sufficient to resolve your comment?
…ng only a single header file
Description
This PR introduces the following changes in both the C++ as well as the python library.
C++:
syrec::AnnotatableQuantumComputation
.syrec::Properties
passed to the synthesis algorithms) generated and stored in thesyrec::AnnotatableQuantumComputation
(queriable viasyrec::AnnotatableQuantumComputation::getInliningInformationOfQubit(...)
), to provide debug information about the origin of the qubit to the user. This feature needs to be explicitly activated with the qubit label combination generation of the previous bullet point not being effected by this feature.syrec::QubitInlineStack
,syrec::QubitInliningStack::QubitInliningStackEntry
andsyrec::AnnotatableQuantumComputation::InlinedQubitInformation
were added.MAIN_MODULE_IDENTIFIER_CONFIG_KEY
andGENERATE_INLINE_DEBUG_INFORMATION_CONFIG_KEY
in\include\algorithms\syrec_synthesis.hpp
to improve the activation of synthesis features insyrec::Properties
instead of relying on hard-coded strings in the source files.Python:
.pyi
files are used to document the python package, as is the case in themqt-core
project.The displayed qubit inline information when the feature is deactivated/activated is the following:

Inline information about a qubit can be selected in the
syrec-editor
by:Fixes #278
Checklist: