Munich-Quantum-Software-Stack / QDMI

Quantum Device Management Interface (QDMI)
https://munich-quantum-software-stack.github.io/QDMI/
Apache License 2.0
26 stars 0 forks source link

✨ Use Prefixes for Device Symbols and Types #86

Closed ystade closed 3 weeks ago

ystade commented 3 weeks ago

This PR provides a solution to #73. After trying out different options, this has evolved into the most promising one.

It forces device implementations to specify a prefix that is used in front of all functions and types defined by the device. This finally allows multiple devices to be statically linked together into one executable. The static driver implementation shows how this can be accomplished.

Additionally, this PR

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
examples/device/c/device.c 96.7% 1 Missing :warning:
examples/device/cxx/device.cpp 97.8% 1 Missing :warning:

Impacted file tree graph

@@            Coverage Diff            @@
##           develop     #86     +/-   ##
=========================================
- Coverage     86.2%   86.0%   -0.2%     
=========================================
  Files            7       7             
  Lines          784     798     +14     
  Branches       202     201      -1     
=========================================
+ Hits           676     687     +11     
- Misses         108     111      +3     
Flag Coverage Δ
cpp 86.0% <97.5%> (-0.2%) :arrow_down:
Files with missing lines Coverage Δ
examples/driver/qdmi_example_driver.cpp 79.8% <100.0%> (+0.1%) :arrow_up:
examples/device/c/device.c 93.9% <96.7%> (-0.4%) :arrow_down:
examples/device/cxx/device.cpp 92.8% <97.8%> (-0.5%) :arrow_down:
ystade commented 3 weeks ago

@burgholzer I moved the implementation of the static driver into another PR (#89) so that we can decide independently what we do with it. I think this is ready to go now, I am happy about your review. Note also the additional changes contained here:

Additionally, this PR

  • removes two superfluous targets in the CMake configuration
  • fixes issues with the template
  • automates the template building outside of the project