Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

<h3>Internal changes ⚙️</h3>

* Split `from_plxpr.py` into two files.
[(#2142)](https://github.com/PennyLaneAI/catalyst/pull/2142)

<h3>Documentation 📝</h3>

* A typo in the code example for :func:`~.passes.ppr_to_ppm` has been corrected.
Expand Down
1 change: 0 additions & 1 deletion frontend/catalyst/from_plxpr/control_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _calling_convention(interpreter, closed_jaxpr, *args_plus_qreg):
init_qreg = QubitHandler(qreg, converter.qubit_index_recorder)
converter.init_qreg = init_qreg

# pylint: disable-next=cell-var-from-loop
retvals = converter(closed_jaxpr, *args)
init_qreg.insert_all_dangling_qubits()
return *retvals, converter.init_qreg.get()
Expand Down
6 changes: 2 additions & 4 deletions frontend/catalyst/from_plxpr/decompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
}


# pylint: disable=too-few-public-methods
class DecompRuleInterpreter(qml.capture.PlxprInterpreter):
"""Interpreter for getting the decomposition graph solution
from a jaxpr when program capture is enabled.
Expand Down Expand Up @@ -130,7 +129,7 @@ def __init__(
gate_set=None,
fixed_decomps=None,
alt_decomps=None,
): # pylint: disable=too-many-arguments
):

if not qml.decomposition.enabled_graph(): # pragma: no cover
raise TypeError(
Expand Down Expand Up @@ -325,7 +324,7 @@ def _create_decomposition_rule(
# Include number of wires in the function name to avoid name clashes
# when the same rule is compiled multiple times with different number of wires
# (e.g., MultiRZ, GlobalPhase)
func_cp.__name__ += f"_wires_{num_wires}" # pylint: disable=protected-access
func_cp.__name__ += f"_wires_{num_wires}"

# Note that we shouldn't pass args as kwargs to decomposition_rule
# JAX doesn't like it and it may fail to preserve the order of args.
Expand Down Expand Up @@ -404,7 +403,6 @@ def is_solved_for(op):
return decomp_graph_solution


# pylint: disable=protected-access
def make_def_copy(func):
"""Create a copy of a Python definition to avoid mutating the original.

Expand Down
Loading