Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@

<h3>Internal changes ⚙️</h3>

* The `qml.compiler.python_compiler` module in PennyLane has been renamed `qml.compiler.unified_compiler`.
Catalyst has been updated to reflect this change.
[(#1997)](https://github.com/PennyLaneAI/pennylane/pull/1997)

* Updates use of `qml.transforms.dynamic_one_shot.parse_native_mid_circuit_measurements` to improved signature.
[(#1953)](https://github.com/PennyLaneAI/catalyst/pull/1953)

Expand Down
8 changes: 4 additions & 4 deletions frontend/catalyst/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def run_from_ir(self, ir: str, module_name: str, workspace: Directory):
return output_object_name, out_IR

@debug_logger
def is_using_python_compiler(self):
def is_using_unified_compiler(self):
"""Returns true if we detect that there is an xdsl plugin in use.

Will also modify self.options.pass_plugins and self.options.dialect_plugins to remove
Expand Down Expand Up @@ -509,13 +509,13 @@ def run(self, mlir_module, *args, **kwargs):
(str): filename of shared object
"""

if self.is_using_python_compiler():
if self.is_using_unified_compiler():
# We keep this module here to keep xDSL requirement optional
# Only move this is it has been decided that xDSL is no longer optional.
# pylint: disable-next=import-outside-toplevel
from pennylane.compiler.python_compiler import Compiler as PythonCompiler
from pennylane.compiler.unified_compiler import Compiler as UnifiedCompiler

compiler = PythonCompiler()
compiler = UnifiedCompiler()
mlir_module = compiler.run(mlir_module)

return self.run_from_ir(
Expand Down