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 presents the forensic synthetic code analysis of PennyLaneAI/pennylane, a Python project with 3,393 GitHub stars. SynthScan v2.0 examined 682,511 lines of code across 1464 source files, recording 11919 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 24.4 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 11919 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_wires.py | 61 | def test_creation_from_iterables_of_exotic_elements(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 67 | def test_creation_from_wires_object(self): | CODE |
| LOW⚡ | tests/test_wires.py | 73 | def test_creation_from_wires_lists(self): | CODE |
| LOW⚡ | tests/test_wires.py | 82 | def test_creation_from_different_wire_types(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 90 | def test_creation_from_single_object(self, wire): | CODE |
| LOW⚡ | tests/test_wires.py | 100 | def test_error_for_incorrect_wire_types(self, input): | CODE |
| LOW⚡ | tests/test_wires.py | 109 | def test_error_for_repeated_wires(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 116 | def test_indexing_and_slicing(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 177 | def test_add_two_wires_objects(self): | CODE |
| LOW⚡ | tests/test_wires.py | 183 | def test_add_wires_object_with_iterable(self): | CODE |
| LOW⚡ | tests/test_wires.py | 190 | def test_add_wires_with_inbuilt_sum(self): | CODE |
| LOW⚡ | tests/test_wires.py | 196 | def test_representation_and_string(self): | CODE |
| LOW⚡ | tests/test_wires.py | 204 | def test_array_representation(self): | CODE |
| LOW⚡ | tests/test_wires.py | 580 | def test_error_for_incorrect_jax_arrays(self, input): | CODE |
| LOW⚡ | tests/test_wires.py | 589 | def test_error_for_repeated_wires_jax(self, iterable): | CODE |
| LOW⚡ | tests/test_wires.py | 594 | def test_array_representation_jax(self): | CODE |
| LOW | tests/test_wires.py | 46 | def test_creation_from_common_iterables(self, iterable): | CODE |
| LOW | tests/test_wires.py | 215 | def test_jax_array_representation(self): | CODE |
| LOW | tests/test_wires.py | 243 | def test_convert_to_numpy_array(self): | CODE |
| LOW | tests/test_wires.py | 310 | def test_select_random_method(self): | CODE |
| LOW | tests/test_wires.py | 406 | def test_wires_pytree_with_array_leaves(self): | CODE |
| LOW | tests/test_wires.py | 496 | def test_symmetric_difference(self, wire_a, wire_b, expected): | CODE |
| LOW | tests/test_wires.py | 561 | def test_creation_from_jax_array(self, iterable, expected): | CODE |
| LOW | tests/conftest.py | 143 | def enable_disable_dynamic_shapes(): | CODE |
| LOW⚡ | tests/conftest.py | 164 | def enable_graph_decomposition(): | CODE |
| LOW⚡ | tests/conftest.py | 171 | def disable_graph_decomposition(): | CODE |
| LOW⚡ | tests/conftest.py | 178 | def enable_and_disable_graph_decomp(request): | CODE |
| LOW | tests/conftest.py | 246 | def pytest_collection_modifyitems(items, config): | 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 | 70 | def test_isinstance_tf_tensor_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 80 | def test_subclass_unknown_type(self): | CODE |
| LOW⚡ | tests/test_typing.py | 89 | def test_subclass_numpy_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 93 | def test_subclass_pennylane_tensor(self): | CODE |
| LOW⚡ | tests/test_typing.py | 98 | def test_subclass_jax_array_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 105 | def test_subclass_torch_tensor_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 112 | def test_subclass_tf_tensor_is_tensor_like(self): | CODE |
| LOW⚡ | tests/test_typing.py | 393 | def test_instance_check_unknown_rank(self): | CODE |
| LOW⚡ | tests/test_typing.py | 400 | def test_instance_check_rejects_non_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 405 | def test_weak_type_for_number_dtypes(self): | CODE |
| LOW⚡ | tests/test_typing.py | 412 | def test_is_compatible_with_non_numeric_input(self): | CODE |
| LOW⚡ | tests/test_typing.py | 417 | def test_is_compatible_with_weak_scalar(self): | CODE |
| LOW⚡ | tests/test_typing.py | 427 | def test_is_compatible_with_weak_array(self): | CODE |
| LOW⚡ | tests/test_typing.py | 436 | def test_is_compatible_with_arbitrary_shape(self): | CODE |
| LOW⚡ | tests/test_typing.py | 443 | def test_is_compatible_with_list(self): | CODE |
| LOW⚡ | tests/test_typing.py | 449 | def test_is_compatible_with_unknown_axes(self): | CODE |
| LOW⚡ | tests/test_typing.py | 457 | def test_is_compatible_with_torch_tensor(self): | CODE |
| LOW | tests/test_typing.py | 230 | def test_invalid_shape_tuple_error(self): | CODE |
| LOW | tests/test_typing.py | 328 | def test_error_indexing_into_non_scalar(self): | CODE |
| LOW | tests/test_typing.py | 346 | def test_error_len_on_dynamic_zeroeth_axis(self): | CODE |
| LOW | tests/param_shift_dev.py | 65 | def execute_and_compute_derivatives(self, circuits, execution_config=None): | CODE |
| LOW⚡ | tests/test_qcut.py | 3188 | def test_mc_complicated_circuit(self, dev_fn, mocker): | CODE |
| LOW | tests/test_qcut.py | 317 | def test_wrapped_obj_eq_false(self, obj1, obj2): | CODE |
| LOW | tests/test_qcut.py | 323 | def test_wrapped_obj_eq_false_other_obj(self): | CODE |
| LOW | tests/test_qcut.py | 393 | def test_converted_graph_nodes(self): | CODE |
| LOW | tests/test_qcut.py | 409 | def test_converted_graph_edges(self): | CODE |
| 7581 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/test_qcut.py | 0 | test that ``_wrappedobj.__eq__`` returns false when expected. | STRING |
| HIGH | tests/circuit_graph/test_circuit_graph.py | 0 | test that ``_wrappedobj.__eq__`` returns false when expected. | STRING |
| HIGH | tests/gradients/core/test_metric_tensor.py | 0 | test that ``_wrappedobj.__eq__`` returns false when expected. | STRING |
| HIGH | tests/test_qcut.py | 0 | test that _wrappedobj.__eq__ returns false when the object being compared is not a _wrappedobj. | STRING |
| HIGH | tests/circuit_graph/test_circuit_graph.py | 0 | test that _wrappedobj.__eq__ returns false when the object being compared is not a _wrappedobj. | STRING |
| HIGH | tests/gradients/core/test_metric_tensor.py | 0 | test that _wrappedobj.__eq__ returns false when the object being compared is not a _wrappedobj. | STRING |
| HIGH | tests/test_qcut.py | 0 | test that ``_wrappedobj.__eq__`` returns true when expected. | STRING |
| HIGH | tests/circuit_graph/test_circuit_graph.py | 0 | test that ``_wrappedobj.__eq__`` returns true when expected. | STRING |
| HIGH | tests/gradients/core/test_metric_tensor.py | 0 | test that ``_wrappedobj.__eq__`` returns true when expected. | STRING |
| HIGH | tests/test_qcut.py | 0 | test that ``_wrappedobj.__hash__`` is the object id. | STRING |
| HIGH | tests/circuit_graph/test_circuit_graph.py | 0 | test that ``_wrappedobj.__hash__`` is the object id. | STRING |
| HIGH | tests/gradients/core/test_metric_tensor.py | 0 | test that ``_wrappedobj.__hash__`` is the object id. | STRING |
| HIGH | tests/test_qcut.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/test_queuing.py | 0 | test that the ``wrappedobj` representation is equivalent to the repr of the object it wraps. | 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 |
| 1076 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 | 196 | CODE | |
| LOW | tests/conftest.py | 204 | 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 | 270 | CODE | |
| LOW | .github/workflows/scripts/upload_reports/upload.py | 5 | 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 | 25 | CODE | |
| LOW | pennylane/__init__.py | 27 | 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 | 32 | CODE | |
| LOW | pennylane/__init__.py | 33 | 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 | 38 | CODE | |
| LOW | pennylane/__init__.py | 39 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 40 | CODE | |
| LOW | pennylane/__init__.py | 48 | CODE | |
| LOW | pennylane/__init__.py | 49 | 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 | |
| 1730 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 | 135 | A :func:`~.qjit`-compatible transformation for returning the result and jacobian of a function. This function a | STRING |
| HIGH | pennylane/_grad/jvp.py | 140 | 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.py | 76 | Choose a reasonable radial basis function (RBF) kernel bandwidth from the target dataset. A good starting point for | STRING |
| HIGH | pennylane/labs/tcdq/mmd_loss.py | 211 | Compute the MMD loss between a qubit IQP circuit and a target dataset. This function estimates how far the circuit' | STRING |
| HIGH | pennylane/labs/tcdq/qudit_mmd_loss.py | 317 | Build a reusable loss function that computes the qudit graph-kernel MMD. The returned callable measures the distanc | STRING |
| HIGH | pennylane/labs/tcdq/qudit_expval_functions.py | 140 | 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 | 445 | 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/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/queuing.py | 447 | Apply an instantiated operator or measurement to a queuing context. Args: op (.Operator or .MeasurementProc | 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/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/qaoa/cycle.py | 310 | Calculates the loss Hamiltonian for the maximum-weighted cycle problem. We consider the problem of selecting a cycl | STRING |
| HIGH | pennylane/qaoa/cycle.py | 468 | Calculates the `out flow constraint <https://1qbit.com/whitepaper/arbitrage/>`__ Hamiltonian for the maximum-weighte | STRING |
| HIGH | pennylane/qaoa/cycle.py | 522 | Calculates the `net flow constraint <https://doi.org/10.1080/0020739X.2010.526248>`__ Hamiltonian for the maximum-we | 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 |
| HIGH | pennylane/ftqc/parametric_midmeasure.py | 82 | Perform a mid-circuit measurement in the basis defined by the plane and angle on the supplied qubit. The measur | STRING |
| HIGH | pennylane/ftqc/parametric_midmeasure.py | 192 | Perform a mid-circuit measurement in the X basis. The measurements are performed using the 0, 1 convention rather th | STRING |
| HIGH | pennylane/ftqc/parametric_midmeasure.py | 241 | Perform a mid-circuit measurement in the Y basis. The measurements are performed using the 0, 1 convention rather th | STRING |
| HIGH | pennylane/ftqc/parametric_midmeasure.py | 290 | Perform a mid-circuit measurement in the Z basis. The measurements are performed using the 0, 1 convention rather th | STRING |
| HIGH | pennylane/ftqc/parametric_midmeasure.py | 627 | Diagonalize any mid-circuit measurements in a parameterized basis into the computational basis. Args: tape | STRING |
| HIGH | pennylane/fermi/fermionic.py | 319 | Shifts an operator in the FermiWord from ``initial_position`` to ``final_position`` by applying the fermionic anti-commu | STRING |
| HIGH | pennylane/spin/spin_hamiltonian.py | 332 | Generates the Hamiltonian for the Emery model on a lattice. The `Hamiltonian <https://arxiv.org/pdf/2309.11786>`_ f | STRING |
| HIGH | pennylane/spin/spin_hamiltonian.py | 498 | Generates the Hamiltonian for the Haldane model on a lattice. The `Hamiltonian <https://arxiv.org/pdf/2211.13615>`_ | STRING |
| HIGH | pennylane/spin/spin_hamiltonian.py | 632 | Generates the Hamiltonian for the Kitaev model on the honeycomb lattice. The `Kitaev <https://arxiv.org/abs/cond-ma | STRING |
| HIGH | pennylane/spin/spin_hamiltonian.py | 717 | Generates a spin Hamiltonian for a custom :class:`~pennylane.spin.Lattice` object. Args: lattice (Lattice): | STRING |
| HIGH | pennylane/spin/lattice.py | 32 | Constructs a Lattice object. Args: n_cells (list[int]): Number of cells in each direction of the grid. | STRING |
| HIGH | pennylane/qchem/tapering.py | 468 | Instantiates objects for whichever of the ``operation`` or ``op_gen`` args are callables. For the former, it is done | STRING |
| 119 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 | 219 | # Create the initial state. Internally, we store the | STRING |
| MEDIUM | tests/default_qubit_legacy.py | 1022 | # 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 | 67 | # Define the graph structure for the RZ cluster state (omit node 1 for input): | COMMENT |
| MEDIUM | tests/ftqc/test_mbqc_gates.py | 119 | # 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 | 30 | # Define a list of dtypes to test | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 847 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 862 | # Define a batch of 2-qubit density matrices | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 886 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 899 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 914 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 933 | # Define a 2-qubit density matrix | COMMENT |
| MEDIUM | tests/math/test_matrix_manipulation.py | 1181 | # Create a positive definite matrix | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 329 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 398 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 451 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/transforms/zx/test_converter.py | 504 | # Create the qubits in the graph and the qubit mapper | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1180 | # Create a uniform probability distribution for 2 qubits | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1199 | # Create a uniform probability distribution for 2 qubits | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1217 | # Create a biased probability distribution (not uniform to make differences more apparent) | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1271 | # Create a circuit that performs classical shadow measurement | COMMENT |
| MEDIUM | tests/workflow/test_qnode_legacy.py | 1415 | # Create a simple tape for execution | COMMENT |
| MEDIUM | tests/ops/op_math/test_linear_combination.py | 1474 | # 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 | 101 | # Define a non-trivial two-qubit density matrix | COMMENT |
| MEDIUM | tests/measurements/test_purity_measurement.py | 112 | # 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 | 1375 | # Create a custom operator that's not in the standard gateset | COMMENT |
| MEDIUM⚡ | tests/devices/test_null_qubit.py | 1383 | # 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 | 136 | # Create a random unitary matrix | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 140 | # Create a random state vector | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 155 | # Create a random unitary matrix | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 159 | # Create a random state vector | COMMENT |
| MEDIUM⚡ | tests/devices/qubit/test_apply_operation.py | 222 | # Create a dense state, shape (2,2,2) | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 126 | # Create a sparse observable | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 204 | # Create a Sum observable that involves the operators | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 208 | # Create the measurement process | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 211 | # Create a mock state (you would normally use a real state here) | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 736 | # Define the readout error probability | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 739 | # Define the readout error operation using qp.BitFlip | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 743 | # Define the state: let's use the |+⟩ state | COMMENT |
| MEDIUM⚡ | tests/devices/qubit_mixed/test_qubit_mixed_measure.py | 747 | # Define the observable | COMMENT |
| MEDIUM | tests/devices/qubit_mixed/test_qubit_mixed_simulate.py | 237 | # Create a cache dictionary to store states | COMMENT |
| 87 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_qcut.py | 1 | # Copyright 2022 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/test_compiler.py | 1 | # Copyright 2023 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_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/capture_utils.py | 1 | # Copyright 2026 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/transforms/test_capture_decompose.py | 1 | # Copyright 2024 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | …sts/capture/transforms/test_capture_graph_decompose.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/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_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/fourier/test_qnode_spectrum.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/fourier/test_coefficients.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/fourier/test_reconstruct.py | 1 | # Copyright 2018-2021 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/fourier/test_visualize.py | 1 | # Copyright 2018-2021 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 |
| LOW | tests/estimator/test_estimator_second_quantization.py | 1 | # Copyright 2018-2025 Xanadu Quantum Technologies Inc. | COMMENT |
| LOW | tests/estimator/test_estimator_first_quantization.py | 1 | # Copyright 2018-2025 Xanadu Quantum Technologies Inc. | COMMENT |
| 323 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_qcut.py | 3194 | 0: ──X──//─╭C───//──RX─╭C───//─╭C──╭//────────────────────┤ | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 3195 | 1: ────────╰X──────────╰X───//─╰Z──╰//────────────────╭RX─┤ ╭Sample | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 4382 | 0: ──BasisState(M0)──//───────╭C───//──RX(0.40)─╭C───//─╭C────────╭//────────────────── | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 4383 | 1: ───────────────────────────╰X────────────────╰X───//─╰Z────────╰//────────────────── | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 4385 | 3: ─────────────────╰RY(0.50)──//──H──╭C─────────//──H──╰C─────────//─╭RY(0.89)──//──H─ | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 5414 | 1: ─╰X──RY──//─╭C──RY────────────────────────────────────────────────────────┤ ├<Z@Z@Z@Z@Z@Z@Z@Z> | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 5415 | 2: ────────────╰X──RY──//─╭C──RY─────────────────────────────────────────────┤ ├<Z@Z@Z@Z@Z@Z@Z@Z> | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 5416 | 3: ───────────────────────╰X──RY──//─╭C──RY──────────────────────────────────┤ ├<Z@Z@Z@Z@Z@Z@Z@Z> | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 5417 | 4: ──────────────────────────────────╰X──RY──//─╭C──RY───────────────────────┤ ├<Z@Z@Z@Z@Z@Z@Z@Z> | STRING |
| MEDIUM⚡ | tests/test_qcut.py | 5418 | 5: ─────────────────────────────────────────────╰X──RY──//─╭C──RY────────────┤ ├<Z@Z@Z@Z@Z@Z@Z@Z> | STRING |
| 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 | 2188 | # ------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_return_types_qnode.py | 2190 | # ------------------------------------------------- | 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 | tests/ops/functions/test_equal.py | 1311 | # ------------------ | COMMENT |
| MEDIUM | tests/ops/functions/test_equal.py | 1326 | # ------------------ | 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/qcut/utils.py | 119 | 1: ──RY(0.2)─╰X──//─╭●─╰X──────────┤ │ | STRING |
| MEDIUM | pennylane/qcut/utils.py | 137 | 1: ──RY(0.2)─╰X──//─╭●──//─╰X───────┤ │ | STRING |
| MEDIUM⚡ | pennylane/qcut/utils.py | 197 | 0: ──RX──//─╭●──//────────╭●──//────────┤ ╭<X@Y@Z> | STRING |
| MEDIUM⚡ | pennylane/qcut/utils.py | 198 | 1: ──RY──//─╰X──//─╭●──//─╰X────────────┤ │ | STRING |
| MEDIUM⚡ | pennylane/qcut/utils.py | 200 | b: ──RY──//─╰X──//────────╰X──//──RY────┤ ╰<X@Y@Z> | STRING |
| MEDIUM | pennylane/core/qscript.py | 217 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 219 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 543 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 545 | # ======================================================== | COMMENT |
| MEDIUM | pennylane/core/qscript.py | 771 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 773 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 904 | # ======================================================== | STRING |
| MEDIUM | pennylane/core/qscript.py | 906 | # ======================================================== | STRING |
| 51 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 246 | CODE | |
| LOW | tests/conftest.py | 308 | CODE | |
| LOW | tests/test_qcut.py | 4871 | CODE | |
| LOW | tests/test_qcut.py | 1305 | CODE | |
| LOW | tests/default_qubit_legacy.py | 300 | 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 | 2327 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2528 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2581 | CODE | |
| LOW | tests/test_return_types_qnode.py | 2954 | CODE | |
| LOW | tests/test_return_types_qnode.py | 3018 | CODE | |
| LOW | tests/test_return_types_qnode.py | 3050 | CODE | |
| LOW | tests/test_return_types.py | 1185 | CODE | |
| LOW | tests/kernels/test_kernels.py | 625 | CODE | |
| LOW | tests/capture/capture_utils.py | 38 | CODE | |
| LOW | tests/capture/autograph/test_autograph_array_update.py | 39 | CODE | |
| LOW | tests/capture/autograph/test_autograph_array_update.py | 42 | CODE | |
| LOW | …sts/capture/transforms/test_capture_graph_decompose.py | 576 | CODE | |
| LOW | tests/optimize/test_rotosolve.py | 30 | CODE | |
| LOW | tests/io/qasm_interpreter/test_interpreter.py | 837 | CODE | |
| LOW | tests/docs/test_supported_confs.py | 258 | 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 | 1431 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 2119 | CODE | |
| LOW | tests/templates/layers/test_particle_conserving_u1.py | 108 | CODE | |
| LOW | …sts/templates/state_preparations/test_partial_unary.py | 120 | CODE | |
| LOW | …sts/templates/state_preparations/test_partial_unary.py | 157 | 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 | 309 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 344 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 381 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 429 | CODE | |
| LOW | tests/ops/qubit/test_non_parametric_ops.py | 469 | CODE | |
| LOW | tests/ops/op_math/test_exp.py | 508 | CODE | |
| LOW | tests/pauli/test_pauli_arithmetic.py | 933 | CODE | |
| LOW | tests/pauli/grouping/test_pauli_graph_colouring.py | 27 | CODE | |
| LOW | tests/gradients/core/test_hadamard_gradient.py | 1024 | CODE | |
| LOW | tests/data/data_manager/test_dataset_access.py | 155 | CODE | |
| LOW | tests/measurements/test_probs.py | 666 | CODE | |
| LOW | tests/measurements/test_probs.py | 724 | 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 | 56 | 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 | 93 | CODE | |
| LOW | …nylane/labs/tests/templates/test_trotter_fragmented.py | 121 | 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 | |
| 203 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pulse/test_rydberg.py | 89 | # Set interaction_coeff to one for easier comparison | COMMENT |
| 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 | 215 | # Check if we hit the tensor contraction branch | COMMENT |
| LOW | pennylane/capture/jax_patches.py | 265 | # 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 | 230 | # Assign tracers to the iteration variables identified by AutoGraph (iter_args in mlir). | COMMENT |
| LOW | pennylane/core/operator/operator2.py | 1483 | # Check if either shape or dtype is not compatible | COMMENT |
| LOW | pennylane/core/operator/base.py | 1011 | # Check if the expected number of parameters coincides with the one received. | COMMENT |
| LOW | pennylane/fourier/visualize.py | 60 | # Check if the user provided a single set of coefficients to a function that is | 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 | 179 | # Check if object is purely real | COMMENT |
| LOW | pennylane/math/utils.py | 175 | # Check if all non-zeros in the sparse matrix match the scalar | COMMENT |
| LOW | pennylane/math/quantum.py | 1227 | # Check if the matrix is Hermitian | COMMENT |
| LOW | pennylane/math/quantum.py | 1232 | # 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 | 337 | # 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 | 61 | # 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 | 320 | # 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/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 | 636 | # Check if there is an overridden version of the measurement process | COMMENT |
| LOW | pennylane/devices/_qubit_device.py | 684 | # Check if the state is accessible and decide to return the state or the density | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/default_qubit_legacy.py | 297 | CODE | |
| LOW | tests/capture/test_capture_qnode.py | 396 | CODE | |
| LOW | tests/capture/transforms/test_capture_decompose.py | 369 | CODE | |
| LOW | tests/transforms/test_split_non_commuting.py | 144 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1865 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1904 | CODE | |
| LOW | tests/workflow/interfaces/qnode/test_jax_jit_qnode.py | 1946 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 504 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 811 | CODE | |
| LOW | tests/workflow/interfaces/execute/test_jax_jit.py | 842 | CODE | |
| LOW | tests/gradients/core/test_pulse_gradient.py | 1298 | CODE | |
| LOW | tests/measurements/test_counts.py | 771 | CODE | |
| LOW | pennylane/labs/dla/recursive_cartan_decomp.py | 106 | CODE | |
| LOW | pennylane/labs/trotter_error/product_formulas/bch.py | 155 | CODE | |
| LOW | pennylane/qcut/kahypar.py | 30 | CODE | |
| LOW | pennylane/qcut/processing.py | 77 | CODE | |
| LOW | pennylane/core/transforms/transform.py | 417 | CODE | |
| LOW | pennylane/core/transforms/transform.py | 468 | 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 | 665 | CODE | |
| LOW | pennylane/transforms/commutation_dag.py | 153 | CODE | |
| LOW | pennylane/transforms/decompose.py | 355 | CODE | |
| LOW | pennylane/transforms/decompose.py | 87 | CODE | |
| LOW | pennylane/workflow/execution.py | 52 | 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 | 654 | CODE | |
| LOW | pennylane/ops/functions/assert_valid.py | 731 | 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 | 314 | CODE | |
| LOW | pennylane/devices/qubit_mixed/apply_operation.py | 255 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/conf.py | 21 | logger = logging.getLogger(__name__) | CODE |
| 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 | 316 | __all__ = [ | STRING |
| LOW | pennylane/capture/primitives.py | 57 | __all__ = [ | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 45 | __all__ = [ | CODE |
| LOW | pennylane/core/__init__.py | 125 | __all__ = [ | CODE |
| LOW | pennylane/core/queuing.py | 574 | __all__ = ["QueuingManager", "AnnotatedQueue", "apply"] | CODE |
| LOW | pennylane/core/qscript.py | 1183 | __all__ = [ | CODE |
| LOW | pennylane/core/measurements.py | 587 | __all__ = ["MeasurementProcess", "SampleMeasurement", "StateMeasurement", "MeasurementTransform"] | 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 | 158 | __all__ = [ | STRING |
| LOW | pennylane/core/operator/state_prep.py | 60 | __all__ = ["StatePrepBase"] | CODE |
| LOW | pennylane/core/operator/base.py | 1793 | __all__ = ["Operator", "Operation"] | STRING |
| LOW | pennylane/optimize/__init__.py | 39 | __all__ = [ | STRING |
| LOW | pennylane/qaoa/__init__.py | 100 | __all__ = [ | CODE |
| 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 | 211 | __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 | 38 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/_capture_qnode.py | 101 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/qnode.py | 44 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/workflow/qnode.py | 751 | 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/tensorflow.py | 113 | 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 | 895 | __all__ = [ | CODE |
| LOW | pennylane/templates/subroutines/__init__.py | 76 | __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 | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | pennylane/resource/__init__.py | 58 | __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 | 431 | def set_resources(self, resources: Callable | dict, exact_resources: bool = True) -> None: | CODE |
| LOW | pennylane/decomposition/decomposition_rule.py | 444 | 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 | 61 | 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 | 48 | logger = logging.getLogger(__name__) | 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 | 104 | """Assert that none of the results are undefined, i.e. have no value.""" | STRING |
| HIGH | pennylane/capture/autograph/ag_primitives.py | 377 | 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 | 392 | operation between two values, `a` and `b`. If either value is undefined, it raises an error.""" | STRING |
| HIGH⚡ | pennylane/capture/autograph/ag_primitives.py | 398 | operation between two values, `a` and `b`. If either value is undefined, it raises an error.""" | STRING |
| HIGH⚡ | pennylane/capture/autograph/ag_primitives.py | 404 | 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 | 213 | # 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 | 321 | # Step 3: brute-force search of a single vector w_1 | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 327 | # Step 4: Split the set of bitstrings into three sets: | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 339 | # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ell | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 342 | # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span of bits_basis[:, :-1] | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 349 | # Step 8: Append the replacement vector w_t to sub_W | COMMENT |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 622 | # Step 1: Construct a basis for the input bits | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 1061 | # Step 1: Dense state preparation in enumeration register | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 496 | # Step 5: Assign bijection for states already in subspace | COMMENT |
| LOW⚡ | pennylane/templates/state_preparations/partial_unary.py | 768 | # Step 1: Dense state preparation | COMMENT |
| LOW⚡ | pennylane/templates/state_preparations/partial_unary.py | 777 | # 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 | 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 | 213 | # 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 | 321 | # Step 3: brute-force search of a single vector w_1 | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 327 | # Step 4: Split the set of bitstrings into three sets: | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 339 | # Step 6: Brute-force search bitstring ell to replace v_l. Step 5 is included in _find_ell | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 342 | # Step 7: Compute new set sub_bits <> \mathcal{V}' of bitstrings in span of bits_basis[:, :-1] | COMMENT |
| LOW⚡ | …nnylane/templates/state_preparations/sum_of_slaters.py | 349 | # Step 8: Append the replacement vector w_t to sub_W | COMMENT |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 622 | # Step 1: Construct a basis for the input bits | STRING |
| LOW | …nnylane/templates/state_preparations/sum_of_slaters.py | 1061 | # Step 1: Dense state preparation in enumeration register | COMMENT |
| LOW | pennylane/templates/state_preparations/partial_unary.py | 496 | # Step 5: Assign bijection for states already in subspace | COMMENT |
| LOW⚡ | pennylane/templates/state_preparations/partial_unary.py | 768 | # Step 1: Dense state preparation | COMMENT |
| LOW⚡ | pennylane/templates/state_preparations/partial_unary.py | 777 | # 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/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 | .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 | 295 | except Exception as e: # pylint: disable=broad-exception-caught,broad-except | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 302 | except Exception as e: # pylint: disable=broad-exception-caught,broad-except | CODE |
| LOW | pennylane/capture/autograph/ag_primitives.py | 325 | except Exception as e: | 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 | 118 | except Exception as e: | CODE |
| LOW | pennylane/math/matrix_manipulation.py | 337 | except Exception as err: # pragma: no cover, pylint:disable=broad-except | 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 | 775 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow.py | 285 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow.py | 303 | except Exception as e: | CODE |
| MEDIUM | pennylane/ops/op_math/pow.py | 292 | def decomposition(self): | CODE |
| LOW | pennylane/ops/op_math/pow2.py | 162 | except Exception as e: | CODE |
| LOW | pennylane/ops/op_math/pow2.py | 180 | except Exception as e: | CODE |
| MEDIUM | pennylane/ops/op_math/pow2.py | 171 | def compute_decomposition(base, z): | CODE |
| LOW | pennylane/ops/functions/assert_valid.py | 476 | except Exception as e: | CODE |
| LOW | pennylane/ops/functions/assert_valid.py | 482 | except Exception as e: | CODE |
| LOW | pennylane/ops/functions/assert_valid.py | 565 | except Exception as e: | CODE |
| LOW | pennylane/control_flow/for_loop.py | 471 | except Exception as e: # pylint: disable=broad-exception-caught | CODE |
| LOW | pennylane/gradients/vjp.py | 136 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | pennylane/gradients/vjp.py | 238 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | pennylane/logging/decorators.py | 36 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/core/operator/test_core_operator.py | 261 | # because it will simply set `ndim_params` to the ndims of the provided arguments | 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 | 431 | # simply return the original function rather than | STRING |
| LOW | pennylane/core/operator/operator2.py | 820 | # no need for copies if we just use queue method | STRING |
| LOW | pennylane/core/operator/base.py | 1247 | # no need for copies if we just use queue method | STRING |
| MEDIUM | pennylane/math/multi_dispatch.py | 403 | # Avoid the case when one is a scalar - using a robust check for scalars | COMMENT |
| MEDIUM | pennylane/math/__init__.py | 192 | """Subclass of the Autoray NumpyMimic class in order to support | STRING |
| MEDIUM | pennylane/math/decomposition.py | 50 | # 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 | pennylane/ops/op_math/controlled.py | 1081 | # 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 | 726 | # If the operation covers the full system, just return it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pennylane/devices/qubit/simulate.py | 457 | # 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 |
| MEDIUM | pennylane/pulse/parametrized_evolution.py | 282 | As discussed above, the ODE solver will evaluate the Schrodinger equation at | CODE |
| LOW | pennylane/control_flow/_loop_abstract_axes.py | 58 | # 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 | 1000 | def test_function(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pennylane/core/transforms/__init__.py | 25 | """placeholder""" | STRING |