AI Slop Code RIsk Monitor

PennyLaneAI/pennylane

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry. Create meaningful quantum algorithms, from inspiration to implementation.

25.5 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for PennyLaneAI/pennylane, a Python project with 3,490 GitHub stars. SynthScan examined 673,048 lines of code across 1482 source files, recording 12349 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 25.5 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

25.5
Adjusted Signal
25.5
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
3.5K
Stars
Python
Language
673.0K
Lines of Code
1.5K
Files
12.3K
Pattern Hits
2026-10-12
Scan Date
0.90
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 51.1/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 9197 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.6/100 · LOW

Are imports declared and package/API names verified? 1810 finding(s).

Agent Over-Engineering Ratio 63.4/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 9469 finding(s).

PR Review Velocity Impact 76.6/100 · CRITICAL

Which changes need focused human review? 12349 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 1328MEDIUM 277LOW 10744

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 12349 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers8077 hits · 7440 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_wires.py69 def test_creation_from_iterables_of_exotic_elements(self, iterable):CODE
LOW⚡tests/test_wires.py75 def test_creation_from_wires_object(self):CODE
LOW⚡tests/test_wires.py83 def test_creation_from_dynamic_register(self):CODE
LOW⚡tests/test_wires.py93 def test_creation_from_wires_lists(self):CODE
LOW⚡tests/test_wires.py102 def test_creation_from_different_wire_types(self, iterable):CODE
LOW⚡tests/test_wires.py110 def test_creation_from_single_object(self, wire):CODE
LOW⚡tests/test_wires.py120 def test_error_for_incorrect_wire_types(self, input):CODE
LOW⚡tests/test_wires.py129 def test_error_for_repeated_wires(self, iterable):CODE
LOW⚡tests/test_wires.py136 def test_indexing_and_slicing(self, iterable):CODE
LOW⚡tests/test_wires.py197 def test_add_two_wires_objects(self):CODE
LOW⚡tests/test_wires.py203 def test_add_wires_object_with_iterable(self):CODE
LOW⚡tests/test_wires.py210 def test_add_wires_with_inbuilt_sum(self):CODE
LOW⚡tests/test_wires.py216 def test_representation_and_string(self):CODE
LOW⚡tests/test_wires.py224 def test_array_representation(self):CODE
LOW⚡tests/test_wires.py610 def test_error_for_incorrect_jax_arrays(self, input):CODE
LOW⚡tests/test_wires.py619 def test_error_for_repeated_wires_jax(self, iterable):CODE
LOW⚡tests/test_wires.py624 def test_array_representation_jax(self):CODE
LOWtests/test_wires.py54 def test_creation_from_common_iterables(self, iterable):CODE
LOWtests/test_wires.py235 def test_jax_array_representation(self):CODE
LOWtests/test_wires.py263 def test_convert_to_numpy_array(self):CODE
LOWtests/test_wires.py330 def test_select_random_method(self):CODE
LOWtests/test_wires.py369 def test_all_wires_with_abstract(self):CODE
LOWtests/test_wires.py436 def test_wires_pytree_with_array_leaves(self):CODE
LOWtests/test_wires.py526 def test_symmetric_difference(self, wire_a, wire_b, expected):CODE
LOWtests/test_wires.py591 def test_creation_from_jax_array(self, iterable, expected):CODE
LOWtests/test_wires.py655 def test_pass_in_abstract_wires(self):CODE
LOWtests/test_wires.py660 def test_unsubscripted_wire_raises(self):CODE
LOWtests/conftest.py143def enable_and_disable_capture(request):CODE
LOWtests/conftest.py173def enable_disable_dynamic_shapes():CODE
LOW⚡tests/conftest.py194def enable_graph_decomposition():CODE
LOW⚡tests/conftest.py201def disable_graph_decomposition():CODE
LOW⚡tests/conftest.py208def enable_and_disable_graph_decomp(request):CODE
LOWtests/conftest.py292def pytest_collection_modifyitems(items, config):CODE
LOWtests/conftest.py306def _handle_xfail_if_capture_marker(item):CODE
LOWtests/test_autograd_grad.py23def test_informative_error_on_bad_shape():CODE
LOW⚡tests/test_typing.py36 def test_isinstance_unknown_type(self):CODE
LOW⚡tests/test_typing.py45 def test_isinstance_numpy_array(self):CODE
LOW⚡tests/test_typing.py49 def test_isinstance_pennylane_tensor(self):CODE
LOW⚡tests/test_typing.py54 def test_isinstance_jax_array_is_tensor_like(self):CODE
LOW⚡tests/test_typing.py62 def test_isinstance_torch_tensor_is_tensor_like(self):CODE
LOW⚡tests/test_typing.py69 def test_subclass_unknown_type(self):CODE
LOW⚡tests/test_typing.py78 def test_subclass_numpy_array(self):CODE
LOW⚡tests/test_typing.py82 def test_subclass_pennylane_tensor(self):CODE
LOW⚡tests/test_typing.py87 def test_subclass_jax_array_is_tensor_like(self):CODE
LOW⚡tests/test_typing.py94 def test_subclass_torch_tensor_is_tensor_like(self):CODE
LOW⚡tests/test_typing.py394 def test_instance_check_unknown_rank(self):CODE
LOW⚡tests/test_typing.py401 def test_instance_check_rejects_non_array(self):CODE
LOW⚡tests/test_typing.py406 def test_weak_type_for_number_dtypes(self):CODE
LOW⚡tests/test_typing.py413 def test_is_compatible_with_non_numeric_input(self):CODE
LOW⚡tests/test_typing.py418 def test_is_compatible_with_weak_scalar(self):CODE
LOW⚡tests/test_typing.py428 def test_is_compatible_with_weak_array(self):CODE
LOW⚡tests/test_typing.py437 def test_is_compatible_with_arbitrary_shape(self):CODE
LOW⚡tests/test_typing.py444 def test_is_compatible_with_list(self):CODE
LOW⚡tests/test_typing.py450 def test_is_compatible_with_unknown_axes(self):CODE
LOW⚡tests/test_typing.py458 def test_is_compatible_with_torch_tensor(self):CODE
LOW⚡tests/test_typing.py605 def test_is_compatible_with_sequences(self):CODE
LOW⚡tests/test_typing.py614 def test_is_compatible_with_scalar(self):CODE
LOW⚡tests/test_typing.py619 def test_is_compatible_with_invalid(self):CODE
LOWtests/test_typing.py211 def test_invalid_shape_tuple_error(self):CODE
LOWtests/test_typing.py309 def test_error_indexing_into_non_scalar(self):CODE
8017 more matches not shown…
Cross-File Repetition1108 hits · 5540 pts
SeverityFileLineSnippetContext
HIGHtests/test_wires.py0tests that we can compare compilepipeline objects with the '==' and '!=' operators.STRING
HIGHtests/core/test_transform.py0tests that we can compare compilepipeline objects with the '==' and '!=' operators.STRING
HIGHtests/core/test_compile_pipeline.py0tests that we can compare compilepipeline objects with the '==' and '!=' operators.STRING
HIGHtests/default_qubit_legacy.py0allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axiSTRING
HIGHpennylane/devices/qubit/apply_operation.py0allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axiSTRING
HIGHpennylane/devices/qubit_mixed/apply_operation.py0allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axiSTRING
HIGHtests/test_return_types_legacy.py0helper function to get the total number of shot copies from a shot vector.STRING
HIGHtests/test_return_types_qnode.py0helper function to get the total number of shot copies from a shot vector.STRING
HIGHtests/test_return_types.py0helper function to get the total number of shot copies from a shot vector.STRING
HIGHtests/test_return_types_legacy.py0test that single measurements return behavior does not change.STRING
HIGHtests/test_return_types_qnode.py0test that single measurements return behavior does not change.STRING
HIGHtests/test_return_types.py0test that single measurements return behavior does not change.STRING
HIGHtests/test_return_types_legacy.py0test the new return types for multiple measurements, it should always return a tuple containing the single measurements.STRING
HIGHtests/test_return_types_qnode.py0test the new return types for multiple measurements, it should always return a tuple containing the single measurements.STRING
HIGHtests/test_return_types.py0test the new return types for multiple measurements, it should always return a tuple containing the single measurements.STRING
HIGHpennylane/devices/tests/test_return_system.py0test the new return types for multiple measurements, it should always return a tuple containing the single measurements.STRING
HIGHtests/test_return_types_legacy.py0test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectorsSTRING
HIGHtests/test_return_types.py0test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectorsSTRING
HIGHtests/test_return_types_qnode.py0test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectorsSTRING
HIGHtests/test_return_types_legacy.py0test the support for executing qnodes with multiple different measurements using a device with shot vectorsSTRING
HIGHtests/test_return_types.py0test the support for executing qnodes with multiple different measurements using a device with shot vectorsSTRING
HIGHtests/test_return_types_qnode.py0test the support for executing qnodes with multiple different measurements using a device with shot vectorsSTRING
HIGHtests/test_return_types_legacy.py0test scalar-valued and sample measurements where sample takes an observable.STRING
HIGHtests/test_return_types_qnode.py0test scalar-valued and sample measurements where sample takes an observable.STRING
HIGHtests/test_return_types.py0test scalar-valued and sample measurements where sample takes an observable.STRING
HIGHtests/test_return_types_legacy.py0test scalar-valued and computational basis sample measurements.STRING
HIGHtests/test_return_types_qnode.py0test scalar-valued and computational basis sample measurements.STRING
HIGHtests/test_return_types.py0test scalar-valued and computational basis sample measurements.STRING
HIGHtests/test_return_types_legacy.py0test scalar-valued and counts measurements where counts takes an observable.STRING
HIGHtests/test_return_types_qnode.py0test scalar-valued and counts measurements where counts takes an observable.STRING
HIGHtests/test_return_types.py0test scalar-valued and counts measurements where counts takes an observable.STRING
HIGHtests/test_return_types_legacy.py0test scalar-valued and computational basis counts measurements.STRING
HIGHtests/test_return_types_qnode.py0test scalar-valued and computational basis counts measurements.STRING
HIGHtests/test_return_types.py0test scalar-valued and computational basis counts measurements.STRING
HIGHtests/test_return_types_legacy.py0test sample and counts measurements, each measurement with custom samples or computational basis state samples.STRING
HIGHtests/test_return_types_qnode.py0test sample and counts measurements, each measurement with custom samples or computational basis state samples.STRING
HIGHtests/test_return_types.py0test sample and counts measurements, each measurement with custom samples or computational basis state samples.STRING
HIGHtests/test_return_types_legacy.py0test scalar-valued, probability, sample and counts measurements all in a single qfunc.STRING
HIGHtests/test_return_types_qnode.py0test scalar-valued, probability, sample and counts measurements all in a single qfunc.STRING
HIGHtests/test_return_types.py0test scalar-valued, probability, sample and counts measurements all in a single qfunc.STRING
HIGHtests/test_return_types_legacy.py0check that an error is raised if the return type of an observable is unsupportedSTRING
HIGHtests/test_return_types.py0check that an error is raised if the return type of an observable is unsupportedSTRING
HIGHtests/devices/test_legacy_device.py0check that an error is raised if the return type of an observable is unsupportedSTRING
HIGHtests/devices/test_qubit_device.py0check that an error is raised if the return type of an observable is unsupportedSTRING
HIGHtests/test_return_types_legacy.py0test that no exception is raised when a state is returned along with another return typeSTRING
HIGHtests/test_return_types.py0test that no exception is raised when a state is returned along with another return typeSTRING
HIGHtests/measurements/test_state.py0test that no exception is raised when a state is returned along with another return typeSTRING
HIGHtests/test_return_types_legacy.py0tests that no error is raised when mutual information is measured with custom wire labelsSTRING
HIGHtests/test_return_types.py0tests that no error is raised when mutual information is measured with custom wire labelsSTRING
HIGHtests/measurements/test_mutual_info.py0tests that no error is raised when mutual information is measured with custom wire labelsSTRING
HIGHtests/test_queuing.py0test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps.STRING
HIGHtests/circuit_graph/test_circuit_graph.py0test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps.STRING
HIGHtests/gradients/core/test_metric_tensor.py0test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps.STRING
HIGHtests/capture/gradients/test_capture_diff.py0test that an error is raised if the argnums is not a collection.STRING
HIGHtests/capture/gradients/test_capture_jvp.py0test that an error is raised if the argnums is not a collection.STRING
HIGHtests/capture/gradients/test_capture_vjp.py0test that an error is raised if the argnums is not a collection.STRING
HIGHtests/core/test_measurements.py0test the execution of a custom sampled measurement.STRING
HIGHtests/measurements/test_measurements_legacy.py0test the execution of a custom sampled measurement.STRING
HIGHpennylane/devices/tests/test_measurements.py0test the execution of a custom sampled measurement.STRING
HIGHtests/core/test_measurements.py0test that executing a sampled measurement with ``shots=none`` raises an error.STRING
1048 more matches not shown…
Unused Imports1800 hits · 1468 pts
SeverityFileLineSnippetContext
LOWsetup.py1CODE
LOWtests/conftest.py22CODE
LOWtests/conftest.py29CODE
LOWtests/conftest.py226CODE
LOWtests/conftest.py234CODE
LOWtests/kernels/test_kernels.py36CODE
LOWtests/kernels/test_kernels.py37CODE
LOWtests/io/test_qualtran_io.py42CODE
LOWtests/qchem/vibrational/conftest.py26CODE
LOWtests/qchem/vibrational/conftest.py40CODE
LOWtests/qchem/vibrational/conftest.py54CODE
LOWtests/qchem/vibrational/conftest.py89CODE
LOWtests/qchem/openfermion_pyscf_tests/conftest.py58CODE
LOWtests/qchem/openfermion_pyscf_tests/conftest.py59CODE
LOWtests/data/data_manager/test_dataset_access.py47CODE
LOWtests/devices/default_tensor/test_default_tensor.py269CODE
LOW.github/workflows/scripts/upload_reports/upload.py5CODE
LOWpennylane/numeric_hamiltonians.py32CODE
LOWpennylane/__init__.py22CODE
LOWpennylane/__init__.py23CODE
LOWpennylane/__init__.py24CODE
LOWpennylane/__init__.py25CODE
LOWpennylane/__init__.py26CODE
LOWpennylane/__init__.py28CODE
LOWpennylane/__init__.py29CODE
LOWpennylane/__init__.py30CODE
LOWpennylane/__init__.py31CODE
LOWpennylane/__init__.py32CODE
LOWpennylane/__init__.py33CODE
LOWpennylane/__init__.py34CODE
LOWpennylane/__init__.py34CODE
LOWpennylane/__init__.py35CODE
LOWpennylane/__init__.py36CODE
LOWpennylane/__init__.py37CODE
LOWpennylane/__init__.py38CODE
LOWpennylane/__init__.py39CODE
LOWpennylane/__init__.py40CODE
LOWpennylane/__init__.py40CODE
LOWpennylane/__init__.py41CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py42CODE
LOWpennylane/__init__.py50CODE
LOWpennylane/__init__.py51CODE
LOWpennylane/__init__.py52CODE
LOWpennylane/__init__.py53CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py54CODE
LOWpennylane/__init__.py63CODE
LOWpennylane/__init__.py63CODE
LOWpennylane/__init__.py63CODE
LOWpennylane/__init__.py63CODE
1740 more matches not shown…
Docstring Block Structure193 hits · 965 pts
SeverityFileLineSnippetContext
HIGHpennylane/operation.py41Calculate the derivative of an operation. For an operation :math:`e^{i \hat{H} \phi t}`, this function returns the STRING
HIGHpennylane/_grad/value_and_grad.py121A :func:`~.qjit`-compatible transformation for returning the result and jacobian of a function. This function aSTRING
HIGHpennylane/_grad/jvp.py128A :func:`~.qjit` compatible Jacobian-vector product of PennyLane programs. This function allows the Jacobian-vectorSTRING
HIGH…labs/trotter_error/product_formulas/product_formula.py150Compose several product formulas into a single recursive formula. This represents the ordered product of the giSTRING
HIGH…labs/trotter_error/product_formulas/product_formula.py240Raise the formula to the power ``z``. This multiplies the existing :attr:`exponent` by ``z``. The original formSTRING
HIGHpennylane/labs/tcdq/mmd_loss_hw.py344Build a reusable loss function that computes the qudit graph-kernel MMD. The returned callable measures the distancSTRING
HIGHpennylane/labs/tcdq/mmd_loss_hw.py447Estimate the empirical qudit MMD loss for one parameter setting. The input ``target_data`` is interpreted as saSTRING
HIGHpennylane/labs/tcdq/qudit_expval_functions.py166Convert a qudit gate dictionary into a generator matrix and parameter map. Unlike the qubit version, generator vectSTRING
HIGHpennylane/labs/tcdq/qudit_expval_functions.py482Build an estimator for expectation values of a qudit IQP circuit. Returns a pure function that estimates the compleSTRING
HIGHpennylane/labs/tcdq/training.py178Create the requested JAX optimizer. Args: name (str): The name of the optimizer to create ('GradientDescentSTRING
HIGHpennylane/labs/tcdq/mmd_loss_pauli.py84Choose a reasonable radial basis function (RBF) kernel bandwidth from a target dataset. A good starting point for :STRING
HIGHpennylane/labs/tcdq/mmd_loss_pauli.py238Build a reusable loss function that computes the qubit Pauli-kernel Maximum Mean Discrepancy (MMD) loss. The reSTRING
HIGHpennylane/labs/tcdq/mmd_loss_pauli.py334Estimate the empirical qubit MMD loss for one parameter setting. The input ``target_data`` is interpreted as saSTRING
HIGHpennylane/labs/profiler/resource_profile.py367Converts a resource profile into a data structure compatible with `icicle/flame-graphs <https://plotly.com/python/icicleSTRING
HIGHpennylane/labs/profiler/extract.py47Profile the quantum resources required to implement a circuit or operator in terms of a given gate set. In additionSTRING
HIGHpennylane/labs/estimator_beta/estimate.py82Estimate the quantum resources required to implement a circuit or operator in terms of a given gateset. This functiSTRING
HIGH…ane/labs/estimator_beta/wires_manager/wire_counting.py45A recursive function that tracks auxiliary qubits via three quantities over the course of the workflow. It tracks thSTRING
HIGH…ane/labs/estimator_beta/wires_manager/wire_counting.py174A private function that pre-processes the quantum tape obtained from a qfunc as part of the wire tracking pipeline. STRING
HIGH…ane/labs/estimator_beta/wires_manager/wire_counting.py253Determine the number of auxiliary qubits needed to decompose the operators of a quantum circuit into a specific ``gaSTRING
HIGH…ane/labs/estimator_beta/wires_manager/wire_counting.py340Determine the number of auxiliary qubits needed to decompose the operators in a :class:`~.pennylane.estimator.resourSTRING
HIGHpennylane/labs/estimator_beta/templates/subroutines.py1626Input validation for the various parameters and optimizes the batch_size and bits_per_iter. Args: nSTRING
HIGH…ne/labs/estimator_beta/ops/qubit/non_parametric_ops.py28Returns a list representing the resources for a controlled version of the :class:`~.pennylane.estimator.ops.qubit.non_paSTRING
HIGHpennylane/capture/autograph/transformer.py213Utility function to retrieve the source code of a function converted by AutoGraph. .. warning:: Nested funSTRING
HIGHpennylane/core/qscript.py46Process the annotated queue, creating a list of quantum operations and measurement processes. Args: queSTRING
HIGHpennylane/core/apply.py27Apply an instantiated operator or measurement to the active program. Args: op (.Operator or .MeasurementProSTRING
HIGHpennylane/backline/functions.py117Compile Triton quantum error correction decoder functions into a coprocessor function for use with :mod:`~.backline`STRING
HIGHpennylane/backline/functions.py185Compile a CSS code's Tanner graph into a coprocessor decode function for use with :mod:`~.backline`. Accepts thSTRING
HIGHpennylane/backline/onnx.py115Create a coprocessor function that runs an ONNX model on each message, for use with :mod:`~.backline`. Each mesSTRING
HIGHpennylane/backline/transports.py81Return the :class:`Transport` registered under ``name``. Args: name (str): The transport name, as registereSTRING
HIGHpennylane/backline/decode.py206Calls a coprocessor function available on the :class:`~.Backline` to perform quantum error correction decoding --- pSTRING
HIGHpennylane/backline/runtime/operands.py99The bytes of a ``str`` argument, NUL-padded to ``STR_OPERAND_BYTES``. Args: ctype (CType): the parameter tySTRING
HIGHpennylane/backline/runtime/operands.py159Build every operand a recorded call passes. Args: signature (CSignature): the signature being called STRING
HIGHpennylane/backline/runtime/operands.py190How big each ``out`` buffer of a call is. Args: signature (CSignature): the signature being called STRING
HIGHpennylane/backline/decoders/triton/decoder_frontend.py75Build a shared library based on the decoder functions provided. Args: decoder_fns (tuple[object, ...]): TupSTRING
HIGHpennylane/backline/decoders/triton/decoder_frontend.py174Build a shared library for a triton-based CSS belief-propagation decoder. This helper specializes one Triton decodeSTRING
HIGHpennylane/backline/decoders/triton/decoder_frontend.py245Validate and convert a parity-check matrix to a NumPy array. Args: H (ArrayLike): Candidate parity-check maSTRING
HIGHpennylane/backline/decoders/triton/triton_so_builder.py177Compile a Triton kernel and package it into a shared library. Args: kernel (Callable): Triton kernel to comSTRING
HIGHpennylane/backline/decoders/triton/triton_so_builder.py274AOT-compile a Triton kernel and keep the generated launcher source. Args: kernel (Callable): Triton kernel STRING
HIGHpennylane/optimize/qng.py322Restores an arbitrary nested structure to a flattened iterable. See also :func:`_flatten`. Args: flat STRING
HIGHpennylane/optimize/spsa.py22The Simultaneous Perturbation Stochastic Approximation method (SPSA) is a stochastic approximation algorithm for optSTRING
HIGHpennylane/liealg/lie_closure.py52Compute the (dynamical) Lie algebra from a set of generators. The Lie closure, pronounced "Lee" closure, is a way tSTRING
HIGHpennylane/liealg/lie_closure.py208Find a linearly independent basis of a list of (skew-) Hermitian matrices .. note:: The first ``subbasis_length`` eSTRING
HIGHpennylane/estimator/estimate.py57Estimate the quantum resources required to implement a circuit or operator in terms of a given gateset. Args: STRING
HIGHpennylane/estimator/estimate.py654Apply the default decomposition for a given symbolic operator (Adjoint, Control, Pow). Args: base_compr_resSTRING
HIGHpennylane/estimator/templates/qsp.py890Returns a list representing the resources of the operator. Each object in the list represents a gate and the numSTRING
HIGHpennylane/estimator/ops/op_math/symbolic.py1036Create the adjoint of a resource-tracking gate. For a :class:`~.GateCount`, it wraps the gate in :class:`~.AdjoSTRING
HIGHpennylane/io/io.py415Converts a Qiskit `NoiseModel <https://qiskit.github.io/qiskit-aer/stubs/qiskit_aer.noise.NoiseModel.html>`__ into aSTRING
HIGHpennylane/io/qasm_interpreter.py220 Rotates a BitType variable left by n bits. Note we need a Variable because we need to know the size of the regiSTRING
HIGHpennylane/io/qasm_interpreter.py345 Attempts to retrieve a variable from the current context by name. Args: name (str): the naSTRING
HIGHpennylane/io/qasm_interpreter.py414 If the attribute is not found on the class, instead uses the attr name as an index into the context dicSTRING
HIGHpennylane/io/qasm_interpreter.py563 Entry point for visiting the QASMNodes of a parsed OpenQASM 3.0 program. Args: node (QASMNSTRING
HIGHpennylane/io/qasm_interpreter.py1040 Index into a variable using an IndexExpression. Args: var (Variable): The data structure rSTRING
HIGHpennylane/io/qasm_interpreter.py1370 Helper to setup the quantum gate call, also resolving arguments and wires. Args: node (QuaSTRING
HIGHpennylane/io/qasm_interpreter.py1401 Sets up wires for a QuantumGate or QuantumPhase application. Args: node (QuantumPhase | QuSTRING
HIGHpennylane/io/qasm_interpreter.py1526 Registers a Cast expression. Args: node (Cast): The Cast expression. context (STRING
HIGHpennylane/io/qasm_interpreter.py1616 An alias is registered as a callable since we need to be able to evaluate it at a later time. STRING
HIGHpennylane/io/qasm_interpreter.py1642 Registers an identifier. Args: node (Identifier): The identifier. context (ConSTRING
HIGHpennylane/io/qualtran_io.py812Reads a `Qualtran Bloq <https://qualtran.readthedocs.io/en/latest/bloqs/index.html#bloqs-library>`_ signature and reSTRING
HIGHpennylane/io/qualtran_io.py1438 Converts a PennyLane :class:`~.QNode`, ``Qfunc``, or :class:`~.Operation` to the corresponding `Qualtran Bloq <httpSTRING
HIGHpennylane/ftqc/lattice.py125Generates a :class:`~pennylane.ftqc.Lattice` object with a given geometric parameters and its shape name. Args: STRING
133 more matches not shown…
Self-Referential Comments145 hits · 478 pts
SeverityFileLineSnippetContext
MEDIUMtests/dummy_debugger.py26 # Create a dummy object to act as the deviceCOMMENT
MEDIUMtests/default_qubit_legacy.py217 # Create the initial state. Internally, we store theSTRING
MEDIUMtests/default_qubit_legacy.py1002 # Create a locally rolling seed by using deterministic context propertiesCOMMENT
MEDIUMtests/core/test_transform.py685 # Create a simple device and tapeCOMMENT
MEDIUMtests/core/test_compile_pipeline.py1503 # Create a single QuantumScript (not wrapped in a tuple)COMMENT
MEDIUMtests/core/test_compile_pipeline.py1681 # Create a dummy device with a custom preprocess_transforms methodCOMMENT
MEDIUMtests/core/test_compile_pipeline.py1695 # Create a program with transformsCOMMENT
MEDIUMtests/liealg/test_horizontal_cartan_subalgebra.py200 # Create a non-orthonormal basis on 1 qubitCOMMENT
MEDIUMtests/liealg/test_horizontal_cartan_subalgebra.py204 # Create an adjvec for three operators, which we understand to be in basis_0COMMENT
MEDIUMtests/liealg/test_horizontal_cartan_subalgebra.py218 # Create a non-orthonormal basis on 2 qubitsCOMMENT
MEDIUMtests/liealg/test_horizontal_cartan_subalgebra.py222 # Create an adjvec for 13 operators, which we understand to be in basis_1COMMENT
MEDIUMtests/ftqc/test_mbqc_gates.py72 # Define the graph structure for the RZ cluster state (omit node 1 for input):COMMENT
MEDIUMtests/ftqc/test_mbqc_gates.py124 # Define the graph structure for the CNOT cluster state (omit nodes 1 and 9 for input)COMMENT
MEDIUM⚡tests/ftqc/test_qubit_graph.py641 # Create a cyclically nested graphCOMMENT
MEDIUMtests/ftqc/test_qubit_graph.py159 # Create the expected graph structure for Surface Code 17COMMENT
MEDIUM⚡tests/math/test_matrix_manipulation.py922 # Define a 2-qubit density matrixCOMMENT
MEDIUM⚡tests/math/test_matrix_manipulation.py934 # Define a 2-qubit density matrixCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py30# Define a list of dtypes to testCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py855 # Define a 2-qubit density matrixCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py870 # Define a batch of 2-qubit density matricesCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py894 # Define a 2-qubit density matrixCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py907 # Define a 2-qubit density matrixCOMMENT
MEDIUMtests/math/test_matrix_manipulation.py1182 # Create a positive definite matrixCOMMENT
MEDIUMtests/transforms/zx/test_converter.py338 # Create the qubits in the graph and the qubit mapperCOMMENT
MEDIUMtests/transforms/zx/test_converter.py407 # Create the qubits in the graph and the qubit mapperCOMMENT
MEDIUMtests/transforms/zx/test_converter.py460 # Create the qubits in the graph and the qubit mapperCOMMENT
MEDIUMtests/transforms/zx/test_converter.py513 # Create the qubits in the graph and the qubit mapperCOMMENT
MEDIUMtests/workflow/test_qnode_legacy.py1108 # Create a uniform probability distribution for 2 qubitsCOMMENT
MEDIUMtests/workflow/test_qnode_legacy.py1127 # Create a uniform probability distribution for 2 qubitsCOMMENT
MEDIUMtests/workflow/test_qnode_legacy.py1145 # Create a biased probability distribution (not uniform to make differences more apparent)COMMENT
MEDIUMtests/workflow/test_qnode_legacy.py1199 # Create a circuit that performs classical shadow measurementCOMMENT
MEDIUMtests/workflow/test_qnode_legacy.py1343 # Create a simple tape for executionCOMMENT
MEDIUMtests/ops/op_math/test_linear_combination.py1397 # Create a graph with unique solution so that test does not depend on solver/implementationCOMMENT
MEDIUMtests/measurements/test_probs.py250 # Define a batch of density matricesCOMMENT
MEDIUMtests/measurements/test_probs.py285 # Define a density matrix for a 4-qubit systemCOMMENT
MEDIUM⚡tests/measurements/test_purity_measurement.py97 # Define a non-trivial two-qubit density matrixCOMMENT
MEDIUM⚡tests/measurements/test_purity_measurement.py104 # Define the wires (qubits) of our systemCOMMENT
MEDIUMtests/measurements/test_var.py234 # Define a non-trivial two-qubit density matrixCOMMENT
MEDIUMtests/measurements/test_mutual_info.py108 # Define a pure, entangled two-qubit state (|00> + |11>) / sqrt(2)COMMENT
MEDIUMtests/measurements/test_vn_entropy.py136 # Define a non-trivial two-qubit density matrixCOMMENT
MEDIUMtests/devices/test_default_mixed.py128 # Create a QNode with the specified interfaceCOMMENT
MEDIUMtests/devices/test_default_mixed.py161 # Create a QNode with the specified interfaceCOMMENT
MEDIUM⚡tests/devices/test_null_qubit.py1279 # Create a custom operator that's not in the standard gatesetCOMMENT
MEDIUM⚡tests/devices/test_null_qubit.py1287 # Create a tape with this custom operatorCOMMENT
MEDIUM⚡tests/devices/test_preprocess.py510 # Create a tape with an operation that needs decompositionCOMMENT
MEDIUMtests/devices/test_preprocess.py611 # Create a tape with an operation that needs decompositionCOMMENT
MEDIUM⚡tests/devices/qubit/test_apply_operation.py134 # Create a random unitary matrixCOMMENT
MEDIUM⚡tests/devices/qubit/test_apply_operation.py138 # Create a random state vectorCOMMENT
MEDIUM⚡tests/devices/qubit/test_apply_operation.py153 # Create a random unitary matrixCOMMENT
MEDIUM⚡tests/devices/qubit/test_apply_operation.py157 # Create a random state vectorCOMMENT
MEDIUM⚡tests/devices/qubit/test_apply_operation.py220 # Create a dense state, shape (2,2,2)COMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py125 # Create a sparse observableCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py203 # Create a Sum observable that involves the operatorsCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py207 # Create the measurement processCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py210 # Create a mock state (you would normally use a real state here)COMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py696 # Define the readout error probabilityCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py699 # Define the readout error operation using qp.BitFlipCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py703 # Define the state: let's use the |+⟩ stateCOMMENT
MEDIUM⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py707 # Define the observableCOMMENT
MEDIUMtests/devices/qubit_mixed/test_qubit_mixed_simulate.py215 # Create a cache dictionary to store statesCOMMENT
85 more matches not shown…
Over-Commented Block367 hits · 338 pts
SeverityFileLineSnippetContext
LOWconftest.py1# Copyright 2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/conftest.py1# Copyright 2018-2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/test_compiler.py1# Copyright 2023 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/test_numeric_hamiltonians.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/test_about.py1# Copyright 2018-2020 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/kernels/test_kernels.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/drawer/test_draw_catalyst.py1# Copyright 2023 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/drawer/test_tape_mpl.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/drawer/test_draw.py1# Copyright 2018-2022 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/drawer/test_tape_text.py1# Copyright 2018-2020 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_while_loop.py1# Copyright 2018-2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_transforms.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_templates.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_nested_plxpr.py1# Copyright 2018-2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_operators.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_dynamic_shapes.py1# Copyright 2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_base_interpreter.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_measurements_capture.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_cond.py1# Copyright 2018-2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_mid_measure.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_qnode.py1# Copyright 2018-2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_meta_type.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_custom_primitives.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_for_loop.py1# Copyright 2018-2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/test_capture_pauli_measure.py1# Copyright 2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/autograph/test_if_else.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/autograph/test_autograph_for_loop.py1# Copyright 2023 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/autograph/test_autograph_while_loop.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/autograph/test_autograph.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/autograph/test_autograph_logical_ops.py1# Copyright 2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/capture/gradients/test_capture_diff.py521 # + prod_cos_e_i[:, :, None] / x[None, None, :]COMMENT
LOWtests/gpu/test_gpu_torch.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/core/test_compile_pipeline.py1# Copyright 2023 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/core/operator/test_operator2.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/core/operator/operator2_utils.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/core/operator/test_operator2_capture.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/core/operator/test_operator2_equality.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/test_backline_functions.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/test_decode.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/decoders/test_triton_so_builder_cache.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/decoders/test_triton_so_builder.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/decoders/test_triton_algorithms.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/decoders/test_decoder_frontend.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/backline/decoders/test_triton_utils.py1# Copyright 2026 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_optimize_shot_adaptive.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_optimize.py1# Copyright 2018-2020 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_qnspsa.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_momentum_qng.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_reconstruct.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_qng_qjit.py1# Copyright 2018-2025 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_rotosolve.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/optimize/test_qng.py1# Copyright 2018-2021 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/circuit_graph/test_circuit_graph.py1# Copyright 2018-2020 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/shadow/test_shadow_class.py1# Copyright 2022 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/shadow/test_shadow_transforms.py1# Copyright 2022 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/shadow/test_shadow_entropies.py1# Copyright 2022 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/liealg/test_horizontal_cartan_subalgebra.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/liealg/test_lie_closure.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/liealg/test_cartan_decomp.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
LOWtests/liealg/test_involutions.py1# Copyright 2024 Xanadu Quantum Technologies Inc.COMMENT
307 more matches not shown…
Decorative Section Separators120 hits · 325 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_return_types_legacy.py749# -------------------------------------------------COMMENT
MEDIUMtests/test_return_types_legacy.py751# -------------------------------------------------COMMENT
MEDIUMtests/test_return_types_qnode.py1717# -------------------------------------------------COMMENT
MEDIUMtests/test_return_types_qnode.py1719# -------------------------------------------------COMMENT
MEDIUMtests/gate_data.py7# ========================================================COMMENT
MEDIUMtests/gate_data.py9# ========================================================COMMENT
MEDIUMtests/gate_data.py96# ========================================================COMMENT
MEDIUMtests/gate_data.py98# ========================================================COMMENT
MEDIUMtests/test_return_types.py774# -------------------------------------------------COMMENT
MEDIUMtests/test_return_types.py776# -------------------------------------------------COMMENT
MEDIUMtests/workflow/interfaces/execute/test_jax.py110 # ------------------------------------COMMENT
MEDIUMtests/workflow/interfaces/execute/test_torch.py105 # ------------------------------------COMMENT
MEDIUMtests/workflow/interfaces/execute/test_autograd.py85 # ------------------------------------COMMENT
MEDIUM⚡…es/subroutines/time_evolution/test_trotter_vibronic.py501# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…es/subroutines/time_evolution/test_trotter_vibronic.py503# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…es/subroutines/time_evolution/test_trotter_vibronic.py683# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…es/subroutines/time_evolution/test_trotter_vibronic.py685# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py40# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py42# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py191# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py193# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py298# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py300# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py855# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/subroutines/time_evolution/test_trotter_vibronic.py857# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ops/functions/test_equal.py1319 # ------------------COMMENT
MEDIUMtests/ops/functions/test_equal.py1334 # ------------------COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py371 # ============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py410 # =============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py463 # =============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py491 # ============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py508 # ============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py533 # =============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py563 # =============================================COMMENT
MEDIUMtests/gradients/core/test_metric_tensor.py591 # ============================================COMMENT
MEDIUM.github/workflows/docs.yml2# -----------------COMMENT
MEDIUM.github/workflows/docs.yml15# -----------------COMMENT
MEDIUMdoc/conf.py340# ============================================================COMMENT
MEDIUMpennylane/exceptions.py82# =============================================================================STRING
MEDIUMpennylane/exceptions.py84# =============================================================================STRING
MEDIUMpennylane/exceptions.py124# =============================================================================COMMENT
MEDIUMpennylane/exceptions.py126# =============================================================================COMMENT
MEDIUMpennylane/exceptions.py180# =============================================================================COMMENT
MEDIUMpennylane/exceptions.py182# =============================================================================COMMENT
MEDIUMpennylane/exceptions.py205# =============================================================================COMMENT
MEDIUMpennylane/exceptions.py207# =============================================================================COMMENT
MEDIUMpennylane/labs/tests/conftest.py26# ==========================================================COMMENT
MEDIUMpennylane/labs/tests/conftest.py211# ============================COMMENT
MEDIUMpennylane/labs/tests/dla/test_dense_utils.py94 # -------------------COMMENT
MEDIUMpennylane/core/qscript.py216 # ========================================================COMMENT
MEDIUMpennylane/core/qscript.py218 # ========================================================COMMENT
MEDIUMpennylane/core/qscript.py542 # ========================================================COMMENT
MEDIUMpennylane/core/qscript.py544 # ========================================================COMMENT
MEDIUMpennylane/core/qscript.py770 # ========================================================STRING
MEDIUMpennylane/core/qscript.py772 # ========================================================STRING
MEDIUMpennylane/core/qscript.py903 # ========================================================STRING
MEDIUMpennylane/core/qscript.py905 # ========================================================STRING
MEDIUM⚡pennylane/core/operator/operator2.py1749# -------------------------------------------------------------------------------COMMENT
MEDIUM⚡pennylane/core/operator/operator2.py1751# -------------------------------------------------------------------------------COMMENT
MEDIUMpennylane/core/operator/operator2.py428 # ------------------------------------------------------------------------COMMENT
60 more matches not shown…
Deep Nesting245 hits · 231 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py371CODE
LOWtests/default_qubit_legacy.py298CODE
LOWtests/test_return_types_legacy.py884CODE
LOWtests/test_return_types_legacy.py991CODE
LOWtests/test_return_types_legacy.py1090CODE
LOWtests/test_return_types_legacy.py1144CODE
LOWtests/test_return_types_qnode.py1856CODE
LOWtests/test_return_types_qnode.py2057CODE
LOWtests/test_return_types_qnode.py2110CODE
LOWtests/test_return_types_qnode.py2397CODE
LOWtests/test_return_types_qnode.py2429CODE
LOWtests/test_return_types_qnode.py2461CODE
LOWtests/test_return_types.py1185CODE
LOWtests/kernels/test_kernels.py601CODE
LOWtests/capture/autograph/test_autograph_array_update.py39CODE
LOWtests/capture/autograph/test_autograph_array_update.py42CODE
LOWtests/optimize/test_rotosolve.py30CODE
LOWtests/io/qasm_interpreter/test_interpreter.py838CODE
LOWtests/docs/test_supported_confs.py259CODE
LOWtests/qchem/test_factorization.py396CODE
LOWtests/qchem/vibrational/test_pes_generator.py384CODE
LOWtests/qchem/openfermion_pyscf_tests/test_convert.py895CODE
LOWtests/workflow/interfaces/qnode/test_torch_qnode.py1437CODE
LOWtests/workflow/interfaces/qnode/test_jax_jit_qnode.py2139CODE
LOWtests/templates/subroutines/test_qubitization_thc.py90CODE
LOW…mplates/subroutines/time_evolution/test_trotter_cgf.py78CODE
LOW…tes/subroutines/time_evolution/trotter_test_helpers.py94CODE
LOW…ts/templates/subroutines/time_evolution/fermi_tools.py33CODE
LOWtests/templates/layers/test_particle_conserving_u1.py109CODE
LOW…sts/templates/state_preparations/test_partial_unary.py128CODE
LOW…sts/templates/state_preparations/test_partial_unary.py174CODE
LOWtests/qnn/test_iqp_expval.py114CODE
LOWtests/qnn/test_iqp_expval.py153CODE
LOWtests/ops/qubit/test_non_parametric_ops.py311CODE
LOWtests/ops/qubit/test_non_parametric_ops.py346CODE
LOWtests/ops/qubit/test_non_parametric_ops.py383CODE
LOWtests/ops/qubit/test_non_parametric_ops.py431CODE
LOWtests/ops/qubit/test_non_parametric_ops.py471CODE
LOWtests/pauli/test_pauli_arithmetic.py933CODE
LOWtests/pauli/grouping/test_pauli_graph_colouring.py27CODE
LOWtests/resource/test_specs.py1269CODE
LOWtests/resource/test_specs.py1276CODE
LOWtests/gradients/core/test_hadamard_gradient.py1025CODE
LOWtests/data/data_manager/test_dataset_access.py155CODE
LOWtests/measurements/test_probs.py645CODE
LOWtests/measurements/test_probs.py703CODE
LOWtests/helpers/hint_helpers.py19CODE
LOWtests/devices/test_device_api.py459CODE
LOWtests/devices/test_device_api.py512CODE
LOWtests/devices/test_preprocess.py639CODE
LOWpennylane/registers.py21CODE
LOWpennylane/registers.py81CODE
LOWpennylane/about.py53CODE
LOWpennylane/circuit_graph.py82CODE
LOWpennylane/labs/dla/variational_kak.py350CODE
LOWpennylane/labs/tests/tcdq/test_iqp_expval.py95CODE
LOWpennylane/labs/trotter_error/product_formulas/bch.py336CODE
LOW…lane/labs/trotter_error/product_formulas/commutator.py279CODE
LOW…labs/trotter_error/realspace/realspace_coefficients.py206CODE
LOWpennylane/labs/tcdq/utils.py61CODE
185 more matches not shown…
Empty Error Handlers17 hits · 85 pts
SeverityFileLineSnippetContext
HIGHtests/io/qasm_interpreter/test_interpreter.py72except (ModuleNotFoundError, ImportError) as import_error:CODE
HIGHtests/ops/op_math/test_linear_combination.py45except ImportError:CODE
HIGHtests/ops/op_math/test_linear_combination.py52except ImportError:CODE
HIGHtests/data/data_manager/test_dataset_access.py50except ImportError:CODE
HIGHpennylane/about.py86except (FileNotFoundError, json.JSONDecodeError):CODE
HIGHpennylane/labs/tcdq/training.py40except (ModuleNotFoundError, ImportError) as import_error:CODE
HIGHpennylane/core/qscript.py419except AttributeError:CODE
HIGHpennylane/io/qasm_interpreter.py588except EndProgram:CODE
HIGHpennylane/io/qasm_interpreter.py747except BreakException:CODE
HIGHpennylane/io/qasm_interpreter.py784except ContinueException:CODE
HIGHpennylane/io/qasm_interpreter.py858except ContinueException:CODE
HIGHpennylane/io/qualtran_io.py1083except (qt.DecomposeNotImplementedError, qt.DecomposeTypeError):CODE
HIGHpennylane/transforms/batch_partial.py140except ImportError:CODE
HIGH…lane/transforms/decompositions/clifford_t_transform.py84except (ModuleNotFoundError, ImportError): # pragma: no coverCODE
HIGHpennylane/gradients/vjp.py350except (AttributeError, TypeError, NotImplementedError):CODE
HIGHpennylane/gradients/jvp.py330except (AttributeError, TypeError):CODE
HIGHpennylane/data/base/dataset.py196except KeyError:CODE
Redundant / Tautological Comments44 hits · 49 pts
SeverityFileLineSnippetContext
LOWtests/pauli/test_pauli_arithmetic.py860 assert copied_string1 == result # Check if the modified object matches the expected resultCODE
LOWtests/pauli/test_pauli_arithmetic.py869 assert copy_ps1 == res # Check if the modified object matches the expected resultCODE
LOWtests/measurements/test_probs.py268 # Check if the calculated probabilities match the expected valuesCOMMENT
LOWtests/measurements/test_probs.py315 # Check if the calculated probabilities match the expected valuesCOMMENT
LOW⚡tests/devices/qubit/test_sampling.py1326 # Check if the distribution is roughly correct (allowing for some variance)COMMENT
LOW⚡tests/devices/qubit/test_sampling.py1335 # Check if all possible states are presentCOMMENT
LOW⚡tests/devices/qubit_mixed/test_qubit_mixed_measure.py214 # Check if we hit the tensor contraction branchCOMMENT
LOWpennylane/capture/jax_patches.py253 # Check if we're in the inline pathCOMMENT
LOWpennylane/capture/autograph/transformer.py66 # Check if the function has already been converted.COMMENT
LOWpennylane/capture/autograph/ag_primitives.py221 # Assign tracers to the iteration variables identified by AutoGraph (iter_args in mlir).COMMENT
LOWpennylane/core/operator/operator2.py1721 # Check if either shape or dtype is not compatibleCOMMENT
LOWpennylane/core/operator/base.py986 # Check if the expected number of parameters coincides with the one received.COMMENT
LOWpennylane/liealg/cartan_decomp.py187 # Check if rank increases by adding matices from ``subspace``COMMENT
LOWpennylane/qchem/vibrational/localize_modes.py130 # Check if the minimization was successful; if it wasn't, proceed with the normal modes.STRING
LOWpennylane/math/__init__.py180 # Check if object is purely realCOMMENT
LOWpennylane/math/utils.py178 # Check if all non-zeros in the sparse matrix match the scalarCOMMENT
LOWpennylane/math/quantum.py1224 # Check if the matrix is HermitianCOMMENT
LOWpennylane/math/quantum.py1229 # Check if positive semi-definiteCOMMENT
LOWpennylane/transforms/optimization/pattern_matching.py1702 # Check if two groups of matches are incompatible.COMMENT
LOW…e/transforms/optimization/merge_amplitude_embedding.py69 # Check if the current gate is an AmplitudeEmbedding.STRING
LOWpennylane/transforms/optimization/merge_rotations.py203 # Check if the rotation is composable; if it is not, move on.STRING
LOW…lane/transforms/decompositions/clifford_t_transform.py104 # Check if matrix can be calculated for the operatorSTRING
LOW…lane/transforms/decompositions/clifford_t_transform.py340 # Check if the subsequent gate exists in the vicinityCOMMENT
LOWpennylane/ops/op_math/exp.py353 # Check if the exponential can be decomposed into a PauliRot gateCOMMENT
LOWpennylane/ops/op_math/decompositions/grid_problems.py645 # Check if the solution is follows the constraints of the target-region.COMMENT
LOWpennylane/ops/op_math/decompositions/grid_problems.py698 # Check if it is easier to solve problem for either of x-or-y-interval.STRING
LOWpennylane/ops/op_math/decompositions/grid_problems.py814 # Check if we are indeed within the intended interval.STRING
LOWpennylane/ops/op_math/decompositions/grid_problems.py853 f_adj2 = False # Check if we need to apply the sqrt(2) conjugation.STRING
LOWpennylane/ops/op_math/decompositions/grid_problems.py871 # Check if we are solving the problem for the intended interval.STRING
LOW⚡pennylane/ops/op_math/decompositions/grid_problems.py888 # Check if the bounds on the interval contains an integer.STRING
LOW⚡pennylane/ops/op_math/decompositions/grid_problems.py891 # Check if the solution satisfies both bounds on x and y.STRING
LOW⚡pennylane/ops/op_math/decompositions/grid_problems.py894 # Check if the consecutive solutions are within the desired bounds.STRING
LOWpennylane/ops/op_math/decompositions/ross_selinger.py57 # Check if abs_theta is an odd multiple of PI_8STRING
LOWpennylane/ops/op_math/decompositions/rings.py130 if (dv := ZSqrtTwo(n1 // d, n2 // d)) != ZSqrtTwo(0, 0): # Check if floor division worksSTRING
LOWpennylane/ops/op_math/decompositions/norm_solver.py400 # Check if the next_xi is divisible by the element eta in Z[√2].STRING
LOWpennylane/ops/functions/is_commuting.py319 # Check if operations are non simplified rotations and return commutation if it is the case.STRING
LOWpennylane/pauli/pauli_vspace.py292 # Check if new vector is linearly dependent on the current basisSTRING
LOWpennylane/gradients/vjp.py120 # Check if we're dealing with object arrays or non-standard types that don't support matmulCOMMENT
LOWpennylane/decomposition/decomposition_graph.py920 # Check if this decomposition is feasible under the work wire constraintCOMMENT
LOWpennylane/devices/default_clifford.py145 # Check if the operation is noisyCOMMENT
LOWpennylane/devices/default_clifford.py725 # Check if the rotation was permissibleCOMMENT
LOWpennylane/devices/default_clifford.py965 # Check if it is CliffordSTRING
LOWpennylane/devices/_qubit_device.py638 # Check if there is an overridden version of the measurement processCOMMENT
LOWpennylane/devices/_qubit_device.py686 # Check if the state is accessible and decide to return the state or the densityCOMMENT
Modern Structural Boilerplate58 hits · 48 pts
SeverityFileLineSnippetContext
LOWdoc/conf.py21logger = logging.getLogger(__name__)CODE
LOWpennylane/numeric_hamiltonians.py44__all__ = [STRING
LOWpennylane/_grad/__init__.py23__all__ = ["grad", "jacobian", "jvp", "vjp", "value_and_grad"]CODE
LOWpennylane/labs/__init__.py46__all__ = []STRING
LOWpennylane/labs/trotter_error/__init__.py106__all__ = [STRING
LOWpennylane/labs/trotter_error/fragments/__init__.py20__all__ = [CODE
LOW…nylane/labs/trotter_error/product_formulas/__init__.py20__all__ = [CODE
LOW…ylane/labs/trotter_error/realspace/realspace_matrix.py109 def set_block(self, row: int, col: int, rs_sum: RealspaceSum) -> None:STRING
LOWpennylane/labs/trotter_error/realspace/__init__.py21__all__ = [CODE
LOWpennylane/labs/tcdq/__init__.py335__all__ = [STRING
LOWpennylane/capture/primitives.py43__all__ = [CODE
LOWpennylane/capture/autograph/ag_primitives.py39__all__ = [CODE
LOWpennylane/core/__init__.py142__all__ = [CODE
LOWpennylane/core/queuing.py454__all__ = ["QueuingManager", "AnnotatedQueue", "remove_from_program"]CODE
LOWpennylane/core/qscript.py1147__all__ = [CODE
LOWpennylane/core/measurements.py587__all__ = ["MeasurementProcess", "SampleMeasurement", "StateMeasurement", "MeasurementTransform"]CODE
LOWpennylane/core/apply.py158__all__ = ["apply"]CODE
LOWpennylane/core/transforms/__init__.py32__all__ = ["transform", "Transform", "BoundTransform", "CompilePipeline"]CODE
LOWpennylane/core/operator/channel.py90__all__ = ["Channel"]STRING
LOWpennylane/core/operator/__init__.py169__all__ = [STRING
LOWpennylane/core/operator/state_prep.py60__all__ = ["StatePrepBase"]CODE
LOWpennylane/core/operator/base.py1738__all__ = ["Operator", "Operation"]STRING
LOWpennylane/backline/__init__.py229__all__ = [STRING
LOWpennylane/optimize/__init__.py40__all__ = [STRING
LOWpennylane/liealg/__init__.py134__all__ = [STRING
LOWpennylane/estimator/resource_config.py273 def set_single_qubit_rot_precision(self, precision: float) -> None:STRING
LOWpennylane/ftqc/primitives.py23__all__ = [CODE
LOWpennylane/ftqc/__init__.py58__all__ = [STRING
LOWpennylane/math/__init__.py212__all__ = [CODE
LOWpennylane/concurrency/__init__.py93__all__ = ["native", "external", "backends", "base"]STRING
LOWpennylane/concurrency/executors/__init__.py24__all__ = [STRING
LOWpennylane/concurrency/executors/native/__init__.py40__all__ = ["MPPoolExec", "PyNativeExec", "ProcPoolExec", "ThreadPoolExec", "SerialExec"]CODE
LOWpennylane/concurrency/executors/external/__init__.py35__all__ = [STRING
LOWpennylane/pytrees/__init__.py27__all__ = [CODE
LOWpennylane/workflow/execution.py36logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/_capture_qnode.py97logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/qnode.py44logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/qnode.py749 def _set_shots(self, shots: int | Shots) -> None:CODE
LOWpennylane/workflow/jacobian_products.py32logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/interfaces/jax.py157logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/interfaces/autograd.py97logger = logging.getLogger(__name__)CODE
LOWpennylane/workflow/interfaces/torch.py73logger = logging.getLogger(__name__)CODE
LOWpennylane/templates/core.py864__all__ = [CODE
LOWpennylane/templates/subroutines/__init__.py92__all__ = [STRING
LOWpennylane/qnn/torch.py551 def set_input_argument(input_name: str = "inputs") -> None:CODE
LOWpennylane/control_flow/for_loop.py39logger = logging.getLogger(__name__)CODE
LOWpennylane/resource/__init__.py60__all__ = [STRING
LOWpennylane/data/data_manager/progress/__init__.py90__all__ = ["Progress", "Task"]CODE
LOWpennylane/data/data_manager/progress/_rich.py33__all__ = ["make_progress", "RichProgress"]CODE
LOW…nylane/data/data_manager/progress/_default/__init__.py194__all__ = ["make_progress", "DefaultProgress"]CODE
LOWpennylane/decomposition/decomposition_rule.py446 def set_resources(self, resources: Callable | dict, exact_resources: bool = True) -> None:CODE
LOWpennylane/decomposition/decomposition_rule.py459 def set_work_wire_spec(self, work_wires: Callable | dict) -> None:CODE
LOWpennylane/devices/null_qubit.py47logger = logging.getLogger(__name__)CODE
LOWpennylane/devices/default_mixed.py49logger = logging.getLogger(__name__)STRING
LOWpennylane/devices/_qubit_device.py63logger = logging.getLogger(__name__)CODE
LOWpennylane/devices/default_qubit.py69logger = logging.getLogger(__name__)CODE
LOWpennylane/devices/qubit/adjoint_jacobian.py32logger = logging.getLogger(__name__)CODE
LOWpennylane/devices/qubit/simulate.py50logger = logging.getLogger(__name__)CODE
AI Structural Patterns50 hits · 46 pts
SeverityFileLineSnippetContext
LOWtests/default_qubit_legacy.py295CODE
LOWtests/capture/test_capture_qnode.py396CODE
LOWtests/transforms/test_split_non_commuting.py144CODE
LOWtests/workflow/interfaces/qnode/test_jax_jit_qnode.py1883CODE
LOWtests/workflow/interfaces/qnode/test_jax_jit_qnode.py1922CODE
LOWtests/workflow/interfaces/qnode/test_jax_jit_qnode.py1966CODE
LOWtests/workflow/interfaces/execute/test_jax_jit.py504CODE
LOWtests/workflow/interfaces/execute/test_jax_jit.py808CODE
LOWtests/workflow/interfaces/execute/test_jax_jit.py839CODE
LOWtests/measurements/test_counts.py772CODE
LOWpennylane/labs/dla/recursive_cartan_decomp.py106CODE
LOWpennylane/labs/trotter_error/product_formulas/bch.py155CODE
LOWpennylane/core/transforms/transform.py416CODE
LOWpennylane/core/transforms/transform.py467CODE
LOWpennylane/backline/decode.py194CODE
LOW…nnylane/estimator/qpe_resources/second_quantization.py98CODE
LOWpennylane/io/qasm_interpreter.py612CODE
LOWpennylane/qchem/molecule.py83CODE
LOWpennylane/qchem/openfermion_pyscf.py490CODE
LOWpennylane/qchem/openfermion_pyscf.py876CODE
LOWpennylane/qchem/dipole.py326CODE
LOWpennylane/qchem/hamiltonian.py402CODE
LOWpennylane/qchem/hamiltonian.py495CODE
LOWpennylane/qchem/hamiltonian.py546CODE
LOWpennylane/qchem/vibrational/vibrational_class.py98CODE
LOWpennylane/qchem/vibrational/pes_generator.py735CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py66CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py131CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py203CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py272CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py346CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py440CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py538CODE
LOWpennylane/qchem/vibrational/christiansen_utils.py642CODE
LOWpennylane/math/multi_dispatch.py645CODE
LOWpennylane/transforms/commutation_dag.py153CODE
LOWpennylane/transforms/decompose.py44CODE
LOWpennylane/workflow/execution.py50CODE
LOWpennylane/workflow/qnode.py505CODE
LOWpennylane/workflow/interfaces/jax_jit.py192CODE
LOWpennylane/workflow/interfaces/torch.py171CODE
LOWpennylane/ops/functions/assert_valid.py646CODE
LOWpennylane/ops/functions/assert_valid.py741CODE
LOWpennylane/gradients/spsa_gradient.py71CODE
LOWpennylane/gradients/spsa_gradient.py107CODE
LOWpennylane/gradients/jvp.py469CODE
LOWpennylane/devices/preprocess.py269CODE
LOWpennylane/devices/qubit_mixed/measure.py93CODE
LOWpennylane/devices/qubit_mixed/measure.py306CODE
LOWpennylane/devices/qubit_mixed/apply_operation.py255CODE
Excessive Try-Catch Wrapping39 hits · 44 pts
SeverityFileLineSnippetContext
LOWtests/backline/decoders/test_triton_so_builder.py32 except Exception:CODE
LOWtests/backline/decoders/test_triton_algorithms.py28 except Exception:CODE
MEDIUMtests/backline/decoders/test_triton_algorithms.py25def _has_cuda_target() -> bool:CODE
LOWtests/backline/decoders/test_decoder_frontend.py31 except Exception:CODE
MEDIUMtests/backline/decoders/test_decoder_frontend.py28def _has_cuda_target() -> bool:CODE
LOWtests/backline/decoders/test_triton_utils.py30 except Exception:CODE
MEDIUMtests/backline/decoders/test_triton_utils.py27def _has_cuda_target() -> bool:CODE
LOW⚡tests/ops/op_math/test_composite_op.py273 except Exception as e: # pylint: disable=broad-exceptCODE
LOW⚡tests/ops/op_math/test_composite_op.py283 except Exception as e: # pylint: disable=broad-exceptCODE
LOW⚡tests/ops/op_math/test_composite2.py334 except Exception as e: # pylint: disable=broad-exceptCODE
LOW⚡tests/ops/op_math/test_composite2.py344 except Exception as e: # pylint: disable=broad-exceptCODE
LOW.github/workflows/scripts/upload_reports/upload.py43 except Exception as e:CODE
LOW⚡pennylane/kernels/postprocessing.py218 except Exception: # pylint: disable=broad-exceptSTRING
LOW⚡pennylane/kernels/postprocessing.py221 except Exception as e:STRING
LOWpennylane/capture/autograph/ag_primitives.py286 except Exception as e: # pylint: disable=broad-exception-caught,broad-exceptCODE
LOWpennylane/capture/autograph/ag_primitives.py293 except Exception as e: # pylint: disable=broad-exception-caught,broad-exceptCODE
LOWpennylane/capture/autograph/ag_primitives.py316 except Exception as e:CODE
LOWpennylane/backline/decoders/triton/decoder_frontend.py155 except Exception:CODE
LOWpennylane/io/io.py641 except Exception as e: # pragma: no coverSTRING
LOWpennylane/io/io.py835 except Exception as e:STRING
LOWpennylane/ftqc/utils.py184 except Exception as exc:STRING
LOWpennylane/ftqc/utils.py216 except Exception as exc:STRING
LOWpennylane/math/single_dispatch.py117 except Exception as e:CODE
LOWpennylane/concurrency/executors/native/multiproc.py66 except Exception as e:STRING
LOWpennylane/noise/conditionals.py237 except Exception as e: # pragma: no coverCODE
LOWpennylane/noise/conditionals.py296 except Exception as e: # pragma: no coverCODE
LOWpennylane/templates/core.py750 except Exception as e:CODE
LOWpennylane/ops/op_math/pow.py267 except Exception as e:CODE
LOWpennylane/ops/op_math/pow.py285 except Exception as e:CODE
MEDIUMpennylane/ops/op_math/pow.py274def decomposition(self):CODE
LOWpennylane/ops/op_math/pow2.py183 except Exception as e:CODE
LOWpennylane/ops/op_math/pow2.py201 except Exception as e:CODE
MEDIUMpennylane/ops/op_math/pow2.py192def compute_decomposition(base, z):CODE
LOWpennylane/ops/functions/assert_valid.py469 except Exception as e:CODE
LOWpennylane/ops/functions/assert_valid.py476 except Exception as e:CODE
LOWpennylane/control_flow/for_loop.py537 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUMpennylane/control_flow/for_loop.py531def _call_capture_enabled(self, *init_state):CODE
LOWpennylane/gradients/vjp.py219 except Exception: # pylint: disable=broad-exceptCODE
LOWpennylane/logging/decorators.py36 except Exception as e:CODE
Cross-Language Confusion9 hits · 36 pts
SeverityFileLineSnippetContext
HIGH⚡tests/data/attributes/operator/test__wires.py40 ([0, 1, None], "[0, 1, null]"),CODE
HIGH⚡tests/data/attributes/operator/test__wires.py41 (["a", 1, None], '["a", 1, null]'),CODE
HIGHpennylane/capture/autograph/ag_primitives.py98 """Assert that none of the results are undefined, i.e. have no value."""STRING
HIGHpennylane/capture/autograph/ag_primitives.py368 JAX and Python. It checks if any of the arguments are undefined, and raises an error if so.STRING
HIGH⚡pennylane/capture/autograph/ag_primitives.py383 operation between two values, `a` and `b`. If either value is undefined, it raises an error."""STRING
HIGH⚡pennylane/capture/autograph/ag_primitives.py389 operation between two values, `a` and `b`. If either value is undefined, it raises an error."""STRING
HIGH⚡pennylane/capture/autograph/ag_primitives.py395 operation on a value `a`. If `a` is undefined, it raises an error."""STRING
HIGHpennylane/data/attributes/serialization.py68 b'["builtins.list",null,[["builtins.dict",["a"],[null]],null]]'STRING
HIGHpennylane/data/attributes/serialization.py96 >>> pytree_structure_load('["builtins.list",null,[["builtins.dict",["a"],[null]],null]')STRING
Structural Annotation Overuse28 hits · 27 pts
SeverityFileLineSnippetContext
LOWpennylane/labs/estimator_beta/templates/state_prep.py404 # Step 1: Prepare the condensed stateSTRING
LOWpennylane/labs/estimator_beta/templates/state_prep.py419 # Step 2: Use QROM to load v_bits into system registerSTRING
LOWpennylane/labs/estimator_beta/templates/state_prep.py444 # Step 5: Use identification register to uncompute the enumeration registerSTRING
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py49 # Step 1: Find the span of aCOMMENT
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py57 # Step 2: Project each vector in m onto the orthogonal complement of span(a)COMMENT
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py63 # Step 3: Find a basis for the non-zero projectionsCOMMENT
LOWpennylane/estimator/ops/op_math/symbolic.py152 # NOTE: This method is not called by the estimate function.STRING
LOWpennylane/estimator/ops/op_math/symbolic.py354 # NOTE: This method is not called by the estimate function.STRING
LOWpennylane/estimator/ops/op_math/symbolic.py542 # NOTE: This method is not called by the estimate function.STRING
LOW⚡pennylane/ftqc/pauli_tracker.py322 # Step 1: Commutate the recorded xz with the Clifford gate to a new xz.STRING
LOW⚡pennylane/ftqc/pauli_tracker.py325 # Step 2: Merge the new xz with the byproduct by_opSTRING
LOW⚡pennylane/qchem/factorization.py824 ) # Step 1: Reduce norm of two-body termSTRING
LOW⚡pennylane/qchem/factorization.py833 ) # Step 2: Reduce norm of one-body termSTRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py1261 # Step 1: Dense state preparation in enumeration registerCOMMENT
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py366 # Step 4: Split the set of bitstrings into three sets:STRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py376 # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ellSTRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py379 # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span ofSTRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py391 # Step 3: brute-force search of the single remaining vector w_1STRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py394 # Step 8: Reverse back into increasing index order and stack the vectors as the columns of W,STRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py241 # Step 5: Map the set N to N', containing the components that are spanned bySTRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py675 # Step 1: Construct a basis for the input bitsSTRING
LOWpennylane/templates/state_preparations/partial_unary.py640 # Step 5: Assign bijection for states already in subspaceCOMMENT
LOWpennylane/templates/state_preparations/partial_unary.py974 # Step 1: Dense state preparationCOMMENT
LOWpennylane/templates/state_preparations/partial_unary.py1004 # Step 2: Apply the inverse of the isometry circuitCOMMENT
LOWpennylane/resource/parsing.py38 # NOTE: This function only uses absolute tolerance and not relative tolerance.COMMENT
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py43 # Step 1: The first rho_dim indices are the original state indicesSTRING
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py46 # Step 2: construct the indices for the Kraus operators. Note that the indices here are not necessarily consecutive STRING
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py56 # Step 3: contruct the new indices for the quantum state after the operationSTRING
Verbosity Indicators25 hits · 24 pts
SeverityFileLineSnippetContext
LOWpennylane/labs/estimator_beta/templates/state_prep.py404 # Step 1: Prepare the condensed stateSTRING
LOWpennylane/labs/estimator_beta/templates/state_prep.py419 # Step 2: Use QROM to load v_bits into system registerSTRING
LOWpennylane/labs/estimator_beta/templates/state_prep.py444 # Step 5: Use identification register to uncompute the enumeration registerSTRING
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py49 # Step 1: Find the span of aCOMMENT
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py57 # Step 2: Project each vector in m onto the orthogonal complement of span(a)COMMENT
LOW⚡pennylane/liealg/horizontal_cartan_subalgebra.py63 # Step 3: Find a basis for the non-zero projectionsCOMMENT
LOWpennylane/io/qasm_interpreter.py522 The purpose of this function is to pass each node to the appropriate handler.STRING
LOW⚡pennylane/ftqc/pauli_tracker.py322 # Step 1: Commutate the recorded xz with the Clifford gate to a new xz.STRING
LOW⚡pennylane/ftqc/pauli_tracker.py325 # Step 2: Merge the new xz with the byproduct by_opSTRING
LOW⚡pennylane/qchem/factorization.py824 ) # Step 1: Reduce norm of two-body termSTRING
LOW⚡pennylane/qchem/factorization.py833 ) # Step 2: Reduce norm of one-body termSTRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py1261 # Step 1: Dense state preparation in enumeration registerCOMMENT
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py366 # Step 4: Split the set of bitstrings into three sets:STRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py376 # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ellSTRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py379 # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span ofSTRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py391 # Step 3: brute-force search of the single remaining vector w_1STRING
LOW⚡…nnylane/templates/state_preparations/sum_of_slaters.py394 # Step 8: Reverse back into increasing index order and stack the vectors as the columns of W,STRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py241 # Step 5: Map the set N to N', containing the components that are spanned bySTRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py675 # Step 1: Construct a basis for the input bitsSTRING
LOWpennylane/templates/state_preparations/partial_unary.py640 # Step 5: Assign bijection for states already in subspaceCOMMENT
LOWpennylane/templates/state_preparations/partial_unary.py974 # Step 1: Dense state preparationCOMMENT
LOWpennylane/templates/state_preparations/partial_unary.py1004 # Step 2: Apply the inverse of the isometry circuitCOMMENT
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py43 # Step 1: The first rho_dim indices are the original state indicesSTRING
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py46 # Step 2: construct the indices for the Kraus operators. Note that the indices here are not necessarily consecutive STRING
LOW⚡pennylane/devices/qubit_mixed/einsum_manpulation.py56 # Step 3: contruct the new indices for the quantum state after the operationSTRING
AI Slop Vocabulary17 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests/core/operator/test_core_operator.py260 # because it will simply set `ndim_params` to the ndims of the provided argumentsCOMMENT
LOWtests/ops/qubit/test_qchem_ops.py483 # can't just pass in an operator at the moment due to ArgInfo as a wireCOMMENT
LOWtests/ops/qubit/test_qchem_ops.py531 # can't just pass in an operator at the moment due to ArgInfo as a wireCOMMENT
LOWtests/pauli/test_pauli_arithmetic.py271 # psx does not contain identity, so simply add it to the definition with pw_idCOMMENT
LOWtests/pauli/test_pauli_arithmetic.py810 # psx does not contain identity, so simply add it to the definition with pw_idCOMMENT
MEDIUMpennylane/operation.py73 """To facilitate StatePrep rename"""STRING
LOWpennylane/core/transforms/transform.py430 # simply return the original function rather thanSTRING
LOWpennylane/core/operator/operator2.py1033 # no need for copies if we just use queue methodSTRING
LOWpennylane/core/operator/base.py1204 # no need for copies if we just use queue methodSTRING
MEDIUMpennylane/backline/decoders/triton/bp_iters.py137 # overflow robust tanh formulaCOMMENT
MEDIUMpennylane/math/multi_dispatch.py397 # Avoid the case when one is a scalar - using a robust check for scalarsCOMMENT
MEDIUMpennylane/math/__init__.py193 """Subclass of the Autoray NumpyMimic class in order to supportSTRING
MEDIUMpennylane/math/decomposition.py45 # one to find theta, but the most numerically robust approachSTRING
LOWpennylane/transforms/split_non_commuting.py766 # For all other measurement types, simply add them to the list of measurements.STRING
LOW…nnylane/templates/state_preparations/sum_of_slaters.py1204 # invalid rule, just return so we dont get an errorCOMMENT
LOWpennylane/ops/op_math/controlled.py1042 # For N>1 control wires, we simply add N-1 control wires to the phase shiftCOMMENT
LOWpennylane/devices/qubit_mixed/apply_operation.py700 # If the operation covers the full system, just return itCOMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHpennylane/devices/qubit/simulate.py455 # either as requested by terminal measurements or post-selectionCOMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/codeql.yml59 # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize howCOMMENT
LOWpennylane/control_flow/_loop_abstract_axes.py62 # so therefore we just need to make sure to clean up after ourselves afterCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/shadow/test_shadow_class.py431 # TODO: add tests for the gradient once we implement the post-processing reconstructionCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/workflow/test_marker.py39 def test_function(self):CODE
LOWtests/ops/op_math/test_adjoint.py993 def test_function(self):CODE
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWpennylane/core/transforms/__init__.py25 """placeholder"""STRING