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

♻️🚚 Move density matrix functionality to mqt-ddsim and simplify mqt-core implementation #826

Open
burgholzer opened this issue Feb 11, 2025 · 0 comments
Labels
c++ Anything related to C++ code code quality Code quality improvements DD Anything related to the DD package help wanted Extra attention is needed minor Minor version update refactor Anything related to code refactoring usability Anything related to usability

Comments

@burgholzer
Copy link
Member

The density matrix representation (dNode, dEdge, etc.) is only used in the deterministic noise-aware simulator that is part of mqt-ddsim and nowhere else. Together with the NoiseFunctionality, the respective code still mostly lives in mqt-core.
While this might have made sense in the beginning, it makes the code of the DD Package in mqt-core substantially more complex. With no one actively working on the noise functionality and no one around for actively maintaining it, this has become more of a burden than a benefit.

I would thus propose to move the density matrix code entirely to mqt-ddsim into a separate DensityMatrixPackage that implements all the respective functionality.
This would entail:

  • creating such a class with all the required functionality in mqt-ddsim, which essentially means some degree of code duplication. But I would deem that acceptable here.
  • in the course of creating that package, simplifying all the functionality that is now only expected to work on density matrices or related structures.
  • move the NoiseFunctionality from mqt-core to mqt-ddsim.
  • move the respective tests to mqt-ddsim (deduplicating wherever reasonable)
  • after everything is moved and working in mqt-ddsim (at least in a PR), strip all the density matrix functionality from mqt-core and simplify the code wherever feasible.

In the end, this makes the DD Package implementation in mqt-core much more lenient and eliminates quite some special cases. In addition, it also makes the density matrix related code much more straight forward and puts it in the place where it is actually used.
Finally, the density matrix code is then much more "local" and isolated, which hopefully makes it easier to maintain and won't require as much fixing when we change things in mqt-core.

Overall, this should be a win-win for all use cases.

@burgholzer burgholzer added c++ Anything related to C++ code code quality Code quality improvements DD Anything related to the DD package minor Minor version update refactor Anything related to code refactoring usability Anything related to usability labels Feb 11, 2025
@burgholzer burgholzer added this to the DD Package Improvements milestone Feb 11, 2025
@github-project-automation github-project-automation bot moved this to In Progress in MQT Core Feb 11, 2025
@burgholzer burgholzer added this to MQT Feb 11, 2025
@github-project-automation github-project-automation bot moved this to In Progress in MQT Feb 11, 2025
@github-project-automation github-project-automation bot moved this to In Progress in MQT Simulation Feb 11, 2025
@burgholzer burgholzer added the help wanted Extra attention is needed label Feb 11, 2025
@burgholzer burgholzer moved this from In Progress to Todo in MQT Feb 11, 2025
@burgholzer burgholzer moved this from In Progress to Todo in MQT Core Feb 11, 2025
@burgholzer burgholzer moved this from In Progress to Todo in MQT Simulation Feb 11, 2025
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 code quality Code quality improvements DD Anything related to the DD package help wanted Extra attention is needed minor Minor version update refactor Anything related to code refactoring usability Anything related to usability
Projects
Status: Todo
Status: Todo
Status: Todo
Development

No branches or pull requests

1 participant