From ac891b435b569c55678b39e2dcfe64cb47bb901c Mon Sep 17 00:00:00 2001 From: PietropaoloFrisoni Date: Thu, 21 Aug 2025 17:12:16 -0400 Subject: [PATCH 1/4] Replacing name --- doc/releases/changelog-dev.md | 3 +++ frontend/catalyst/compiler.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index a287a122f9..4f2a22370e 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -23,6 +23,9 @@

Improvements 🛠

+* The `qml.compiler.python_compiler` module in PennyLane has been renamed `qml.compiler.unified_compiler`. + [(#1997)](https://github.com/PennyLaneAI/pennylane/pull/1997) + * Adjoint differentiation is used by default when executing on lightning devices, significantly reduces gradient computation time. [(#1961)](https://github.com/PennyLaneAI/catalyst/pull/1961) diff --git a/frontend/catalyst/compiler.py b/frontend/catalyst/compiler.py index 86c16c20c9..3c9c314427 100644 --- a/frontend/catalyst/compiler.py +++ b/frontend/catalyst/compiler.py @@ -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 @@ -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( From 1d68813a45daaeb000f1fad27269dc6d7fe136f6 Mon Sep 17 00:00:00 2001 From: PietropaoloFrisoni Date: Thu, 21 Aug 2025 17:18:56 -0400 Subject: [PATCH 2/4] Better changelog --- doc/releases/changelog-dev.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 4f2a22370e..709aaf46f6 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -24,6 +24,7 @@

Improvements 🛠

* 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) * Adjoint differentiation is used by default when executing on lightning devices, significantly reduces gradient computation time. From 4316a8ea355c8a2043b5b1d2f9f14460d22d11ed Mon Sep 17 00:00:00 2001 From: PietropaoloFrisoni Date: Fri, 22 Aug 2025 11:32:22 -0400 Subject: [PATCH 3/4] Moving changelog --- doc/releases/changelog-dev.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 709aaf46f6..3d58d98b21 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -23,10 +23,6 @@

Improvements 🛠

-* 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) - * Adjoint differentiation is used by default when executing on lightning devices, significantly reduces gradient computation time. [(#1961)](https://github.com/PennyLaneAI/catalyst/pull/1961) @@ -105,6 +101,10 @@

Internal changes ⚙️

+* 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) From 8cb5b8f0a3dcad8fc3511d7fa01d5d00d21a87ca Mon Sep 17 00:00:00 2001 From: Pietropaolo Frisoni Date: Fri, 5 Sep 2025 10:33:50 -0400 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com> --- doc/releases/changelog-dev.md | 2 +- frontend/catalyst/compiler.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 3d58d98b21..326ba06685 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -101,7 +101,7 @@

Internal changes ⚙️

-* The `qml.compiler.python_compiler` module in PennyLane has been renamed `qml.compiler.unified_compiler`. +* The `qml.compiler.python_compiler` module in PennyLane has been renamed `qml.compiler.interface`. Catalyst has been updated to reflect this change. [(#1997)](https://github.com/PennyLaneAI/pennylane/pull/1997) diff --git a/frontend/catalyst/compiler.py b/frontend/catalyst/compiler.py index 3c9c314427..d0a07be888 100644 --- a/frontend/catalyst/compiler.py +++ b/frontend/catalyst/compiler.py @@ -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_unified_compiler(self): + def is_using_compiler_interface(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 @@ -509,13 +509,13 @@ def run(self, mlir_module, *args, **kwargs): (str): filename of shared object """ - if self.is_using_unified_compiler(): + if self.is_using_compiler_interface(): # 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.unified_compiler import Compiler as UnifiedCompiler + from pennylane.compiler.interface import Compiler as CompilerInterface - compiler = UnifiedCompiler() + compiler = CompilerInterface() mlir_module = compiler.run(mlir_module) return self.run_from_ir(