Skip to content

Add call to python compiler #1715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all 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
5 changes: 4 additions & 1 deletion frontend/catalyst/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,10 @@
(str): filename of shared object
"""

self.is_using_python_compiler()
if self.is_using_python_compiler():
from pennylane.compiler.python_compiler.impl import Compiler

Check notice on line 510 in frontend/catalyst/compiler.py

View check run for this annotation

codefactor.io / CodeFactor

frontend/catalyst/compiler.py#L510

Import outside toplevel (pennylane.compiler.python_compiler.impl.Compiler) (import-outside-toplevel)

Check notice on line 510 in frontend/catalyst/compiler.py

View check run for this annotation

codefactor.io / CodeFactor

frontend/catalyst/compiler.py#L510

Redefining name 'Compiler' from outer scope (line 377) (redefined-outer-name)
compiler = Compiler()
mlir_module = compiler.run(mlir_module)

return self.run_from_ir(
mlir_module.operation.get_asm(
Expand Down
Loading