Skip to content

[Unified Compiler] Renaming python_compiler into unified_compiler - #8121

Closed
PietropaoloFrisoni wants to merge 5 commits into
masterfrom
renaming_python_compiler
Closed

PietropaoloFrisoni wants to merge 5 commits into
masterfrom
renaming_python_compiler

Conversation

@PietropaoloFrisoni

@PietropaoloFrisoni PietropaoloFrisoni commented Aug 21, 2025 •

Copy link
Copy Markdown
Contributor

This PR should be merged along with this PR in Catalyst

Context: This PR changes name from python.compiler into unified.compiler and updates all the entries in the source code.

Description of the Change: As above.

Benefits: Better name.

Possible Drawbacks: None that I can think of.

Related GitHub Issues: None.

[sc-98172]

@github-actions

Copy link
Copy Markdown
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@PietropaoloFrisoni
PietropaoloFrisoni marked this pull request as ready for review August 21, 2025 19:25
@JerryChen97

JerryChen97 commented Aug 21, 2025 •

Copy link
Copy Markdown
Contributor

oh no seems most of the tests in external tests pack still use the old API

@PietropaoloFrisoni

Copy link
Copy Markdown
Contributor Author

oh no seems most of the tests in external tests pack still use the old API

This is because we need to update Catalyst as well (we get failures when we import getXDSLPluginAbsolutePath)

@PietropaoloFrisoni PietropaoloFrisoni added the unified compiler Issues and pull requests related to PennyLane's xDSL python compiler. label Aug 21, 2025
@PietropaoloFrisoni PietropaoloFrisoni changed the title Renaming python_compiler into unified_compiler [Unified Compiler] Renaming python_compiler into unified_compiler Aug 21, 2025
Comment thread doc/releases/changelog-dev.md Outdated

<h4>Other improvements</h4>

* The `qml.compiler.python_compiler` module has been renamed `qml.compiler.unified_compiler`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see unified_compiler in the qml.compiler API 🤔 (here: https://xanaduai-pennylane--8121.com.readthedocs.build/en/8121/code/qml_compiler.html). Is it purposefully hidden?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Isaac. We can add a section describing the unified_compiler module in the pennylane/compiler/__init__.py file, and it should be displayed in the doc. Now there is an entry describing the Compiler module only. Please let me know what you think, although I assume that you would like Product to take care of this (tagging also @josh146 for visibility)

Comment thread .coveragerc Outdated
Comment thread doc/releases/changelog-dev.md Outdated
Comment thread pennylane/compiler/unified_compiler/__init__.py Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/__init__.py Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/catalyst.py Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/catalyst.py Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/mbqc.py Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/qec.py Outdated
Comment thread doc/releases/changelog-dev.md Outdated
Comment thread pennylane/compiler/unified_compiler/dialects/quantum.py Outdated
Comment thread tests/unified_compiler/dialects/test_catalyst_dialect.py Outdated
Comment thread tests/unified_compiler/dialects/test_mbqc_dialect.py Outdated
Comment thread tests/unified_compiler/dialects/test_qec_dialect.py Outdated
Comment thread tests/unified_compiler/dialects/test_quantum_dialect.py Outdated
Comment thread tests/unified_compiler/dialects/test_transform_dialect.py Outdated
Comment thread tests/unified_compiler/transforms/test_xdsl_combine_global_phases.py Outdated
Comment thread tests/unified_compiler/transforms/test_xdsl_diagonalize_measurements.py Outdated
Comment thread tests/unified_compiler/transforms/test_xdsl_measurements_from_samples.py Outdated
Comment thread tests/unified_compiler/transforms/test_xdsl_measurements_from_samples.py Outdated
Comment thread tests/unified_compiler/transforms/test_xdsl_merge_rotations.py Outdated
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>

@isaacdevlugt isaacdevlugt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Based on conversations in-person, we decided to name this module compiler.interface. We may choose to revisit this in the future when the features become more public.

@PietropaoloFrisoni looks good! I would change the title of the PR—that's it :)

@mudit2812

Copy link
Copy Markdown
Collaborator

Closing, no longer needed.

@mudit2812 mudit2812 closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unified compiler Issues and pull requests related to PennyLane's xDSL python compiler.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants