Skip to content

Checking constant allocation sizes. Removing memref dialect usage.#43

Merged
rainij merged 12 commits into
mainfrom
39-staticize-qubit-memrefs
May 29, 2026
Merged

Checking constant allocation sizes. Removing memref dialect usage.#43
rainij merged 12 commits into
mainfrom
39-staticize-qubit-memrefs

Conversation

@RiccardoRomanello
Copy link
Copy Markdown
Collaborator

Added two passes into JaspToQC directory to:

  • check compilation time sizes allocation
  • remove memref usage

Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/lib/Conversion/JaspToQC/CheckStaticQubitAllocation.cpp Outdated
Comment thread mlir/lib/Conversion/JaspToQC/StaticizeQubitRefs.cpp Outdated
Comment thread mlir/lib/Conversion/JaspToQC/StaticizeQubitRefs.cpp Outdated
Comment thread mlir/test/tools/qcc/ghz_from_qrisp_v2.mlir
Comment thread mlir/test/tools/qcc/ghz_from_qrisp.mlir
Comment thread mlir/test/tools/qcc/ghz_from_qrisp.mlir
@rainij
Copy link
Copy Markdown
Contributor

rainij commented May 8, 2026

@RiccardoRomanello if the PR is related or even resolves an issue, please mention it in the description of the PR.

RiccardoRomanello and others added 2 commits May 11, 2026 11:10
Co-authored-by: Reinhard Stahn <51020828+rainij@users.noreply.github.com>
Signed-off-by: Riccardo Romanello <riccardo.romanello@gmail.com>
@RiccardoRomanello RiccardoRomanello requested a review from rainij May 11, 2026 14:12
Copy link
Copy Markdown
Collaborator

@EnriqueNB EnriqueNB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few comments about the formatting and simplification of the code. The logic look good to me. Please, consider them.

Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td
Comment thread mlir/lib/Conversion/JaspToQC/JaspCheckStaticQubitAllocation.cpp
Comment thread mlir/lib/Conversion/JaspToQC/StaticizeQubitRefs.cpp Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/lib/Conversion/JaspToQC/JaspCheckStaticQubitAllocation.cpp
Comment thread mlir/lib/Conversion/JaspToQC/CheckStaticQubitAllocation.cpp Outdated
Comment thread mlir/lib/Conversion/JaspToQC/CheckStaticQubitAllocation.cpp
Comment thread mlir/test/tools/qcc-opt/jasp-convert-memref-to-static-qubits-test.mlir Outdated
Comment thread mlir/test/tools/qcc-opt/jasp-staticize-qubit-refs-test.mlir Outdated
Comment thread mlir/test/tools/qcc-opt/jasp-staticize-qubit-refs-test.mlir Outdated
Comment thread mlir/test/tools/qcc/ghz_from_qrisp.mlir
Comment thread mlir/test/tools/qcc/ghz_from_qrisp_v2.mlir
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td
Copy link
Copy Markdown
Contributor

@rainij rainij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RiccardoRomanello you did not answer to some of my threads from the last review. Please have a look, you probably just missed them.

Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.h Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td Outdated
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td
Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td
Comment thread mlir/lib/Conversion/JaspToQC/JaspCheckStaticQubitAllocation.cpp
Comment thread mlir/lib/Conversion/JaspToQC/ConvertMemrefToStaticQubits.cpp
Comment thread mlir/test/tools/qcc/ghz_from_qrisp.mlir
@RiccardoRomanello RiccardoRomanello requested a review from rainij May 19, 2026 08:43
Copy link
Copy Markdown
Contributor

@rainij rainij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few tiny things left.

Comment thread mlir/include/qcc/Conversion/JaspToQC/JaspToQC.td
Comment thread mlir/lib/Conversion/JaspToQC/ConvertMemrefToStaticQubits.cpp
Comment thread mlir/lib/Conversion/JaspToQC/JaspCheckStaticQubitAllocation.cpp
@RiccardoRomanello RiccardoRomanello requested a review from rainij May 20, 2026 15:33
@rainij
Copy link
Copy Markdown
Contributor

rainij commented May 27, 2026

@burgholzer this can be merged from my side.

@EnriqueNB please have a look if your requests have been addressed.

Copy link
Copy Markdown
Collaborator

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this LGTM. Just two very small consistency comments and one slightly larger thought about leaving cleanup to canonicalization, which I believe is not necessarily a good idea for performance.

Comment thread mlir/lib/Compiler/Pipeline.cpp Outdated
Comment thread mlir/lib/Compiler/Pipeline.cpp Outdated
Comment thread mlir/lib/Conversion/JaspToQC/ConvertMemrefToStaticQubits.cpp Outdated
Comment thread mlir/lib/Conversion/JaspToQC/ConvertMemrefToStaticQubits.cpp
Comment thread mlir/lib/Conversion/JaspToQC/ConvertMemrefToStaticQubits.cpp Outdated
Copy link
Copy Markdown
Collaborator

@EnriqueNB EnriqueNB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good from my side.

RiccardoRomanello and others added 3 commits May 28, 2026 14:42
Applying statically applicable suggestions.

Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
Signed-off-by: Riccardo Romanello <riccardo.romanello@gmail.com>
Copy link
Copy Markdown
Collaborator

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

@rainij
Copy link
Copy Markdown
Contributor

rainij commented May 29, 2026

The github UI tells me that there are still unresolved threads. I am absolutely not able to find those. No clue. Maybe it is about merging main, lets see if if this works.

Update: didn't work. I merge anyway.

@rainij rainij merged commit ff54773 into main May 29, 2026
15 checks passed
@rainij rainij deleted the 39-staticize-qubit-memrefs branch May 29, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants