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.
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 9197 finding(s).
Are imports declared and package/API names verified? 1810 finding(s).
Are wrappers, guards, and repeated structures necessary? 9469 finding(s).
Which changes need focused human review? 12349 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_wires.py | 69 | def test_creation_from_iterables_of_exotic_elements(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 75 | def test_creation_from_wires_object(self): | CODE |
| LOW⚡ | tests/test_wires.py | 83 | def test_creation_from_dynamic_register(self): | CODE |
| LOW⚡ | tests/test_wires.py | 93 | def test_creation_from_wires_lists(self): | CODE |
| LOW⚡ | tests/test_wires.py | 102 | def test_creation_from_different_wire_types(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 110 | def test_creation_from_single_object(self, wire): | CODE |
| LOW⚡ | tests/test_wires.py | 120 | def test_error_for_incorrect_wire_types(self, input): | CODE |
| LOW⚡ | tests/test_wires.py | 129 | def test_error_for_repeated_wires(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 136 | def test_indexing_and_slicing(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 197 | def test_add_two_wires_objects(self): | CODE |
| LOW⚡ | tests/test_wires.py | 203 | def test_add_wires_object_with_iterable(self): | CODE |
| LOW⚡ | tests/test_wires.py | 210 | def test_add_wires_with_inbuilt_sum(self): | CODE |
| LOW⚡ | tests/test_wires.py | 216 | def test_representation_and_string(self): | CODE |
| LOW⚡ | tests/test_wires.py | 224 | def test_array_representation(self): | CODE |
| LOW⚡ | tests/test_wires.py | 610 | def test_error_for_incorrect_jax_arrays(self, input): | CODE |
| LOW⚡ | tests/test_wires.py | 619 | def test_error_for_repeated_wires_jax(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 624 | def test_array_representation_jax(self): | CODE |
| LOW | tests/test_wires.py | 54 | def test_creation_from_common_iterables(self, iterable): | CODE |
| LOW | tests/test_wires.py | 235 | def test_jax_array_representation(self): | CODE |
| LOW | tests/test_wires.py | 263 | def test_convert_to_numpy_array(self): | CODE |
| LOW | tests/test_wires.py | 330 | def test_select_random_method(self): | CODE |
| LOW | tests/test_wires.py | 369 | def test_all_wires_with_abstract(self): | CODE |
| LOW | tests/test_wires.py | 436 | def test_wires_pytree_with_array_leaves(self): | CODE |
| LOW | tests/test_wires.py | 526 | def test_symmetric_difference(self, wire_a, wire_b, expected): | CODE |
| LOW | tests/test_wires.py | 591 | def test_creation_from_jax_array(self, iterable, expected): | CODE |
| LOW | tests/test_wires.py | 655 | def test_pass_in_abstract_wires(self): | CODE |
| LOW | tests/test_wires.py | 660 | def test_unsubscripted_wire_raises(self): | CODE |
| LOW | tests/conftest.py | 143 | def enable_and_disable_capture(request): | CODE |
| LOW | tests/conftest.py | 173 | def enable_disable_dynamic_shapes(): | CODE |
| LOW⚡ | tests/conftest.py | 194 | def enable_graph_decomposition(): | CODE |
| LOW⚡ | tests/conftest.py | 201 | def disable_graph_decomposition(): | CODE |
| LOW⚡ | tests/conftest.py | 208 | def enable_and_disable_graph_decomp(request): | CODE |
| LOW | tests/conftest.py | 292 | def pytest_collection_modifyitems(items, config): | CODE |
| LOW | tests/conftest.py | 306 | def _handle_xfail_if_capture_marker(item): | CODE |
| LOW | tests/test_autograd_grad.py | 23 | def test_informative_error_on_bad_shape(): | CODE |
| LOW⚡ | tests/test_typing.py | 36 | def test_isinstance_unknown_type(self): | CODE |
| LOW⚡ | tests/test_typing.py | 45 | def test_isinstance_numpy_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 49 | def test_isinstance_pennylane_tensor(self): | CODE |
| LOW⚡ | tests/test_typing.py | 54 | def test_isinstance_jax_array_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 62 | def test_isinstance_torch_tensor_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 69 | def test_subclass_unknown_type(self): | CODE |
| LOW⚡ | tests/test_typing.py | 78 | def test_subclass_numpy_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 82 | def test_subclass_pennylane_tensor(self): | CODE |
| LOW⚡ | tests/test_typing.py | 87 | def test_subclass_jax_array_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 94 | def test_subclass_torch_tensor_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 394 | def test_instance_check_unknown_rank(self): | CODE |
| LOW⚡ | tests/test_typing.py | 401 | def test_instance_check_rejects_non_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 406 | def test_weak_type_for_number_dtypes(self): | CODE |
| LOW⚡ | tests/test_typing.py | 413 | def test_is_compatible_with_non_numeric_input(self): | CODE |
| LOW⚡ | tests/test_typing.py | 418 | def test_is_compatible_with_weak_scalar(self): | CODE |
| LOW⚡ | tests/test_typing.py | 428 | def test_is_compatible_with_weak_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 437 | def test_is_compatible_with_arbitrary_shape(self): | CODE |
| LOW⚡ | tests/test_typing.py | 444 | def test_is_compatible_with_list(self): | CODE |
| LOW⚡ | tests/test_typing.py | 450 | def test_is_compatible_with_unknown_axes(self): | CODE |
| LOW⚡ | tests/test_typing.py | 458 | def test_is_compatible_with_torch_tensor(self): | CODE |
| LOW⚡ | tests/test_typing.py | 605 | def test_is_compatible_with_sequences(self): | CODE |
| LOW⚡ | tests/test_typing.py | 614 | def test_is_compatible_with_scalar(self): | CODE |
| LOW⚡ | tests/test_typing.py | 619 | def test_is_compatible_with_invalid(self): | CODE |
| LOW | tests/test_typing.py | 211 | def test_invalid_shape_tuple_error(self): | CODE |
| LOW | tests/test_typing.py | 309 | def test_error_indexing_into_non_scalar(self): | CODE |
| 8017 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_wires.py | 0 | tests that we can compare compilepipeline objects with the '==' and '!=' operators. | STRING |
| HIGH | tests/core/test_transform.py | 0 | tests that we can compare compilepipeline objects with the '==' and '!=' operators. | STRING |
| HIGH | tests/core/test_compile_pipeline.py | 0 | tests that we can compare compilepipeline objects with the '==' and '!=' operators. | STRING |
| HIGH | tests/default_qubit_legacy.py | 0 | allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axi | STRING |
| HIGH | pennylane/devices/qubit/apply_operation.py | 0 | allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axi | STRING |
| HIGH | pennylane/devices/qubit_mixed/apply_operation.py | 0 | allows slicing along an arbitrary axis of an array or tensor. args: index (int): the index to access axis (int): the axi | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | helper function to get the total number of shot copies from a shot vector. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | helper function to get the total number of shot copies from a shot vector. | STRING |
| HIGH | tests/test_return_types.py | 0 | helper function to get the total number of shot copies from a shot vector. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test that single measurements return behavior does not change. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test that single measurements return behavior does not change. | STRING |
| HIGH | tests/test_return_types.py | 0 | test that single measurements return behavior does not change. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test the new return types for multiple measurements, it should always return a tuple containing the single measurements. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test the new return types for multiple measurements, it should always return a tuple containing the single measurements. | STRING |
| HIGH | tests/test_return_types.py | 0 | test the new return types for multiple measurements, it should always return a tuple containing the single measurements. | STRING |
| HIGH | pennylane/devices/tests/test_return_system.py | 0 | test the new return types for multiple measurements, it should always return a tuple containing the single measurements. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectors | STRING |
| HIGH | tests/test_return_types.py | 0 | test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectors | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test the support for executing qnodes with the same type of measurement multiple times using a device with shot vectors | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test the support for executing qnodes with multiple different measurements using a device with shot vectors | STRING |
| HIGH | tests/test_return_types.py | 0 | test the support for executing qnodes with multiple different measurements using a device with shot vectors | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test the support for executing qnodes with multiple different measurements using a device with shot vectors | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test scalar-valued and sample measurements where sample takes an observable. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test scalar-valued and sample measurements where sample takes an observable. | STRING |
| HIGH | tests/test_return_types.py | 0 | test scalar-valued and sample measurements where sample takes an observable. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test scalar-valued and computational basis sample measurements. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test scalar-valued and computational basis sample measurements. | STRING |
| HIGH | tests/test_return_types.py | 0 | test scalar-valued and computational basis sample measurements. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test scalar-valued and counts measurements where counts takes an observable. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test scalar-valued and counts measurements where counts takes an observable. | STRING |
| HIGH | tests/test_return_types.py | 0 | test scalar-valued and counts measurements where counts takes an observable. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test scalar-valued and computational basis counts measurements. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test scalar-valued and computational basis counts measurements. | STRING |
| HIGH | tests/test_return_types.py | 0 | test scalar-valued and computational basis counts measurements. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test sample and counts measurements, each measurement with custom samples or computational basis state samples. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test sample and counts measurements, each measurement with custom samples or computational basis state samples. | STRING |
| HIGH | tests/test_return_types.py | 0 | test sample and counts measurements, each measurement with custom samples or computational basis state samples. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test scalar-valued, probability, sample and counts measurements all in a single qfunc. | STRING |
| HIGH | tests/test_return_types_qnode.py | 0 | test scalar-valued, probability, sample and counts measurements all in a single qfunc. | STRING |
| HIGH | tests/test_return_types.py | 0 | test scalar-valued, probability, sample and counts measurements all in a single qfunc. | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | check that an error is raised if the return type of an observable is unsupported | STRING |
| HIGH | tests/test_return_types.py | 0 | check that an error is raised if the return type of an observable is unsupported | STRING |
| HIGH | tests/devices/test_legacy_device.py | 0 | check that an error is raised if the return type of an observable is unsupported | STRING |
| HIGH | tests/devices/test_qubit_device.py | 0 | check that an error is raised if the return type of an observable is unsupported | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | test that no exception is raised when a state is returned along with another return type | STRING |
| HIGH | tests/test_return_types.py | 0 | test that no exception is raised when a state is returned along with another return type | STRING |
| HIGH | tests/measurements/test_state.py | 0 | test that no exception is raised when a state is returned along with another return type | STRING |
| HIGH | tests/test_return_types_legacy.py | 0 | tests that no error is raised when mutual information is measured with custom wire labels | STRING |
| HIGH | tests/test_return_types.py | 0 | tests that no error is raised when mutual information is measured with custom wire labels | STRING |
| HIGH | tests/measurements/test_mutual_info.py | 0 | tests that no error is raised when mutual information is measured with custom wire labels | STRING |
| HIGH | tests/test_queuing.py | 0 | test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps. | STRING |
| HIGH | tests/circuit_graph/test_circuit_graph.py | 0 | test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps. | STRING |
| HIGH | tests/gradients/core/test_metric_tensor.py | 0 | test that the ``_wrappedobj` representation is equivalent to the repr of the object it wraps. | STRING |
| HIGH | tests/capture/gradients/test_capture_diff.py | 0 | test that an error is raised if the argnums is not a collection. | STRING |
| HIGH | tests/capture/gradients/test_capture_jvp.py | 0 | test that an error is raised if the argnums is not a collection. | STRING |
| HIGH | tests/capture/gradients/test_capture_vjp.py | 0 | test that an error is raised if the argnums is not a collection. | STRING |
| HIGH | tests/core/test_measurements.py | 0 | test the execution of a custom sampled measurement. | STRING |
| HIGH | tests/measurements/test_measurements_legacy.py | 0 | test the execution of a custom sampled measurement. | STRING |
| HIGH | pennylane/devices/tests/test_measurements.py | 0 | test the execution of a custom sampled measurement. | STRING |
| HIGH | tests/core/test_measurements.py | 0 | test that executing a sampled measurement with ``shots=none`` raises an error. | STRING |
| 1048 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1 | CODE | |
| LOW | tests/conftest.py | 22 | CODE | |
| LOW | tests/conftest.py | 29 | CODE | |
| LOW | tests/conftest.py | 226 | CODE | |
| LOW | tests/conftest.py | 234 | CODE | |
| LOW | tests/kernels/test_kernels.py | 36 | CODE | |
| LOW | tests/kernels/test_kernels.py | 37 | CODE | |
| LOW | tests/io/test_qualtran_io.py | 42 | CODE | |
| LOW | tests/qchem/vibrational/conftest.py | 26 | CODE | |
| LOW | tests/qchem/vibrational/conftest.py | 40 | CODE | |
| LOW | tests/qchem/vibrational/conftest.py | 54 | CODE | |
| LOW | tests/qchem/vibrational/conftest.py | 89 | CODE | |
| LOW | tests/qchem/openfermion_pyscf_tests/conftest.py | 58 | CODE | |
| LOW | tests/qchem/openfermion_pyscf_tests/conftest.py | 59 | CODE | |
| LOW | tests/data/data_manager/test_dataset_access.py | 47 | CODE | |
| LOW | tests/devices/default_tensor/test_default_tensor.py | 269 | CODE | |
| LOW | .github/workflows/scripts/upload_reports/upload.py | 5 | CODE | |
| LOW | pennylane/numeric_hamiltonians.py | 32 | CODE | |
| LOW | pennylane/__init__.py | 22 | CODE | |
| LOW | pennylane/__init__.py | 23 | CODE | |
| LOW | pennylane/__init__.py | 24 | CODE | |
| LOW | pennylane/__init__.py | 25 | CODE | |
| LOW | pennylane/__init__.py | 26 | CODE | |
| LOW | pennylane/__init__.py | 28 | CODE | |
| LOW | pennylane/__init__.py | 29 | CODE | |
| LOW | pennylane/__init__.py | 30 | CODE | |
| LOW | pennylane/__init__.py | 31 | CODE | |
| LOW | pennylane/__init__.py | 32 | CODE | |
| LOW | pennylane/__init__.py | 33 | CODE | |
| LOW | pennylane/__init__.py | 34 | CODE | |
| LOW | pennylane/__init__.py | 34 | CODE | |
| LOW | pennylane/__init__.py | 35 | CODE | |
| LOW | pennylane/__init__.py | 36 | CODE | |
| LOW | pennylane/__init__.py | 37 | CODE | |
| LOW | pennylane/__init__.py | 38 | CODE | |
| LOW | pennylane/__init__.py | 39 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 41 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 42 | CODE | |
| LOW | pennylane/__init__.py | 50 | CODE | |
| LOW | pennylane/__init__.py | 51 | CODE | |
| LOW | pennylane/__init__.py | 52 | CODE | |
| LOW | pennylane/__init__.py | 53 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 54 | CODE | |
| LOW | pennylane/__init__.py | 63 | CODE | |
| LOW | pennylane/__init__.py | 63 | CODE | |
| LOW | pennylane/__init__.py | 63 | CODE | |
| LOW | pennylane/__init__.py | 63 | CODE | |
| 1740 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pennylane/operation.py | 41 | Calculate the derivative of an operation. For an operation :math:`e^{i \hat{H} \phi t}`, this function returns the | STRING |
| HIGH | pennylane/_grad/value_and_grad.py | 121 | A :func:`~.qjit`-compatible transformation for returning the result and jacobian of a function. This function a | STRING |
| HIGH | pennylane/_grad/jvp.py | 128 | A :func:`~.qjit` compatible Jacobian-vector product of PennyLane programs. This function allows the Jacobian-vector | STRING |
| HIGH | …labs/trotter_error/product_formulas/product_formula.py | 150 | Compose several product formulas into a single recursive formula. This represents the ordered product of the gi | STRING |
| HIGH | …labs/trotter_error/product_formulas/product_formula.py | 240 | Raise the formula to the power ``z``. This multiplies the existing :attr:`exponent` by ``z``. The original form | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss_hw.py | 344 | Build a reusable loss function that computes the qudit graph-kernel MMD. The returned callable measures the distanc | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss_hw.py | 447 | Estimate the empirical qudit MMD loss for one parameter setting. The input ``target_data`` is interpreted as sa | STRING |
| HIGH | pennylane/labs/tcdq/qudit_expval_functions.py | 166 | Convert a qudit gate dictionary into a generator matrix and parameter map. Unlike the qubit version, generator vect | STRING |
| HIGH | pennylane/labs/tcdq/qudit_expval_functions.py | 482 | Build an estimator for expectation values of a qudit IQP circuit. Returns a pure function that estimates the comple | STRING |
| HIGH | pennylane/labs/tcdq/training.py | 178 | Create the requested JAX optimizer. Args: name (str): The name of the optimizer to create ('GradientDescent | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss_pauli.py | 84 | Choose a reasonable radial basis function (RBF) kernel bandwidth from a target dataset. A good starting point for : | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss_pauli.py | 238 | Build a reusable loss function that computes the qubit Pauli-kernel Maximum Mean Discrepancy (MMD) loss. The re | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss_pauli.py | 334 | Estimate the empirical qubit MMD loss for one parameter setting. The input ``target_data`` is interpreted as sa | STRING |
| HIGH | pennylane/labs/profiler/resource_profile.py | 367 | Converts a resource profile into a data structure compatible with `icicle/flame-graphs <https://plotly.com/python/icicle | STRING |
| HIGH | pennylane/labs/profiler/extract.py | 47 | Profile the quantum resources required to implement a circuit or operator in terms of a given gate set. In addition | STRING |
| HIGH | pennylane/labs/estimator_beta/estimate.py | 82 | Estimate the quantum resources required to implement a circuit or operator in terms of a given gateset. This functi | STRING |
| HIGH | …ane/labs/estimator_beta/wires_manager/wire_counting.py | 45 | A recursive function that tracks auxiliary qubits via three quantities over the course of the workflow. It tracks th | STRING |
| HIGH | …ane/labs/estimator_beta/wires_manager/wire_counting.py | 174 | A 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.py | 253 | Determine the number of auxiliary qubits needed to decompose the operators of a quantum circuit into a specific ``ga | STRING |
| HIGH | …ane/labs/estimator_beta/wires_manager/wire_counting.py | 340 | Determine the number of auxiliary qubits needed to decompose the operators in a :class:`~.pennylane.estimator.resour | STRING |
| HIGH | pennylane/labs/estimator_beta/templates/subroutines.py | 1626 | Input validation for the various parameters and optimizes the batch_size and bits_per_iter. Args: n | STRING |
| HIGH | …ne/labs/estimator_beta/ops/qubit/non_parametric_ops.py | 28 | Returns a list representing the resources for a controlled version of the :class:`~.pennylane.estimator.ops.qubit.non_pa | STRING |
| HIGH | pennylane/capture/autograph/transformer.py | 213 | Utility function to retrieve the source code of a function converted by AutoGraph. .. warning:: Nested fun | STRING |
| HIGH | pennylane/core/qscript.py | 46 | Process the annotated queue, creating a list of quantum operations and measurement processes. Args: que | STRING |
| HIGH | pennylane/core/apply.py | 27 | Apply an instantiated operator or measurement to the active program. Args: op (.Operator or .MeasurementPro | STRING |
| HIGH | pennylane/backline/functions.py | 117 | Compile Triton quantum error correction decoder functions into a coprocessor function for use with :mod:`~.backline` | STRING |
| HIGH | pennylane/backline/functions.py | 185 | Compile a CSS code's Tanner graph into a coprocessor decode function for use with :mod:`~.backline`. Accepts th | STRING |
| HIGH | pennylane/backline/onnx.py | 115 | Create a coprocessor function that runs an ONNX model on each message, for use with :mod:`~.backline`. Each mes | STRING |
| HIGH | pennylane/backline/transports.py | 81 | Return the :class:`Transport` registered under ``name``. Args: name (str): The transport name, as registere | STRING |
| HIGH | pennylane/backline/decode.py | 206 | Calls a coprocessor function available on the :class:`~.Backline` to perform quantum error correction decoding --- p | STRING |
| HIGH | pennylane/backline/runtime/operands.py | 99 | The bytes of a ``str`` argument, NUL-padded to ``STR_OPERAND_BYTES``. Args: ctype (CType): the parameter ty | STRING |
| HIGH | pennylane/backline/runtime/operands.py | 159 | Build every operand a recorded call passes. Args: signature (CSignature): the signature being called | STRING |
| HIGH | pennylane/backline/runtime/operands.py | 190 | How big each ``out`` buffer of a call is. Args: signature (CSignature): the signature being called | STRING |
| HIGH | pennylane/backline/decoders/triton/decoder_frontend.py | 75 | Build a shared library based on the decoder functions provided. Args: decoder_fns (tuple[object, ...]): Tup | STRING |
| HIGH | pennylane/backline/decoders/triton/decoder_frontend.py | 174 | Build a shared library for a triton-based CSS belief-propagation decoder. This helper specializes one Triton decode | STRING |
| HIGH | pennylane/backline/decoders/triton/decoder_frontend.py | 245 | Validate and convert a parity-check matrix to a NumPy array. Args: H (ArrayLike): Candidate parity-check ma | STRING |
| HIGH | pennylane/backline/decoders/triton/triton_so_builder.py | 177 | Compile a Triton kernel and package it into a shared library. Args: kernel (Callable): Triton kernel to com | STRING |
| HIGH | pennylane/backline/decoders/triton/triton_so_builder.py | 274 | AOT-compile a Triton kernel and keep the generated launcher source. Args: kernel (Callable): Triton kernel | STRING |
| HIGH | pennylane/optimize/qng.py | 322 | Restores an arbitrary nested structure to a flattened iterable. See also :func:`_flatten`. Args: flat | STRING |
| HIGH | pennylane/optimize/spsa.py | 22 | The Simultaneous Perturbation Stochastic Approximation method (SPSA) is a stochastic approximation algorithm for opt | STRING |
| HIGH | pennylane/liealg/lie_closure.py | 52 | Compute the (dynamical) Lie algebra from a set of generators. The Lie closure, pronounced "Lee" closure, is a way t | STRING |
| HIGH | pennylane/liealg/lie_closure.py | 208 | Find a linearly independent basis of a list of (skew-) Hermitian matrices .. note:: The first ``subbasis_length`` e | STRING |
| HIGH | pennylane/estimator/estimate.py | 57 | Estimate the quantum resources required to implement a circuit or operator in terms of a given gateset. Args: | STRING |
| HIGH | pennylane/estimator/estimate.py | 654 | Apply the default decomposition for a given symbolic operator (Adjoint, Control, Pow). Args: base_compr_res | STRING |
| HIGH | pennylane/estimator/templates/qsp.py | 890 | Returns a list representing the resources of the operator. Each object in the list represents a gate and the num | STRING |
| HIGH | pennylane/estimator/ops/op_math/symbolic.py | 1036 | Create the adjoint of a resource-tracking gate. For a :class:`~.GateCount`, it wraps the gate in :class:`~.Adjo | STRING |
| HIGH | pennylane/io/io.py | 415 | Converts a Qiskit `NoiseModel <https://qiskit.github.io/qiskit-aer/stubs/qiskit_aer.noise.NoiseModel.html>`__ into a | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 220 | Rotates a BitType variable left by n bits. Note we need a Variable because we need to know the size of the regi | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 345 | Attempts to retrieve a variable from the current context by name. Args: name (str): the na | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 414 | If the attribute is not found on the class, instead uses the attr name as an index into the context dic | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 563 | Entry point for visiting the QASMNodes of a parsed OpenQASM 3.0 program. Args: node (QASMN | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1040 | Index into a variable using an IndexExpression. Args: var (Variable): The data structure r | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1370 | Helper to setup the quantum gate call, also resolving arguments and wires. Args: node (Qua | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1401 | Sets up wires for a QuantumGate or QuantumPhase application. Args: node (QuantumPhase | Qu | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1526 | Registers a Cast expression. Args: node (Cast): The Cast expression. context ( | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1616 | An alias is registered as a callable since we need to be able to evaluate it at a later time. | STRING |
| HIGH | pennylane/io/qasm_interpreter.py | 1642 | Registers an identifier. Args: node (Identifier): The identifier. context (Con | STRING |
| HIGH | pennylane/io/qualtran_io.py | 812 | Reads a `Qualtran Bloq <https://qualtran.readthedocs.io/en/latest/bloqs/index.html#bloqs-library>`_ signature and re | STRING |
| HIGH | pennylane/io/qualtran_io.py | 1438 | Converts a PennyLane :class:`~.QNode`, ``Qfunc``, or :class:`~.Operation` to the corresponding `Qualtran Bloq <http | STRING |
| HIGH | pennylane/ftqc/lattice.py | 125 | Generates a :class:`~pennylane.ftqc.Lattice` object with a given geometric parameters and its shape name. Args: | STRING |
| 133 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/dummy_debugger.py | 26 | # Create a dummy object to act as the device | COMMENT |
| MEDIUM | tests/default_qubit_legacy.py | 217 | # Create the initial state. Internally, we store the | STRING |
| MEDIUM | tests/default_qubit_legacy.py | 1002 | # Create a locally rolling seed by using deterministic context properties | COMMENT |
| MEDIUM | tests/core/test_transform.py | 685 | # Create a simple device and tape | COMMENT |
| MEDIUM | tests/core/test_compile_pipeline.py | 1503 | # Create a single QuantumScript (not wrapped in a tuple) | COMMENT |
| MEDIUM | tests/core/test_compile_pipeline.py | 1681 | # Create a dummy device with a custom preprocess_transforms method | COMMENT |
| MEDIUM | tests/core/test_compile_pipeline.py | 1695 | # Create a program with transforms | COMMENT |
| MEDIUM | tests/liealg/test_horizontal_cartan_subalgebra.py | 200 | # Create a non-orthonormal basis on 1 qubit | COMMENT |
| MEDIUM | tests/liealg/test_horizontal_cartan_subalgebra.py | 204 | # Create an adjvec for three operators, which we understand to be in basis_0 | COMMENT |
| MEDIUM | tests/liealg/test_horizontal_cartan_subalgebra.py | 218 | # Create a non-orthonormal basis on 2 qubits | COMMENT |
| MEDIUM | tests/liealg/test_horizontal_cartan_subalgebra.py | 222 | # Create an adjvec for 13 operators, which we understand to be in basis_1 | COMMENT |
| MEDIUM | tests/ftqc/test_mbqc_gates.py | 72 | # Define the graph structure for the RZ cluster state (omit node 1 for input): | COMMENT |
| MEDIUM | tests/ftqc/test_mbqc_gates.py | 124 | # Define the graph structure for the CNOT cluster state (omit nodes 1 and 9 for input) | COMMENT |
| MEDIUM⚡ | tests/ftqc/test_qubit_graph.py | 641 | # Create a cyclically nested graph | COMMENT |
| MEDIUM | tests/ftqc/test_qubit_graph.py | 159 | # Create the expected graph structure for Surface Code 17 | COMMENT |
| MEDIUM⚡ | tests/math/test_matrix_manipulation.py | 922 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM⚡ | tests/math/test_matrix_manipulation.py | 934 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 30 | # Define a list of dtypes to test | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 855 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 870 | # Define a batch of 2-qubit density matrices | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 894 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 907 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 1182 | # Create a positive definite matrix | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 338 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 407 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 460 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 513 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1108 | # Create a uniform probability distribution for 2 qubits | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1127 | # Create a uniform probability distribution for 2 qubits | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1145 | # Create a biased probability distribution (not uniform to make differences more apparent) | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1199 | # Create a circuit that performs classical shadow measurement | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1343 | # Create a simple tape for execution | COMMENT |
| MEDIUM | tests/ops/op_math/test_linear_combination.py | 1397 | # Create a graph with unique solution so that test does not depend on solver/implementation | COMMENT |
| MEDIUM | tests/measurements/test_probs.py | 250 | # Define a batch of density matrices | COMMENT |
| MEDIUM | tests/measurements/test_probs.py | 285 | # Define a density matrix for a 4-qubit system | COMMENT |
| MEDIUM⚡ | tests/measurements/test_purity_measurement.py | 97 | # Define a non-trivial two-qubit density matrix | COMMENT |
| MEDIUM⚡ | tests/measurements/test_purity_measurement.py | 104 | # Define the wires (qubits) of our system | COMMENT |
| MEDIUM | tests/measurements/test_var.py | 234 | # Define a non-trivial two-qubit density matrix | COMMENT |
| MEDIUM | tests/measurements/test_mutual_info.py | 108 | # Define a pure, entangled two-qubit state (|00> + |11>) / sqrt(2) | COMMENT |
| MEDIUM | tests/measurements/test_vn_entropy.py | 136 | # Define a non-trivial two-qubit density matrix | COMMENT |
| MEDIUM | tests/devices/test_default_mixed.py | 128 | # Create a QNode with the specified interface | COMMENT |
| MEDIUM | tests/devices/test_default_mixed.py | 161 | # Create a QNode with the specified interface | COMMENT |
| MEDIUM⚡ | tests/devices/test_null_qubit.py | 1279 | # Create a custom operator that's not in the standard gateset | COMMENT |
| MEDIUM⚡ | tests/devices/test_null_qubit.py | 1287 | # Create a tape with this custom operator | COMMENT |
| MEDIUM⚡ | tests/devices/test_preprocess.py | 510 | # Create a tape with an operation that needs decomposition | COMMENT |
| MEDIUM | tests/devices/test_preprocess.py | 611 | # Create a tape with an operation that needs decomposition | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 134 | # Create a random unitary matrix | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 138 | # Create a random state vector | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 153 | # Create a random unitary matrix | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 157 | # Create a random state vector | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 220 | # Create a dense state, shape (2,2,2) | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 125 | # Create a sparse observable | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 203 | # Create a Sum observable that involves the operators | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 207 | # Create the measurement process | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 210 | # Create a mock state (you would normally use a real state here) | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 696 | # Define the readout error probability | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 699 | # Define the readout error operation using qp.BitFlip | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 703 | # Define the state: let's use the |+⟩ state | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 707 | # Define the observable | COMMENT |
| MEDIUM | tests/devices/qubit_mixed/test_qubit_mixed_simulate.py | 215 | # Create a cache dictionary to store states | COMMENT |
| 85 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 1 | # Copyright 2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/conftest.py | 1 | # Copyright 2018-2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/test_compiler.py | 1 | # Copyright 2023 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/test_numeric_hamiltonians.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/test_about.py | 1 | # Copyright 2018-2020 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/kernels/test_kernels.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/drawer/test_draw_catalyst.py | 1 | # Copyright 2023 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/drawer/test_tape_mpl.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/drawer/test_draw.py | 1 | # Copyright 2018-2022 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/drawer/test_tape_text.py | 1 | # Copyright 2018-2020 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_while_loop.py | 1 | # Copyright 2018-2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_transforms.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_templates.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_nested_plxpr.py | 1 | # Copyright 2018-2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_operators.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_dynamic_shapes.py | 1 | # Copyright 2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_base_interpreter.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_measurements_capture.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_cond.py | 1 | # Copyright 2018-2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_mid_measure.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_qnode.py | 1 | # Copyright 2018-2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_meta_type.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_custom_primitives.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_for_loop.py | 1 | # Copyright 2018-2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/test_capture_pauli_measure.py | 1 | # Copyright 2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/autograph/test_if_else.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/autograph/test_autograph_for_loop.py | 1 | # Copyright 2023 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/autograph/test_autograph_while_loop.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/autograph/test_autograph.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/autograph/test_autograph_logical_ops.py | 1 | # Copyright 2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/capture/gradients/test_capture_diff.py | 521 | # + prod_cos_e_i[:, :, None] / x[None, None, :] | COMMENT |
| LOW | tests/gpu/test_gpu_torch.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/core/test_compile_pipeline.py | 1 | # Copyright 2023 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/core/operator/test_operator2.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/core/operator/operator2_utils.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/core/operator/test_operator2_capture.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/core/operator/test_operator2_equality.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/test_backline_functions.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/test_decode.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/decoders/test_triton_so_builder_cache.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/decoders/test_triton_so_builder.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/decoders/test_triton_algorithms.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/decoders/test_decoder_frontend.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/backline/decoders/test_triton_utils.py | 1 | # Copyright 2026 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_optimize_shot_adaptive.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_optimize.py | 1 | # Copyright 2018-2020 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_qnspsa.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_momentum_qng.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_reconstruct.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_qng_qjit.py | 1 | # Copyright 2018-2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_rotosolve.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/optimize/test_qng.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/circuit_graph/test_circuit_graph.py | 1 | # Copyright 2018-2020 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/shadow/test_shadow_class.py | 1 | # Copyright 2022 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/shadow/test_shadow_transforms.py | 1 | # Copyright 2022 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/shadow/test_shadow_entropies.py | 1 | # Copyright 2022 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/liealg/test_horizontal_cartan_subalgebra.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/liealg/test_lie_closure.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/liealg/test_cartan_decomp.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/liealg/test_involutions.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| 307 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_return_types_legacy.py | 749 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_return_types_legacy.py | 751 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_return_types_qnode.py | 1717 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_return_types_qnode.py | 1719 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/gate_data.py | 7 | # ======================================================== | COMMENT |
| MEDIUM | tests/gate_data.py | 9 | # ======================================================== | COMMENT |
| MEDIUM | tests/gate_data.py | 96 | # ======================================================== | COMMENT |
| MEDIUM | tests/gate_data.py | 98 | # ======================================================== | COMMENT |
| MEDIUM | tests/test_return_types.py | 774 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_return_types.py | 776 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/workflow/interfaces/execute/test_jax.py | 110 | # ------------------------------------ | COMMENT |
| MEDIUM | tests/workflow/interfaces/execute/test_torch.py | 105 | # ------------------------------------ | COMMENT |
| MEDIUM | tests/workflow/interfaces/execute/test_autograd.py | 85 | # ------------------------------------ | COMMENT |
| MEDIUM⚡ | …es/subroutines/time_evolution/test_trotter_vibronic.py | 501 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …es/subroutines/time_evolution/test_trotter_vibronic.py | 503 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …es/subroutines/time_evolution/test_trotter_vibronic.py | 683 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …es/subroutines/time_evolution/test_trotter_vibronic.py | 685 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 40 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 191 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 193 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 298 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 300 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 855 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/subroutines/time_evolution/test_trotter_vibronic.py | 857 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/ops/functions/test_equal.py | 1319 | # ------------------ | COMMENT |
| MEDIUM | tests/ops/functions/test_equal.py | 1334 | # ------------------ | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 371 | # ============================================ | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 410 | # ============================================= | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 463 | # ============================================= | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 491 | # ============================================ | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 508 | # ============================================ | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 533 | # ============================================= | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 563 | # ============================================= | COMMENT |
| MEDIUM | tests/gradients/core/test_metric_tensor.py | 591 | # ============================================ | COMMENT |
| MEDIUM | .github/workflows/docs.yml | 2 | # ----------------- | COMMENT |
| MEDIUM | .github/workflows/docs.yml | 15 | # ----------------- | COMMENT |
| MEDIUM | doc/conf.py | 340 | # ============================================================ | COMMENT |
| MEDIUM | pennylane/exceptions.py | 82 | # ============================================================================= | STRING |
| MEDIUM | pennylane/exceptions.py | 84 | # ============================================================================= | STRING |
| MEDIUM | pennylane/exceptions.py | 124 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/exceptions.py | 126 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/exceptions.py | 180 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/exceptions.py | 182 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/exceptions.py | 205 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/exceptions.py | 207 | # ============================================================================= | COMMENT |
| MEDIUM | pennylane/labs/tests/conftest.py | 26 | # ========================================================== | COMMENT |
| MEDIUM | pennylane/labs/tests/conftest.py | 211 | # ============================ | COMMENT |
| MEDIUM | pennylane/labs/tests/dla/test_dense_utils.py | 94 | # ------------------- | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 216 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 218 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 542 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 544 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 770 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 772 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 903 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 905 | # ======================================================== | STRING |
| MEDIUM⚡ | pennylane/core/operator/operator2.py | 1749 | # ------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | pennylane/core/operator/operator2.py | 1751 | # ------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | pennylane/core/operator/operator2.py | 428 | # ------------------------------------------------------------------------ | COMMENT |
| 60 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 371 | CODE | |
| LOW | tests/default_qubit_legacy.py | 298 | CODE | |
| LOW | tests/test_return_types_legacy.py | 884 | CODE | |
| LOW | tests/test_return_types_legacy.py | 991 | CODE | |
| LOW | tests/test_return_types_legacy.py | 1090 | CODE | |
| LOW | tests/test_return_types_legacy.py | 1144 | CODE | |
| LOW | tests/test_return_types_qnode.py | 1856 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2057 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2110 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2397 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2429 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2461 | CODE | |
| LOW | tests/test_return_types.py | 1185 | CODE | |
| LOW | tests/kernels/test_kernels.py | 601 | CODE | |
| LOW | tests/capture/autograph/test_autograph_array_update.py | 39 | CODE | |
| LOW | tests/capture/autograph/test_autograph_array_update.py | 42 | CODE | |
| LOW | tests/optimize/test_rotosolve.py | 30 | CODE | |
| LOW | tests/io/qasm_interpreter/test_interpreter.py | 838 | CODE | |
| LOW | tests/docs/test_supported_confs.py | 259 | CODE | |
| LOW | tests/qchem/test_factorization.py | 396 | CODE | |
| LOW | tests/qchem/vibrational/test_pes_generator.py | 384 | CODE | |
| LOW | tests/qchem/openfermion_pyscf_tests/test_convert.py | 895 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_torch_qnode.py | 1437 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 2139 | CODE | |
| LOW | tests/templates/subroutines/test_qubitization_thc.py | 90 | CODE | |
| LOW | …mplates/subroutines/time_evolution/test_trotter_cgf.py | 78 | CODE | |
| LOW | …tes/subroutines/time_evolution/trotter_test_helpers.py | 94 | CODE | |
| LOW | …ts/templates/subroutines/time_evolution/fermi_tools.py | 33 | CODE | |
| LOW | tests/templates/layers/test_particle_conserving_u1.py | 109 | CODE | |
| LOW | …sts/templates/state_preparations/test_partial_unary.py | 128 | CODE | |
| LOW | …sts/templates/state_preparations/test_partial_unary.py | 174 | CODE | |
| LOW | tests/qnn/test_iqp_expval.py | 114 | CODE | |
| LOW | tests/qnn/test_iqp_expval.py | 153 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 311 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 346 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 383 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 431 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 471 | CODE | |
| LOW | tests/pauli/test_pauli_arithmetic.py | 933 | CODE | |
| LOW | tests/pauli/grouping/test_pauli_graph_colouring.py | 27 | CODE | |
| LOW | tests/resource/test_specs.py | 1269 | CODE | |
| LOW | tests/resource/test_specs.py | 1276 | CODE | |
| LOW | tests/gradients/core/test_hadamard_gradient.py | 1025 | CODE | |
| LOW | tests/data/data_manager/test_dataset_access.py | 155 | CODE | |
| LOW | tests/measurements/test_probs.py | 645 | CODE | |
| LOW | tests/measurements/test_probs.py | 703 | CODE | |
| LOW | tests/helpers/hint_helpers.py | 19 | CODE | |
| LOW | tests/devices/test_device_api.py | 459 | CODE | |
| LOW | tests/devices/test_device_api.py | 512 | CODE | |
| LOW | tests/devices/test_preprocess.py | 639 | CODE | |
| LOW | pennylane/registers.py | 21 | CODE | |
| LOW | pennylane/registers.py | 81 | CODE | |
| LOW | pennylane/about.py | 53 | CODE | |
| LOW | pennylane/circuit_graph.py | 82 | CODE | |
| LOW | pennylane/labs/dla/variational_kak.py | 350 | CODE | |
| LOW | pennylane/labs/tests/tcdq/test_iqp_expval.py | 95 | CODE | |
| LOW | pennylane/labs/trotter_error/product_formulas/bch.py | 336 | CODE | |
| LOW | …lane/labs/trotter_error/product_formulas/commutator.py | 279 | CODE | |
| LOW | …labs/trotter_error/realspace/realspace_coefficients.py | 206 | CODE | |
| LOW | pennylane/labs/tcdq/utils.py | 61 | CODE | |
| 185 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/io/qasm_interpreter/test_interpreter.py | 72 | except (ModuleNotFoundError, ImportError) as import_error: | CODE |
| HIGH | tests/ops/op_math/test_linear_combination.py | 45 | except ImportError: | CODE |
| HIGH | tests/ops/op_math/test_linear_combination.py | 52 | except ImportError: | CODE |
| HIGH | tests/data/data_manager/test_dataset_access.py | 50 | except ImportError: | CODE |
| HIGH | pennylane/about.py | 86 | except (FileNotFoundError, json.JSONDecodeError): | CODE |
| HIGH | pennylane/labs/tcdq/training.py | 40 | except (ModuleNotFoundError, ImportError) as import_error: | CODE |
| HIGH | pennylane/core/qscript.py | 419 | except AttributeError: | CODE |
| HIGH | pennylane/io/qasm_interpreter.py | 588 | except EndProgram: | CODE |
| HIGH | pennylane/io/qasm_interpreter.py | 747 | except BreakException: | CODE |
| HIGH | pennylane/io/qasm_interpreter.py | 784 | except ContinueException: | CODE |
| HIGH | pennylane/io/qasm_interpreter.py | 858 | except ContinueException: | CODE |
| HIGH | pennylane/io/qualtran_io.py | 1083 | except (qt.DecomposeNotImplementedError, qt.DecomposeTypeError): | CODE |
| HIGH | pennylane/transforms/batch_partial.py | 140 | except ImportError: | CODE |
| HIGH | …lane/transforms/decompositions/clifford_t_transform.py | 84 | except (ModuleNotFoundError, ImportError): # pragma: no cover | CODE |
| HIGH | pennylane/gradients/vjp.py | 350 | except (AttributeError, TypeError, NotImplementedError): | CODE |
| HIGH | pennylane/gradients/jvp.py | 330 | except (AttributeError, TypeError): | CODE |
| HIGH | pennylane/data/base/dataset.py | 196 | except KeyError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pauli/test_pauli_arithmetic.py | 860 | assert copied_string1 == result # Check if the modified object matches the expected result | CODE |
| LOW | tests/pauli/test_pauli_arithmetic.py | 869 | assert copy_ps1 == res # Check if the modified object matches the expected result | CODE |
| LOW | tests/measurements/test_probs.py | 268 | # Check if the calculated probabilities match the expected values | COMMENT |
| LOW | tests/measurements/test_probs.py | 315 | # Check if the calculated probabilities match the expected values | COMMENT |
| LOW⚡ | tests/devices/qubit/test_sampling.py | 1326 | # Check if the distribution is roughly correct (allowing for some variance) | COMMENT |
| LOW⚡ | tests/devices/qubit/test_sampling.py | 1335 | # Check if all possible states are present | COMMENT |
| LOW⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 214 | # Check if we hit the tensor contraction branch | COMMENT |
| LOW | pennylane/capture/jax_patches.py | 253 | # Check if we're in the inline path | COMMENT |
| LOW | pennylane/capture/autograph/transformer.py | 66 | # Check if the function has already been converted. | COMMENT |
| LOW | pennylane/capture/autograph/ag_primitives.py | 221 | # Assign tracers to the iteration variables identified by AutoGraph (iter_args in mlir). | COMMENT |
| LOW | pennylane/core/operator/operator2.py | 1721 | # Check if either shape or dtype is not compatible | COMMENT |
| LOW | pennylane/core/operator/base.py | 986 | # Check if the expected number of parameters coincides with the one received. | COMMENT |
| LOW | pennylane/liealg/cartan_decomp.py | 187 | # Check if rank increases by adding matices from ``subspace`` | COMMENT |
| LOW | pennylane/qchem/vibrational/localize_modes.py | 130 | # Check if the minimization was successful; if it wasn't, proceed with the normal modes. | STRING |
| LOW | pennylane/math/__init__.py | 180 | # Check if object is purely real | COMMENT |
| LOW | pennylane/math/utils.py | 178 | # Check if all non-zeros in the sparse matrix match the scalar | COMMENT |
| LOW | pennylane/math/quantum.py | 1224 | # Check if the matrix is Hermitian | COMMENT |
| LOW | pennylane/math/quantum.py | 1229 | # Check if positive semi-definite | COMMENT |
| LOW | pennylane/transforms/optimization/pattern_matching.py | 1702 | # Check if two groups of matches are incompatible. | COMMENT |
| LOW | …e/transforms/optimization/merge_amplitude_embedding.py | 69 | # Check if the current gate is an AmplitudeEmbedding. | STRING |
| LOW | pennylane/transforms/optimization/merge_rotations.py | 203 | # Check if the rotation is composable; if it is not, move on. | STRING |
| LOW | …lane/transforms/decompositions/clifford_t_transform.py | 104 | # Check if matrix can be calculated for the operator | STRING |
| LOW | …lane/transforms/decompositions/clifford_t_transform.py | 340 | # Check if the subsequent gate exists in the vicinity | COMMENT |
| LOW | pennylane/ops/op_math/exp.py | 353 | # Check if the exponential can be decomposed into a PauliRot gate | COMMENT |
| LOW | pennylane/ops/op_math/decompositions/grid_problems.py | 645 | # Check if the solution is follows the constraints of the target-region. | COMMENT |
| LOW | pennylane/ops/op_math/decompositions/grid_problems.py | 698 | # Check if it is easier to solve problem for either of x-or-y-interval. | STRING |
| LOW | pennylane/ops/op_math/decompositions/grid_problems.py | 814 | # Check if we are indeed within the intended interval. | STRING |
| LOW | pennylane/ops/op_math/decompositions/grid_problems.py | 853 | f_adj2 = False # Check if we need to apply the sqrt(2) conjugation. | STRING |
| LOW | pennylane/ops/op_math/decompositions/grid_problems.py | 871 | # Check if we are solving the problem for the intended interval. | STRING |
| LOW⚡ | pennylane/ops/op_math/decompositions/grid_problems.py | 888 | # Check if the bounds on the interval contains an integer. | STRING |
| LOW⚡ | pennylane/ops/op_math/decompositions/grid_problems.py | 891 | # Check if the solution satisfies both bounds on x and y. | STRING |
| LOW⚡ | pennylane/ops/op_math/decompositions/grid_problems.py | 894 | # Check if the consecutive solutions are within the desired bounds. | STRING |
| LOW | pennylane/ops/op_math/decompositions/ross_selinger.py | 57 | # Check if abs_theta is an odd multiple of PI_8 | STRING |
| LOW | pennylane/ops/op_math/decompositions/rings.py | 130 | if (dv := ZSqrtTwo(n1 // d, n2 // d)) != ZSqrtTwo(0, 0): # Check if floor division works | STRING |
| LOW | pennylane/ops/op_math/decompositions/norm_solver.py | 400 | # Check if the next_xi is divisible by the element eta in Z[√2]. | STRING |
| LOW | pennylane/ops/functions/is_commuting.py | 319 | # Check if operations are non simplified rotations and return commutation if it is the case. | STRING |
| LOW | pennylane/pauli/pauli_vspace.py | 292 | # Check if new vector is linearly dependent on the current basis | STRING |
| LOW | pennylane/gradients/vjp.py | 120 | # Check if we're dealing with object arrays or non-standard types that don't support matmul | COMMENT |
| LOW | pennylane/decomposition/decomposition_graph.py | 920 | # Check if this decomposition is feasible under the work wire constraint | COMMENT |
| LOW | pennylane/devices/default_clifford.py | 145 | # Check if the operation is noisy | COMMENT |
| LOW | pennylane/devices/default_clifford.py | 725 | # Check if the rotation was permissible | COMMENT |
| LOW | pennylane/devices/default_clifford.py | 965 | # Check if it is Clifford | STRING |
| LOW | pennylane/devices/_qubit_device.py | 638 | # Check if there is an overridden version of the measurement process | COMMENT |
| LOW | pennylane/devices/_qubit_device.py | 686 | # Check if the state is accessible and decide to return the state or the density | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/conf.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/numeric_hamiltonians.py | 44 | __all__ = [ | STRING |
| LOW | pennylane/_grad/__init__.py | 23 | __all__ = ["grad", "jacobian", "jvp", "vjp", "value_and_grad"] | CODE |
| LOW | pennylane/labs/__init__.py | 46 | __all__ = [] | STRING |
| LOW | pennylane/labs/trotter_error/__init__.py | 106 | __all__ = [ | STRING |
| LOW | pennylane/labs/trotter_error/fragments/__init__.py | 20 | __all__ = [ | CODE |
| LOW | …nylane/labs/trotter_error/product_formulas/__init__.py | 20 | __all__ = [ | CODE |
| LOW | …ylane/labs/trotter_error/realspace/realspace_matrix.py | 109 | def set_block(self, row: int, col: int, rs_sum: RealspaceSum) -> None: | STRING |
| LOW | pennylane/labs/trotter_error/realspace/__init__.py | 21 | __all__ = [ | CODE |
| LOW | pennylane/labs/tcdq/__init__.py | 335 | __all__ = [ | STRING |
| LOW | pennylane/capture/primitives.py | 43 | __all__ = [ | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 39 | __all__ = [ | CODE |
| LOW | pennylane/core/__init__.py | 142 | __all__ = [ | CODE |
| LOW | pennylane/core/queuing.py | 454 | __all__ = ["QueuingManager", "AnnotatedQueue", "remove_from_program"] | CODE |
| LOW | pennylane/core/qscript.py | 1147 | __all__ = [ | CODE |
| LOW | pennylane/core/measurements.py | 587 | __all__ = ["MeasurementProcess", "SampleMeasurement", "StateMeasurement", "MeasurementTransform"] | CODE |
| LOW | pennylane/core/apply.py | 158 | __all__ = ["apply"] | CODE |
| LOW | pennylane/core/transforms/__init__.py | 32 | __all__ = ["transform", "Transform", "BoundTransform", "CompilePipeline"] | CODE |
| LOW | pennylane/core/operator/channel.py | 90 | __all__ = ["Channel"] | STRING |
| LOW | pennylane/core/operator/__init__.py | 169 | __all__ = [ | STRING |
| LOW | pennylane/core/operator/state_prep.py | 60 | __all__ = ["StatePrepBase"] | CODE |
| LOW | pennylane/core/operator/base.py | 1738 | __all__ = ["Operator", "Operation"] | STRING |
| LOW | pennylane/backline/__init__.py | 229 | __all__ = [ | STRING |
| LOW | pennylane/optimize/__init__.py | 40 | __all__ = [ | STRING |
| LOW | pennylane/liealg/__init__.py | 134 | __all__ = [ | STRING |
| LOW | pennylane/estimator/resource_config.py | 273 | def set_single_qubit_rot_precision(self, precision: float) -> None: | STRING |
| LOW | pennylane/ftqc/primitives.py | 23 | __all__ = [ | CODE |
| LOW | pennylane/ftqc/__init__.py | 58 | __all__ = [ | STRING |
| LOW | pennylane/math/__init__.py | 212 | __all__ = [ | CODE |
| LOW | pennylane/concurrency/__init__.py | 93 | __all__ = ["native", "external", "backends", "base"] | STRING |
| LOW | pennylane/concurrency/executors/__init__.py | 24 | __all__ = [ | STRING |
| LOW | pennylane/concurrency/executors/native/__init__.py | 40 | __all__ = ["MPPoolExec", "PyNativeExec", "ProcPoolExec", "ThreadPoolExec", "SerialExec"] | CODE |
| LOW | pennylane/concurrency/executors/external/__init__.py | 35 | __all__ = [ | STRING |
| LOW | pennylane/pytrees/__init__.py | 27 | __all__ = [ | CODE |
| LOW | pennylane/workflow/execution.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/_capture_qnode.py | 97 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/qnode.py | 44 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/qnode.py | 749 | def _set_shots(self, shots: int | Shots) -> None: | CODE |
| LOW | pennylane/workflow/jacobian_products.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/interfaces/jax.py | 157 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/interfaces/autograd.py | 97 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/interfaces/torch.py | 73 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/templates/core.py | 864 | __all__ = [ | CODE |
| LOW | pennylane/templates/subroutines/__init__.py | 92 | __all__ = [ | STRING |
| LOW | pennylane/qnn/torch.py | 551 | def set_input_argument(input_name: str = "inputs") -> None: | CODE |
| LOW | pennylane/control_flow/for_loop.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/resource/__init__.py | 60 | __all__ = [ | STRING |
| LOW | pennylane/data/data_manager/progress/__init__.py | 90 | __all__ = ["Progress", "Task"] | CODE |
| LOW | pennylane/data/data_manager/progress/_rich.py | 33 | __all__ = ["make_progress", "RichProgress"] | CODE |
| LOW | …nylane/data/data_manager/progress/_default/__init__.py | 194 | __all__ = ["make_progress", "DefaultProgress"] | CODE |
| LOW | pennylane/decomposition/decomposition_rule.py | 446 | def set_resources(self, resources: Callable | dict, exact_resources: bool = True) -> None: | CODE |
| LOW | pennylane/decomposition/decomposition_rule.py | 459 | def set_work_wire_spec(self, work_wires: Callable | dict) -> None: | CODE |
| LOW | pennylane/devices/null_qubit.py | 47 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/devices/default_mixed.py | 49 | logger = logging.getLogger(__name__) | STRING |
| LOW | pennylane/devices/_qubit_device.py | 63 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/devices/default_qubit.py | 69 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/devices/qubit/adjoint_jacobian.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/devices/qubit/simulate.py | 50 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/default_qubit_legacy.py | 295 | CODE | |
| LOW | tests/capture/test_capture_qnode.py | 396 | CODE | |
| LOW | tests/transforms/test_split_non_commuting.py | 144 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1883 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1922 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1966 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 504 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 808 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 839 | CODE | |
| LOW | tests/measurements/test_counts.py | 772 | CODE | |
| LOW | pennylane/labs/dla/recursive_cartan_decomp.py | 106 | CODE | |
| LOW | pennylane/labs/trotter_error/product_formulas/bch.py | 155 | CODE | |
| LOW | pennylane/core/transforms/transform.py | 416 | CODE | |
| LOW | pennylane/core/transforms/transform.py | 467 | CODE | |
| LOW | pennylane/backline/decode.py | 194 | CODE | |
| LOW | …nnylane/estimator/qpe_resources/second_quantization.py | 98 | CODE | |
| LOW | pennylane/io/qasm_interpreter.py | 612 | CODE | |
| LOW | pennylane/qchem/molecule.py | 83 | CODE | |
| LOW | pennylane/qchem/openfermion_pyscf.py | 490 | CODE | |
| LOW | pennylane/qchem/openfermion_pyscf.py | 876 | CODE | |
| LOW | pennylane/qchem/dipole.py | 326 | CODE | |
| LOW | pennylane/qchem/hamiltonian.py | 402 | CODE | |
| LOW | pennylane/qchem/hamiltonian.py | 495 | CODE | |
| LOW | pennylane/qchem/hamiltonian.py | 546 | CODE | |
| LOW | pennylane/qchem/vibrational/vibrational_class.py | 98 | CODE | |
| LOW | pennylane/qchem/vibrational/pes_generator.py | 735 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 66 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 131 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 203 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 272 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 346 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 440 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 538 | CODE | |
| LOW | pennylane/qchem/vibrational/christiansen_utils.py | 642 | CODE | |
| LOW | pennylane/math/multi_dispatch.py | 645 | CODE | |
| LOW | pennylane/transforms/commutation_dag.py | 153 | CODE | |
| LOW | pennylane/transforms/decompose.py | 44 | CODE | |
| LOW | pennylane/workflow/execution.py | 50 | CODE | |
| LOW | pennylane/workflow/qnode.py | 505 | CODE | |
| LOW | pennylane/workflow/interfaces/jax_jit.py | 192 | CODE | |
| LOW | pennylane/workflow/interfaces/torch.py | 171 | CODE | |
| LOW | pennylane/ops/functions/assert_valid.py | 646 | CODE | |
| LOW | pennylane/ops/functions/assert_valid.py | 741 | CODE | |
| LOW | pennylane/gradients/spsa_gradient.py | 71 | CODE | |
| LOW | pennylane/gradients/spsa_gradient.py | 107 | CODE | |
| LOW | pennylane/gradients/jvp.py | 469 | CODE | |
| LOW | pennylane/devices/preprocess.py | 269 | CODE | |
| LOW | pennylane/devices/qubit_mixed/measure.py | 93 | CODE | |
| LOW | pennylane/devices/qubit_mixed/measure.py | 306 | CODE | |
| LOW | pennylane/devices/qubit_mixed/apply_operation.py | 255 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/backline/decoders/test_triton_so_builder.py | 32 | except Exception: | CODE |
| LOW | tests/backline/decoders/test_triton_algorithms.py | 28 | except Exception: | CODE |
| MEDIUM | tests/backline/decoders/test_triton_algorithms.py | 25 | def _has_cuda_target() -> bool: | CODE |
| LOW | tests/backline/decoders/test_decoder_frontend.py | 31 | except Exception: | CODE |
| MEDIUM | tests/backline/decoders/test_decoder_frontend.py | 28 | def _has_cuda_target() -> bool: | CODE |
| LOW | tests/backline/decoders/test_triton_utils.py | 30 | except Exception: | CODE |
| MEDIUM | tests/backline/decoders/test_triton_utils.py | 27 | def _has_cuda_target() -> bool: | CODE |
| LOW⚡ | tests/ops/op_math/test_composite_op.py | 273 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW⚡ | tests/ops/op_math/test_composite_op.py | 283 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW⚡ | tests/ops/op_math/test_composite2.py | 334 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW⚡ | tests/ops/op_math/test_composite2.py | 344 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW | .github/workflows/scripts/upload_reports/upload.py | 43 | except Exception as e: | CODE |
| LOW⚡ | pennylane/kernels/postprocessing.py | 218 | except Exception: # pylint: disable=broad-except | STRING |
| LOW⚡ | pennylane/kernels/postprocessing.py | 221 | except Exception as e: | STRING |
| LOW | pennylane/capture/autograph/ag_primitives.py | 286 | except Exception as e: # pylint: disable=broad-exception-caught,broad-except | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 293 | except Exception as e: # pylint: disable=broad-exception-caught,broad-except | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 316 | except Exception as e: | CODE |
| LOW | pennylane/backline/decoders/triton/decoder_frontend.py | 155 | except Exception: | CODE |
| LOW | pennylane/io/io.py | 641 | except Exception as e: # pragma: no cover | STRING |
| LOW | pennylane/io/io.py | 835 | except Exception as e: | STRING |
| LOW | pennylane/ftqc/utils.py | 184 | except Exception as exc: | STRING |
| LOW | pennylane/ftqc/utils.py | 216 | except Exception as exc: | STRING |
| LOW | pennylane/math/single_dispatch.py | 117 | except Exception as e: | CODE |
| LOW | pennylane/concurrency/executors/native/multiproc.py | 66 | except Exception as e: | STRING |
| LOW | pennylane/noise/conditionals.py | 237 | except Exception as e: # pragma: no cover | CODE |
| LOW | pennylane/noise/conditionals.py | 296 | except Exception as e: # pragma: no cover | CODE |
| LOW | pennylane/templates/core.py | 750 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow.py | 267 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow.py | 285 | except Exception as e: | CODE |
| MEDIUM | pennylane/ops/op_math/pow.py | 274 | def decomposition(self): | CODE |
| LOW | pennylane/ops/op_math/pow2.py | 183 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow2.py | 201 | except Exception as e: | CODE |
| MEDIUM | pennylane/ops/op_math/pow2.py | 192 | def compute_decomposition(base, z): | CODE |
| LOW | pennylane/ops/functions/assert_valid.py | 469 | except Exception as e: | CODE |
| LOW | pennylane/ops/functions/assert_valid.py | 476 | except Exception as e: | CODE |
| LOW | pennylane/control_flow/for_loop.py | 537 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| MEDIUM | pennylane/control_flow/for_loop.py | 531 | def _call_capture_enabled(self, *init_state): | CODE |
| LOW | pennylane/gradients/vjp.py | 219 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | pennylane/logging/decorators.py | 36 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/data/attributes/operator/test__wires.py | 40 | ([0, 1, None], "[0, 1, null]"), | CODE |
| HIGH⚡ | tests/data/attributes/operator/test__wires.py | 41 | (["a", 1, None], '["a", 1, null]'), | CODE |
| HIGH | pennylane/capture/autograph/ag_primitives.py | 98 | """Assert that none of the results are undefined, i.e. have no value.""" | STRING |
| HIGH | pennylane/capture/autograph/ag_primitives.py | 368 | 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.py | 383 | operation between two values, `a` and `b`. If either value is undefined, it raises an error.""" | STRING |
| HIGH⚡ | pennylane/capture/autograph/ag_primitives.py | 389 | operation between two values, `a` and `b`. If either value is undefined, it raises an error.""" | STRING |
| HIGH⚡ | pennylane/capture/autograph/ag_primitives.py | 395 | operation on a value `a`. If `a` is undefined, it raises an error.""" | STRING |
| HIGH | pennylane/data/attributes/serialization.py | 68 | b'["builtins.list",null,[["builtins.dict",["a"],[null]],null]]' | STRING |
| HIGH | pennylane/data/attributes/serialization.py | 96 | >>> pytree_structure_load('["builtins.list",null,[["builtins.dict",["a"],[null]],null]') | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 404 | # Step 1: Prepare the condensed state | STRING |
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 419 | # Step 2: Use QROM to load v_bits into system register | STRING |
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 444 | # Step 5: Use identification register to uncompute the enumeration register | STRING |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 49 | # Step 1: Find the span of a | COMMENT |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 57 | # Step 2: Project each vector in m onto the orthogonal complement of span(a) | COMMENT |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 63 | # Step 3: Find a basis for the non-zero projections | COMMENT |
| LOW | pennylane/estimator/ops/op_math/symbolic.py | 152 | # NOTE: This method is not called by the estimate function. | STRING |
| LOW | pennylane/estimator/ops/op_math/symbolic.py | 354 | # NOTE: This method is not called by the estimate function. | STRING |
| LOW | pennylane/estimator/ops/op_math/symbolic.py | 542 | # NOTE: This method is not called by the estimate function. | STRING |
| LOW⚡ | pennylane/ftqc/pauli_tracker.py | 322 | # Step 1: Commutate the recorded xz with the Clifford gate to a new xz. | STRING |
| LOW⚡ | pennylane/ftqc/pauli_tracker.py | 325 | # Step 2: Merge the new xz with the byproduct by_op | STRING |
| LOW⚡ | pennylane/qchem/factorization.py | 824 | ) # Step 1: Reduce norm of two-body term | STRING |
| LOW⚡ | pennylane/qchem/factorization.py | 833 | ) # Step 2: Reduce norm of one-body term | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 1261 | # Step 1: Dense state preparation in enumeration register | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 366 | # Step 4: Split the set of bitstrings into three sets: | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 376 | # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ell | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 379 | # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span of | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 391 | # Step 3: brute-force search of the single remaining vector w_1 | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 394 | # 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.py | 241 | # Step 5: Map the set N to N', containing the components that are spanned by | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 675 | # Step 1: Construct a basis for the input bits | STRING |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 640 | # Step 5: Assign bijection for states already in subspace | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 974 | # Step 1: Dense state preparation | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 1004 | # Step 2: Apply the inverse of the isometry circuit | COMMENT |
| LOW | pennylane/resource/parsing.py | 38 | # NOTE: This function only uses absolute tolerance and not relative tolerance. | COMMENT |
| LOW⚡ | pennylane/devices/qubit_mixed/einsum_manpulation.py | 43 | # Step 1: The first rho_dim indices are the original state indices | STRING |
| LOW⚡ | pennylane/devices/qubit_mixed/einsum_manpulation.py | 46 | # 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.py | 56 | # Step 3: contruct the new indices for the quantum state after the operation | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 404 | # Step 1: Prepare the condensed state | STRING |
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 419 | # Step 2: Use QROM to load v_bits into system register | STRING |
| LOW | pennylane/labs/estimator_beta/templates/state_prep.py | 444 | # Step 5: Use identification register to uncompute the enumeration register | STRING |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 49 | # Step 1: Find the span of a | COMMENT |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 57 | # Step 2: Project each vector in m onto the orthogonal complement of span(a) | COMMENT |
| LOW⚡ | pennylane/liealg/horizontal_cartan_subalgebra.py | 63 | # Step 3: Find a basis for the non-zero projections | COMMENT |
| LOW | pennylane/io/qasm_interpreter.py | 522 | The purpose of this function is to pass each node to the appropriate handler. | STRING |
| LOW⚡ | pennylane/ftqc/pauli_tracker.py | 322 | # Step 1: Commutate the recorded xz with the Clifford gate to a new xz. | STRING |
| LOW⚡ | pennylane/ftqc/pauli_tracker.py | 325 | # Step 2: Merge the new xz with the byproduct by_op | STRING |
| LOW⚡ | pennylane/qchem/factorization.py | 824 | ) # Step 1: Reduce norm of two-body term | STRING |
| LOW⚡ | pennylane/qchem/factorization.py | 833 | ) # Step 2: Reduce norm of one-body term | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 1261 | # Step 1: Dense state preparation in enumeration register | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 366 | # Step 4: Split the set of bitstrings into three sets: | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 376 | # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ell | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 379 | # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span of | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 391 | # Step 3: brute-force search of the single remaining vector w_1 | STRING |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 394 | # 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.py | 241 | # Step 5: Map the set N to N', containing the components that are spanned by | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 675 | # Step 1: Construct a basis for the input bits | STRING |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 640 | # Step 5: Assign bijection for states already in subspace | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 974 | # Step 1: Dense state preparation | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 1004 | # Step 2: Apply the inverse of the isometry circuit | COMMENT |
| LOW⚡ | pennylane/devices/qubit_mixed/einsum_manpulation.py | 43 | # Step 1: The first rho_dim indices are the original state indices | STRING |
| LOW⚡ | pennylane/devices/qubit_mixed/einsum_manpulation.py | 46 | # 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.py | 56 | # Step 3: contruct the new indices for the quantum state after the operation | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/core/operator/test_core_operator.py | 260 | # because it will simply set `ndim_params` to the ndims of the provided arguments | COMMENT |
| LOW | tests/ops/qubit/test_qchem_ops.py | 483 | # can't just pass in an operator at the moment due to ArgInfo as a wire | COMMENT |
| LOW | tests/ops/qubit/test_qchem_ops.py | 531 | # can't just pass in an operator at the moment due to ArgInfo as a wire | COMMENT |
| LOW | tests/pauli/test_pauli_arithmetic.py | 271 | # psx does not contain identity, so simply add it to the definition with pw_id | COMMENT |
| LOW | tests/pauli/test_pauli_arithmetic.py | 810 | # psx does not contain identity, so simply add it to the definition with pw_id | COMMENT |
| MEDIUM | pennylane/operation.py | 73 | """To facilitate StatePrep rename""" | STRING |
| LOW | pennylane/core/transforms/transform.py | 430 | # simply return the original function rather than | STRING |
| LOW | pennylane/core/operator/operator2.py | 1033 | # no need for copies if we just use queue method | STRING |
| LOW | pennylane/core/operator/base.py | 1204 | # no need for copies if we just use queue method | STRING |
| MEDIUM | pennylane/backline/decoders/triton/bp_iters.py | 137 | # overflow robust tanh formula | COMMENT |
| MEDIUM | pennylane/math/multi_dispatch.py | 397 | # Avoid the case when one is a scalar - using a robust check for scalars | COMMENT |
| MEDIUM | pennylane/math/__init__.py | 193 | """Subclass of the Autoray NumpyMimic class in order to support | STRING |
| MEDIUM | pennylane/math/decomposition.py | 45 | # one to find theta, but the most numerically robust approach | STRING |
| LOW | pennylane/transforms/split_non_commuting.py | 766 | # For all other measurement types, simply add them to the list of measurements. | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 1204 | # invalid rule, just return so we dont get an error | COMMENT |
| LOW | pennylane/ops/op_math/controlled.py | 1042 | # For N>1 control wires, we simply add N-1 control wires to the phase shift | COMMENT |
| LOW | pennylane/devices/qubit_mixed/apply_operation.py | 700 | # If the operation covers the full system, just return it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pennylane/devices/qubit/simulate.py | 455 | # either as requested by terminal measurements or post-selection | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/codeql.yml | 59 | # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how | COMMENT |
| LOW | pennylane/control_flow/_loop_abstract_axes.py | 62 | # so therefore we just need to make sure to clean up after ourselves after | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/shadow/test_shadow_class.py | 431 | # TODO: add tests for the gradient once we implement the post-processing reconstruction | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/workflow/test_marker.py | 39 | def test_function(self): | CODE |
| LOW | tests/ops/op_math/test_adjoint.py | 993 | def test_function(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pennylane/core/transforms/__init__.py | 25 | """placeholder""" | STRING |