Skip to content

🚧 Quantum Subroutine #1785

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

Closed
wants to merge 16 commits into from

use first parameter

401986c
Select commit
Loading
Failed to load commit list.
Closed

🚧 Quantum Subroutine #1785

use first parameter
401986c
Select commit
Loading
Failed to load commit list.
codefactor.io / CodeFactor failed Jun 4, 2025 in 3s

26 issues found.

Annotations

Check notice on line 312 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L312

Imports from package jax are not grouped (ungrouped-imports)

Check notice on line 314 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L314

Import "import copy" should be placed at the top of the module (wrong-import-position)

Check notice on line 479 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L479

Import outside toplevel (jax.experimental.pjit.pjit_p) (import-outside-toplevel)

Check notice on line 480 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L480

Redefining name 'AbstractQreg' from outer scope (line 49) (redefined-outer-name)

Check notice on line 480 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L480

Redefining name 'qinsert_p' from outer scope (line 49) (redefined-outer-name)

Check notice on line 315 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L315

Import "from catalyst.utils.patching import Patcher" should be placed at the top of the module (wrong-import-position)

Check notice on line 481 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L481

Import outside toplevel (jax._src.core.jaxpr_as_fun) (import-outside-toplevel)

Check notice on line 479 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L479

Unused pjit_p imported from jax.experimental.pjit (unused-import)

Check notice on line 310 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L310

Attribute 'qreg' defined outside __init__ (attribute-defined-outside-init)

Check notice on line 480 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L480

Import outside toplevel (catalyst.jax_primitives.AbstractQreg, catalyst.jax_primitives.qextract_p, catalyst.jax_primitives.qinsert_p) (import-outside-toplevel)

Check notice on line 319 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L319

Missing function or method docstring (missing-function-docstring)

Check notice on line 312 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L312

Import "from jax.experimental.pjit import pjit_p" should be placed at the top of the module (wrong-import-position)

Check notice on line 427 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L427

Attribute 'qreg' defined outside __init__ (attribute-defined-outside-init)

Check notice on line 2331 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L2331

Missing function or method docstring (missing-function-docstring)

Check notice on line 450 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L450

Useless parent or super() delegation in method '__init__' (useless-parent-delegation)

Check notice on line 480 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L480

Redefining name 'qextract_p' from outer scope (line 49) (redefined-outer-name)

Check notice on line 315 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L315

Imports from package catalyst are not grouped (ungrouped-imports)

Check notice on line 480 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L480

Unused qinsert_p imported from catalyst.jax_primitives (unused-import)

Check notice on line 313 in frontend/catalyst/jax_primitives.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/jax_primitives.py#L313

Import "from jax._src.pjit import _pjit_lowering" should be placed at the top of the module (wrong-import-position)

Check notice on line 170 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L170

Missing function or method docstring (missing-function-docstring)

Check notice on line 475 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L475

Missing function or method docstring (missing-function-docstring)

Check notice on line 483 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L483

Unnecessary use of a comprehension, use dict(self.wire_map.items()) instead. (unnecessary-comprehension)

Check notice on line 507 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L507

Import outside toplevel (jax._src.sharding_impls.UnspecifiedValue) (import-outside-toplevel)

Check notice on line 472 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L472

Import "from catalyst.jax_primitives import qinsert_p" should be placed at the top of the module (wrong-import-position)

Check notice on line 273 in frontend/catalyst/from_plxpr.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

frontend/catalyst/from_plxpr.py#L273

Missing class docstring (missing-class-docstring)