Skip to content

🎨 LLVM code format and Python binding restructure #321

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

Merged
merged 7 commits into from
Jun 4, 2023

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Jun 3, 2023

This PR unifies the clang-format configuration (closely following the LLVM style) and applies it to all files.
The ZX package was mostly formatted according to those rules anyway, so there are hardly any changes there.
Lots of line break and whitespace changes in the DD package and the QFR files though. Might need some cleanup later on.

This also moves the qfr_python target (which was previously a header-only library) to the main source tree and splits it into header and source files with the main goal of optimizing compile times.

@burgholzer burgholzer added the refactor Anything related to code refactoring label Jun 3, 2023
@burgholzer burgholzer self-assigned this Jun 3, 2023
@burgholzer burgholzer mentioned this pull request Jun 3, 2023
9 tasks
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #321 (a52b358) into mqt-core (850499d) will decrease coverage by 5.9%.
The diff coverage is 91.3%.

@@            Coverage Diff             @@
##           mqt-core    #321     +/-   ##
==========================================
- Coverage      87.4%   81.6%   -5.9%     
==========================================
  Files            58      60      +2     
  Lines          6725    7659    +934     
  Branches       1351    1474    +123     
==========================================
+ Hits           5884    6252    +368     
- Misses          841    1407    +566     
Impacted Files Coverage Δ
src/CircuitOptimizer.cpp 84.0% <ø> (-0.2%) ⬇️
src/QuantumComputation.cpp 76.7% <ø> (-0.8%) ⬇️
src/algorithms/BernsteinVazirani.cpp 100.0% <ø> (ø)
src/algorithms/Entanglement.cpp 100.0% <ø> (ø)
src/algorithms/GoogleRandomCircuitSampling.cpp 63.3% <ø> (+0.6%) ⬆️
src/algorithms/Grover.cpp 100.0% <ø> (ø)
src/algorithms/QFT.cpp 100.0% <ø> (ø)
src/algorithms/QPE.cpp 87.1% <ø> (+0.3%) ⬆️
src/algorithms/RandomCliffordCircuit.cpp 93.2% <ø> (-3.3%) ⬇️
src/dd/FunctionalityConstruction.cpp 96.3% <ø> (ø)
... and 50 more

@burgholzer
Copy link
Member Author

burgholzer commented Jun 3, 2023

Ignoring the coverage decrease for now as the much bigger impact for coverage will probably come from moving the DD and ZX package out of the extern folder that is currently ignored.
Furthermore, the bindings code is now moved into the main source tree and is not covered by tests. This can be resolved later on via https://pybind11.readthedocs.io/en/stable/advanced/embedding.html

@burgholzer burgholzer changed the title 🎨 Closely follow LLVM code format 🎨 LLVM code format and Python binding restructure Jun 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2023

Cpp-Linter Report ✔️

No problems need attention.

Have any feedback or feature suggestions? Share it here.

@burgholzer burgholzer merged commit 3b87fab into mqt-core Jun 4, 2023
@burgholzer burgholzer deleted the unify-clang-format branch June 4, 2023 11:07
@burgholzer burgholzer added this to the MQT Core milestone Jun 15, 2023
burgholzer added a commit that referenced this pull request Jun 15, 2023
This is the main PR that marks the transition from the existing
submodule structure towards a unified `mqt-core` package and consists of
a series of smaller PRs.

For more details on the individual changes please look at:

- [x] Transfer DD package from submodule to folder #316 
- [x] Transfer ZX package from submodule to folder #317 
- [x] Remove `mqt.qfr` Python package and corresponding CI #319 
- [x] Consolidate `googletest` submodule #320
- [x] Use stricter `clang-format` config throughout #321
- [x] Move DD package code to main directory #326 
- [x] Move ZX package code to main directory #327
- [x] Replace `QFR` with `MQT Core` (ensure backwards compatibility via
alias) #328
- [x] Various CI improvements and speedups 
  - #322 
  - #323 
  - #324
  - #325
  - #329
@burgholzer burgholzer added the Core Anything related to the Core library and IR label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Anything related to the Core library and IR refactor Anything related to code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant