Skip to content

Commit f6a7287

Browse files
committed
Merge remote-tracking branch 'origin/main' into ystade/qdmi-device-add-features
2 parents 862c6da + efb98ac commit f6a7287

File tree

15 files changed

+1002
-294
lines changed

15 files changed

+1002
-294
lines changed

.github/workflows/ci_mlir.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
FORCE_COLOR: 3
3131
steps:
3232
# check out the repository
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v5
3434
with:
3535
fetch-depth: 0
3636

@@ -116,7 +116,7 @@ jobs:
116116
llvm-latest-tag: ${{ steps.get-latest.outputs.latest }}
117117
steps:
118118
# check out the repository
119-
- uses: actions/checkout@v4
119+
- uses: actions/checkout@v5
120120
with:
121121
fetch-depth: 0
122122

@@ -228,7 +228,7 @@ jobs:
228228
FORCE_COLOR: 3
229229
steps:
230230
# Check out the repository
231-
- uses: actions/checkout@v4
231+
- uses: actions/checkout@v5
232232
with:
233233
fetch-depth: 0
234234

@@ -303,7 +303,7 @@ jobs:
303303
id-token: write
304304
steps:
305305
# check out the repository
306-
- uses: actions/checkout@v4
306+
- uses: actions/checkout@v5
307307
with:
308308
fetch-depth: 0
309309

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ repos:
6666

6767
# Python linting using ruff
6868
- repo: https://github.com/astral-sh/ruff-pre-commit
69-
rev: v0.12.8
69+
rev: v0.12.9
7070
hooks:
7171
- id: ruff
7272
args: ["--fix", "--show-fixes"]
@@ -122,7 +122,7 @@ repos:
122122

123123
# Check for spelling
124124
- repo: https://github.com/crate-ci/typos
125-
rev: v1.35.3
125+
rev: v1.35.4
126126
hooks:
127127
- id: typos
128128

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
1111

1212
### Added
1313

14+
- ✨ Add `qubit` operation to the `MQTOpt` dialect for static qubit addressing ([#1116]) ([**@MatthiasReumann**])
1415
- ✨ Add MQT's implementation of a QDMI Driver ([#1010]) ([**@ystade**])
1516
- ✨ Add a copy of the NA QDMI Device that is always a shared library ([#1010]) ([**@ystade**])
1617
- ✨ Add translation from `QuantumComputation` to the `MQTRef` MLIR dialect ([#1099]) ([**@denialhaag**], [**@burgholzer**])
@@ -168,6 +169,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool
168169

169170
<!-- PR links -->
170171

172+
[#1116]: https://github.com/munich-quantum-toolkit/core/pull/1116
171173
[#1106]: https://github.com/munich-quantum-toolkit/core/pull/1106
172174
[#1099]: https://github.com/munich-quantum-toolkit/core/pull/1099
173175
[#1098]: https://github.com/munich-quantum-toolkit/core/pull/1098

README.md

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
<p align="center">
1111
<a href="https://mqt.readthedocs.io">
12-
<picture>
13-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-dark.svg" width="60%">
14-
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-light.svg" width="60%" alt="MQT Logo">
15-
</picture>
12+
<picture>
13+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-dark.svg" width="60%">
14+
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/logo-mqt-light.svg" width="60%" alt="MQT Logo">
15+
</picture>
1616
</a>
1717
</p>
1818

@@ -41,17 +41,35 @@ Among others, it is part of the [Munich Quantum Software Stack (MQSS)](https://w
4141

4242
<p align="center">
4343
<picture>
44-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-dark.svg" width="90%">
45-
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-light.svg" width="90%" alt="MQT Partner Logos">
44+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-dark.svg" width="90%">
45+
<img src="https://raw.githubusercontent.com/munich-quantum-toolkit/.github/refs/heads/main/docs/_static/mqt-logo-banner-light.svg" width="90%" alt="MQT Partner Logos">
4646
</picture>
4747
</p>
4848

4949
Thank you to all the contributors who have helped make MQT Core a reality!
5050

5151
<p align="center">
52-
<a href="https://github.com/munich-quantum-toolkit/core/graphs/contributors">
52+
<a href="https://github.com/munich-quantum-toolkit/core/graphs/contributors">
5353
<img src="https://contrib.rocks/image?repo=munich-quantum-toolkit/core" />
54-
</a>
54+
</a>
55+
</p>
56+
57+
The MQT will remain free, open-source, and permissively licensed—now and in the future.
58+
We are firmly committed to keeping it open and actively maintained for the quantum computing community.
59+
60+
To support this endeavor, please consider:
61+
62+
- Starring and sharing our repositories: https://github.com/munich-quantum-toolkit
63+
- Contributing code, documentation, tests, or examples via issues and pull requests
64+
- Citing the MQT in your publications (see [Cite This](#cite-this))
65+
- Citing our research in your publications (see [References](https://mqt.readthedocs.io/projects/core/en/latest/references.html))
66+
- Using the MQT in research and teaching, and sharing feedback and use cases
67+
- Sponsoring us on GitHub: https://github.com/sponsors/munich-quantum-toolkit
68+
69+
<p align="center">
70+
<a href="https://github.com/sponsors/munich-quantum-toolkit">
71+
<img width=20% src="https://img.shields.io/badge/Sponsor-white?style=for-the-badge&logo=githubsponsors&labelColor=black&color=blue" alt="Sponsor the MQT" />
72+
</a>
5573
</p>
5674

5775
## Getting Started
@@ -97,20 +115,43 @@ If you want to use the ZX library, it is recommended (although not strictly nece
97115

98116
## Cite This
99117

100-
If you want to cite MQT Core, please use the following BibTeX entry:
118+
Please cite the work that best fits your use case.
119+
If both apply, include both references.
120+
121+
### MQT Core (the tool)
122+
123+
When citing the software itself or results produced with it, cite the MQT Core paper:
101124

102125
```bibtex
103126
@article{burgholzer2025MQTCore,
104-
title = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
105-
author = {Lukas Burgholzer and Yannick Stade and Tom Peham and Robert Wille},
106-
year = {2025},
107-
journal = {Journal of Open Source Software},
108-
publisher = {The Open Journal},
109-
volume = {10},
110-
number = {108},
111-
pages = {7478},
112-
doi = {10.21105/joss.07478},
113-
url = {https://doi.org/10.21105/joss.07478},
127+
title = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
128+
author = {Lukas Burgholzer and Yannick Stade and Tom Peham and Robert Wille},
129+
year = 2025,
130+
journal = {Journal of Open Source Software},
131+
publisher = {The Open Journal},
132+
volume = 10,
133+
number = 108,
134+
pages = 7478,
135+
doi = {10.21105/joss.07478},
136+
url = {https://doi.org/10.21105/joss.07478},
137+
}
138+
```
139+
140+
### The Munich Quantum Toolkit (the project)
141+
142+
When discussing the overall MQT project or its ecosystem, cite the MQT Handbook:
143+
144+
```bibtex
145+
@inproceedings{mqt,
146+
title = {The {{MQT}} Handbook: {{A}} Summary of Design Automation Tools and Software for Quantum Computing},
147+
shorttitle = {{The MQT Handbook}},
148+
author = {Robert Wille and Lucas Berent and Tobias Forster and Jagatheesan Kunasaikaran and Kevin Mato and Tom Peham and Nils Quetschlich and Damian Rovara and Aaron Sander and Ludwig Schmid and Daniel Schoenberger and Yannick Stade and Lukas Burgholzer},
149+
booktitle = {IEEE International Conference on Quantum Software (QSW)},
150+
doi = {10.1109/QSW62656.2024.00013},
151+
year = 2024,
152+
eprint = {2405.17543},
153+
eprinttype = {arxiv},
154+
addendum = {A live version of this document is available at \url{https://mqt.readthedocs.io}},
114155
}
115156
```
116157

docs/index.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ api/mqt/core/index
8484
api/cpp/namespacelist
8585
```
8686

87-
````{only} html
87+
```{only} html
8888
## Contributors and Supporters
8989
90-
The _[Munich Quantum Toolkit (MQT)](https://mqt.readthedocs.io)_ is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/)
91-
and supported by the [Munich Quantum Software Company (MQSC)](https://munichquantum.software).
92-
Among others, it is part of the [Munich Quantum Software Stack (MQSS)](https://www.munich-quantum-valley.de/research/research-areas/mqss) ecosystem,
93-
which is being developed as part of the [Munich Quantum Valley (MQV)](https://www.munich-quantum-valley.de) initiative.
90+
The _[Munich Quantum Toolkit (MQT)](https://mqt.readthedocs.io)_ is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/) and supported by the [Munich Quantum Software Company (MQSC)](https://munichquantum.software).
91+
Among others, it is part of the [Munich Quantum Software Stack (MQSS)](https://www.munich-quantum-valley.de/research/research-areas/mqss) ecosystem, which is being developed as part of the [Munich Quantum Valley (MQV)](https://www.munich-quantum-valley.de) initiative.
9492
9593
<div style="margin-top: 0.5em">
9694
<div class="only-light" align="center">
@@ -109,22 +107,18 @@ Thank you to all the contributors who have helped make MQT Core a reality!
109107
</a>
110108
</p>
111109
112-
## Cite This
113-
114-
If you want to cite MQT Core, please use the following BibTeX entry:
115-
116-
```bibtex
117-
@article{burgholzer2025MQTCore,
118-
title = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
119-
author = {Lukas Burgholzer and Yannick Stade and Tom Peham and Robert Wille},
120-
year = {2025},
121-
journal = {Journal of Open Source Software},
122-
publisher = {The Open Journal},
123-
volume = {10},
124-
number = {108},
125-
pages = {7478},
126-
doi = {10.21105/joss.07478},
127-
url = {https://doi.org/10.21105/joss.07478},
128-
}
110+
The MQT will remain free, open-source, and permissively licensed—now and in the future.
111+
We are firmly committed to keeping it open and actively maintained for the quantum computing community.
112+
113+
To support this endeavor, please consider:
114+
115+
- Starring and sharing our repositories: [https://github.com/munich-quantum-toolkit](https://github.com/munich-quantum-toolkit)
116+
- Contributing code, documentation, tests, or examples via issues and pull requests
117+
- Citing the MQT in your publications (see {doc}`References <references>`)
118+
- Using the MQT in research and teaching, and sharing feedback and use cases
119+
- Sponsoring us on GitHub: [https://github.com/sponsors/munich-quantum-toolkit](https://github.com/sponsors/munich-quantum-toolkit)
120+
121+
<p align="center">
122+
<iframe src="https://github.com/sponsors/munich-quantum-toolkit/button" title="Sponsor munich-quantum-toolkit" height="32" width="114" style="border: 0; border-radius: 6px;"></iframe>
123+
</p>
129124
```
130-
````

docs/references.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,47 @@
44
\phantomsection
55
```
66

7-
```{only} html
7+
````{only} html
88
# References
9+
*MQT Core* is academic software. Thus, many of its built-in algorithms have been published as scientific papers.
10+
See {cite:p}`burgholzer2025MQTCore` for a general overview of *MQT Core* and its features.
11+
If you want to cite this article, please use the following BibTeX entry:
912
10-
If you use *MQT Core* in your work, we would appreciate if you cited {cite:p}`burgholzer2025MQTCore`.
13+
```bibtex
14+
@article{burgholzer2025MQTCore,
15+
title = {{{MQT Core}}: {{The}} Backbone of the {{Munich Quantum Toolkit (MQT)}}},
16+
author = {Lukas Burgholzer and Yannick Stade and Tom Peham and Robert Wille},
17+
year = 2025,
18+
journal = {Journal of Open Source Software},
19+
publisher = {The Open Journal},
20+
volume = 10,
21+
number = 108,
22+
pages = 7478,
23+
doi = {10.21105/joss.07478},
24+
url = {https://doi.org/10.21105/joss.07478},
25+
}
26+
```
1127
12-
A full list of references is given below.
28+
*MQT Core* is part of the Munich Quantum Toolkit, which is described in {cite:p}`mqt`.
29+
If you want to cite the Munich Quantum Toolkit, please use the following BibTeX entry:
30+
31+
```bibtex
32+
@inproceedings{mqt,
33+
title = {The {{MQT}} Handbook: {{A}} Summary of Design Automation Tools and Software for Quantum Computing},
34+
shorttitle = {{The MQT Handbook}},
35+
author = {Robert Wille and Lucas Berent and Tobias Forster and Jagatheesan Kunasaikaran and Kevin Mato and Tom Peham and Nils Quetschlich and Damian Rovara and Aaron Sander and Ludwig Schmid and Daniel Schoenberger and Yannick Stade and Lukas Burgholzer},
36+
booktitle = {IEEE International Conference on Quantum Software (QSW)},
37+
doi = {10.1109/QSW62656.2024.00013},
38+
year = 2024,
39+
eprint = {2405.17543},
40+
eprinttype = {arxiv},
41+
addendum = {A live version of this document is available at \url{https://mqt.readthedocs.io}},
42+
}
1343
```
1444
45+
A full list of references is given below.
46+
````
47+
1548
```{bibliography}
1649
1750
```

docs/refs.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ @inproceedings{minatoZerosuppressedBDDsSet1993
211211
doi = {10.1145/157485.164890},
212212
}
213213

214+
@inproceedings{mqt,
215+
title = {The {{MQT}} Handbook: {{A}} Summary of Design Automation Tools and Software for Quantum Computing},
216+
shorttitle = {The MQT Handbook},
217+
author = {Robert Wille and Lucas Berent and Tobias Forster and Jagatheesan Kunasaikaran and Kevin Mato and Tom Peham and Nils Quetschlich and Damian Rovara and Aaron Sander and Ludwig Schmid and Daniel Schoenberger and Yannick Stade and Lukas Burgholzer},
218+
year = {2024},
219+
booktitle = {IEEE International Conference on Quantum Software (QSW)},
220+
doi = {10.1109/QSW62656.2024.00013},
221+
eprint = {2405.17543},
222+
eprinttype = {arxiv},
223+
addendum = {A live version of this document is available at \url{https://mqt.readthedocs.io}},
224+
}
225+
214226
@inproceedings{niemannEfficientSynthesisQuantum2014,
215227
title = {Efficient synthesis of quantum circuits implementing {{Clifford}} group operations},
216228
author = {Niemann, Philipp and Wille, Robert and Drechsler, Rolf},

mlir/include/mlir/Dialect/MQTOpt/IR/MQTOptOps.td

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def MQTOptDialect : Dialect {
4949
For more information, see the paper "QIRO:A Static Single Assignment
5050
based Quantum Program Representation for Optimization"
5151
(https://doi.org/10.1145/3491247)
52+
53+
The `mqtopt` dialect supports dynamic as well as static qubit
54+
addressing.
5255
}];
5356

5457
// The C++ namespace that the dialect, and all sub-components, get placed
@@ -71,7 +74,7 @@ class MQTOptType<string name, string typeMnemonic, list<Trait> traits = []>
7174
}
7275

7376
def QubitType : MQTOptType<"Qubit", "Qubit"> {
74-
let summary = "A value-semantic qubit (state).";
77+
let summary = "A value-semantic (dynamic or static) qubit (state).";
7578
}
7679

7780
def QregType : MQTOptType<"QubitRegister", "QubitRegister"> {
@@ -250,8 +253,10 @@ def InsertOp : ResourceOp<"insertQubit", [UniqueIndexDefinition]> {
250253
This class represents an operation that inserts a qubit back into a qubit
251254
register. Before, the same underlying qubit must have been extracted
252255
from the same register at the same index. However, this property is not
253-
enforced by the dialect. It is naturally satisfied when a program in the
254-
mqt input dialect is converted to the mqto dialect.
256+
enforced by the dialect. Moreover, the dialect permits the (invalid) insertion
257+
of static qubits into registers. The dialect avoids these issues by relying on
258+
the fact that the conversion from `mqtref` to `mqtopt` will never produce these
259+
invalid operations.
255260
}];
256261

257262
let arguments = (ins
@@ -266,4 +271,24 @@ def InsertOp : ResourceOp<"insertQubit", [UniqueIndexDefinition]> {
266271
);
267272
}
268273

274+
def QubitOp : ResourceOp<"qubit"> {
275+
let summary = "Retrieve static qubit";
276+
let description = [{
277+
The `mqtopt.qubit` operation produces an SSA value from the given index
278+
to a static (hardware) qubit.
279+
280+
Example:
281+
```mlir
282+
// Static (hardware) qubit with address '0'.
283+
%q = "mqtopt.qubit"() <{index = 0 : i64}> : () -> !mqtopt.Qubit
284+
285+
// Using custom assembly.
286+
%q = mqtopt.qubit 0
287+
```
288+
}];
289+
let arguments = (ins ConfinedAttr<I64Attr, [IntNonNegative]>:$index);
290+
let results = (outs QubitType:$qubit);
291+
let assemblyFormat = " attr-dict $index ";
292+
}
293+
269294
#endif // MQTOPT_OPS

mlir/lib/Conversion/MQTOptToMQTRef/MQTOptToMQTRef.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,18 @@ struct ConvertMQTOptReset final : OpConversionPattern<opt::ResetOp> {
173173
}
174174
};
175175

176+
struct ConvertMQTOptQubit final : OpConversionPattern<opt::QubitOp> {
177+
using OpConversionPattern::OpConversionPattern;
178+
179+
LogicalResult
180+
matchAndRewrite(opt::QubitOp op, OpAdaptor /*adaptor*/,
181+
ConversionPatternRewriter& rewriter) const override {
182+
const auto& qubitType = ref::QubitType::get(rewriter.getContext());
183+
rewriter.replaceOpWithNewOp<ref::QubitOp>(op, qubitType, op.getIndex());
184+
return success();
185+
}
186+
};
187+
176188
template <typename MQTGateOptOp, typename MQTGateRefOp>
177189
struct ConvertMQTOptGateOp final : OpConversionPattern<MQTGateOptOp> {
178190
using OpConversionPattern<MQTGateOptOp>::OpConversionPattern;
@@ -232,10 +244,9 @@ struct MQTOptToMQTRef final : impl::MQTOptToMQTRefBase<MQTOptToMQTRef> {
232244
target.addIllegalDialect<opt::MQTOptDialect>();
233245
target.addLegalDialect<ref::MQTRefDialect>();
234246

235-
patterns
236-
.add<ConvertMQTOptAlloc, ConvertMQTOptDealloc, ConvertMQTOptInsert,
237-
ConvertMQTOptExtract, ConvertMQTOptMeasure, ConvertMQTOptReset>(
238-
typeConverter, context);
247+
patterns.add<ConvertMQTOptAlloc, ConvertMQTOptDealloc, ConvertMQTOptInsert,
248+
ConvertMQTOptExtract, ConvertMQTOptMeasure, ConvertMQTOptReset,
249+
ConvertMQTOptQubit>(typeConverter, context);
239250

240251
ADD_CONVERT_PATTERN(GPhaseOp)
241252
ADD_CONVERT_PATTERN(IOp)

0 commit comments

Comments
 (0)