instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
Parquery__icontract-168
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_find_self", "icontract/_checkers.py:_decorate_with_invariants", "icontract/_checkers.py:add_invariant_checks" ], "edited_modules": [ "icontrac...
Parquery/icontract
cb64cef40abccd3b212ca14987244e71782ee146
Invariant on subclass of generic Mapping produces ValueError An `invariant` decorator on a subclass of a generic `typing.Mapping` class produces a `ValueError`. Using Python 3.8.5 and icontract 2.3.7. Example file `foo.py`: ``` python from icontract import invariant from typing import Dict, Iterator, Mapping ...
diff --git a/README.rst b/README.rst index 80615a0..927040a 100644 --- a/README.rst +++ b/README.rst @@ -164,7 +164,8 @@ We consider the following methods to be "public": * All methods not prefixed with ``_`` * All magic methods (prefix ``__`` and suffix ``__``) -Class methods can not observe the invariant since th...
Parquery__icontract-170
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "icontract/_recompute.py:Visitor" ] }, "file": "icontract/_recompute.py" }, { "changes": { "added_entities": null, "added_modules": null, ...
Parquery/icontract
38968d2d4b79f44522417f40e9d8cfd6b5762870
Violating contract with f-string produces NotImplementedError An f-string in a lambda expression in a contract produces a `NotImplementedError` from `incontract._recompute` when a call violates the contract. A call that conforms to the contract does not produce the error. Using Python 3.8.5 and icontract 2.3.7. E...
diff --git a/icontract/_recompute.py b/icontract/_recompute.py index 00faac1..0427994 100644 --- a/icontract/_recompute.py +++ b/icontract/_recompute.py @@ -88,6 +88,44 @@ class Visitor(ast.NodeVisitor): self.recomputed_values[node] = node.value return node.value + if sys.version_info >= ...
Parquery__icontract-172
[ { "changes": { "added_entities": [ "icontract/_checkers.py:_decorate_new_with_invariants" ], "added_modules": [ "icontract/_checkers.py:_decorate_new_with_invariants" ], "edited_entities": [ "icontract/_checkers.py:add_invariant_checks" ], "edite...
Parquery/icontract
e23b0df674b18842f38a1da4e1835c9217c7c84a
Invariant on subclass of NamedTuple produces TypeError An `invariant` decorator on a subclass of `typing.NamedTuple` produces a `TypeError`. Using Python 3.8.5 and icontract 2.3.7. Example file `foo.py`: ``` python from typing import NamedTuple from icontract import invariant @invariant(lambda self: self.fir...
diff --git a/icontract/_checkers.py b/icontract/_checkers.py index 83fa17b..90d4a44 100644 --- a/icontract/_checkers.py +++ b/icontract/_checkers.py @@ -441,6 +441,32 @@ def _find_self(param_names: List[str], args: Tuple[Any, ...], kwargs: Dict[str, return kwargs["self"] +def _decorate_new_with_invariants(new_...
Parquery__icontract-176
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_kwargs_from_call", "icontract/_checkers.py:decorate_with_checker" ], "edited_modules": [ "icontract/_checkers.py:_kwargs_from_call", "icontrac...
Parquery/icontract
021f478672e480372d277d45384e3e65d1639d1a
*args and **kwargs not supported Given the following code snippet: ```py from icontract import require def test_args(): @require(lambda *args: args) def args(*args, **kwargs): pass args(0, x=0) def test_kwargs(): @require(lambda **kwargs: kwargs) def args(*args, **kwargs): ...
diff --git a/README.rst b/README.rst index 9fb69cb..db5af98 100644 --- a/README.rst +++ b/README.rst @@ -639,6 +639,78 @@ Here is an example of the error given as a callable: If you left ``enabled`` argument to its default ``__debug__``, the contract will *not* be verified in ``-O`` mode.) +Variable Positio...
Parquery__icontract-187
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:add_invariant_checks" ], "edited_modules": [ "icontract/_checkers.py:add_invariant_checks" ] }, "file": "icontract/_checkers.py" } ]
Parquery/icontract
8d7639edb5fe2bb305e214203dc2fb8b3207fa9d
KeyError in contract caused by staticmethod and class invariant ```Python from icontract import invariant @invariant(lambda self: all(" " not in part for part in self.parts)) class ID: def __init__(self, identifier: str) -> None: self.parts = identifier.split(self.separator()) @staticmethod ...
diff --git a/README.rst b/README.rst index d5660c1..08b5f1f 100644 --- a/README.rst +++ b/README.rst @@ -29,8 +29,9 @@ It also gives a base for a flourishing of a wider ecosystem: `Hypothesis <https://hypothesis.readthedocs.io/en/latest/>`_ strategies based on the contracts, * together with IDE integrations suc...
Parquery__icontract-292
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "icontract/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_che...
Parquery/icontract
8edda0dd0a5c38977e4becb1502a9b9e7cd36524
Feature request: immediate invariant evaluation. Hi, Very much taken by your library's functionality: much appreciated! I would like to request an (perhaps optional?) feature for immediate evaluation of invariants (optional because, no doubt, this incurs a runtime penalty). At the moment, as per [the documenta...
diff --git a/docs/source/api.rst b/docs/source/api.rst index ed55e79..06e81de 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -45,3 +45,7 @@ DBC ViolationError -------------- .. autoclass:: ViolationError + +InvariantCheckEvent +------------------- +.. autoclass:: InvariantCheckEvent \ No newline at en...
Parquery__icontract-297
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:add_invariant_checks" ], "edited_modules": [ "icontract/_checkers.py:add_invariant_checks" ] }, "file": "icontract/_checkers.py" }, { "ch...
Parquery/icontract
577b5031e0542d4960745051b8138b1a861b1bd2
Invariant of a subclass applies to its base Invariants of subclasses affect their base classes, as well as sibling classes. Here is a example to reproduce the problem: ``` from icontract import invariant @invariant(lambda: True) class Base: pass @invariant(lambda: False) class Derived(Base): pass...
diff --git a/icontract/_checkers.py b/icontract/_checkers.py index efb445f..5e18a67 100644 --- a/icontract/_checkers.py +++ b/icontract/_checkers.py @@ -1213,7 +1213,7 @@ def add_invariant_checks(cls: ClassT) -> None: # We need to ignore __repr__ to prevent endless loops when generating error messages. ...
Parquery__icontract-94
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_walk_decorator_stack", "icontract/_checkers.py:find_checker", "icontract/_checkers.py:_Old.__getattr__", "icontract/_checkers.py:decorate_with_checker", ...
Parquery/icontract
5fec74799dfbd7813d86a90a2dba79ba78a312cf
require decorator removes type annotations for mypy ``` $ cat ic.py from icontract import require @require(lambda x: x > 0) def f1(x: int): return x def f2(x: int): return 0 f1("this is wrong") f2("this is too") $ mypy ic.py ic.py:9: error: Argument 1 to "f2" has incompatible type "str"...
diff --git a/icontract/_checkers.py b/icontract/_checkers.py index 3e7e6d6..30ab186 100644 --- a/icontract/_checkers.py +++ b/icontract/_checkers.py @@ -4,6 +4,7 @@ import inspect from typing import Callable, Any, Iterable, Optional, Tuple, List, Mapping, MutableMapping, Dict import icontract._represent +from icont...
Parquery__pyicontract-lint-25
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract_lint/__init__.py:output_verbose" ], "edited_modules": [ "icontract_lint/__init__.py:output_verbose" ] }, "file": "icontract_lint/__init__.py" }, { "ch...
Parquery/pyicontract-lint
388bc70a37d046379f0496f6d3eed7b33d5dcdc0
Running pyicontract-lint without linting errors should notify success Hi @mristin , it's me again :) Just an enhancement proposal: when I got the package to run I had no linting errors and therefore the package would not give any output, even in `--verbose` mode. I had to run it with `--verbose json` mode to get the f...
diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py index b35a405..8639113 100644 --- a/icontract_lint/__init__.py +++ b/icontract_lint/__init__.py @@ -2,6 +2,7 @@ import collections import enum import json +import os import pathlib import re import sys @@ -589,9 +590,10 @@ def output_verbose(err...
Parquery__pyicontract-lint-28
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract_lint/__init__.py:_LintVisitor._infer_decorator", "icontract_lint/__init__.py:_LintVisitor.visit_FunctionDef" ], "edited_modules": [ "icontract_lint/__init__.py:_Lin...
Parquery/pyicontract-lint
76ece692dac02dd926a5c1c30fd5933899ffeefc
Error linting file w/o icontract I'm trying out icontract and this linter. I get a fatal error in [this file](https://github.com/pymor/pymor/blob/contracts_type-hints/src/pymor/algorithms/rules.py) [pip freeze output](https://github.com/Parquery/pyicontract-lint/files/5429910/freeze.txt) ``` pyicontract-lint ./src...
diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py index 8639113..9dced7a 100644 --- a/icontract_lint/__init__.py +++ b/icontract_lint/__init__.py @@ -351,25 +351,6 @@ class _LintVisitor(_AstroidVisitor): else: raise NotImplementedError("Unhandled pytype: {}".format(pytype)) - ...
Parquery__pyicontract-lint-35
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract_lint/__init__.py:_LintVisitor._verify_snapshot_decorator" ], "edited_modules": [ "icontract_lint/__init__.py:ErrorID", "icontract_lint/__init__.py:_LintVisitor" ...
Parquery/pyicontract-lint
ceacf96c6a59173b0f9b0611403c7f6315377963
Snapshot capture function expects at most one argument The docs show how you can use snapshots to capture multiple arguments and combine them into one set. However when I try the same idea the code runs without error, but the linter throws the error: ```Snapshot capture function expects at most one argument, but got...
diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py index 0b9a53d..d4f2312 100644 --- a/icontract_lint/__init__.py +++ b/icontract_lint/__init__.py @@ -35,6 +35,7 @@ class ErrorID(enum.Enum): SNAPSHOT_INVALID_ARG = "snapshot-invalid-arg" SNAPSHOT_WO_CAPTURE = "snapshot-wo-capture" SNAPSH...
Parquery__pylddwrap-13
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "lddwrap/__init__.py:_cmd_output_parser" ], "edited_modules": [ "lddwrap/__init__.py:_cmd_output_parser" ] }, "file": "lddwrap/__init__.py" } ]
Parquery/pylddwrap
b13a44564ec9cee8f623c5a26d888dfd8fa26ca8
pylddwrap 1.1.0 fails to handle statically linked libraries I have noticed that with the latest release of 1.1.0, the `lddwrap.list_dependencies` fails when using it on a statically linked library: ``` my_static_lib.so: statically linked ``` with the error message: > RuntimeError: Unexpected mem ad...
diff --git a/lddwrap/__init__.py b/lddwrap/__init__.py index d1a2d87..520bc07 100644 --- a/lddwrap/__init__.py +++ b/lddwrap/__init__.py @@ -252,10 +252,18 @@ def _cmd_output_parser(cmd_out: str) -> List[Dependency]: """ dependencies = [] # type: List[Dependency] - for line in [ - line.strip(...
Parquery__swagger-to-141
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "swagger_to/intermediate.py:_recursively_strip_descriptions" ], "edited_modules": [ "swagger_to/intermediate.py:_recursively_strip_descriptions" ] }, "file": "swagger_to...
Parquery/swagger-to
d0427c9f56e0a30a04e0777eb874954c99f1c90a
ValueError: Expected the value in a schema to be a string, but got: <class 'swagger_to.swagger.RawDict'> if definitions properties has name with description, will cause this issue ``` DeviceDefineInfoRes: type: object discriminator: '' properties: createPerson: type: string cre...
diff --git a/swagger_to/intermediate.py b/swagger_to/intermediate.py index c4dc496..8a26b91 100644 --- a/swagger_to/intermediate.py +++ b/swagger_to/intermediate.py @@ -432,12 +432,7 @@ def _recursively_strip_descriptions(schema_dict: MutableMapping[str, Any]) -> Mu new_schema_dict = collections.OrderedDict() # t...
Parquery__temppathlib-12
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "temppathlib/__init__.py:TmpDirIfNecessary.__init__", "temppathlib/__init__.py:TmpDirIfNecessary.__enter__" ], "edited_modules": [ "temppathlib/__init__.py:TmpDirIfNecessary" ...
Parquery/temppathlib
21fd2b96fb2fb13c4e64d5bf2783327b11bafe4e
Support `prefix` option also with `TmpDirIfNecessary`? Maybe `TmpDirIfNecessary` should also support the `prefix` option, to give a temporary directory a certain prefix (if no directory is provided already?
diff --git a/pylint.rc b/pylint.rc index a70a9ba..9ecb8f0 100644 --- a/pylint.rc +++ b/pylint.rc @@ -7,5 +7,5 @@ generated-members=bottle\.request\.forms\.decode,bottle\.request\.query\.decode max-line-length=120 [MESSAGES CONTROL] -disable=too-few-public-methods,abstract-class-little-used,len-as-condition,bad-cont...
PaulSchweizer__flowpipe-127
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "flowpipe/node.py:FunctionNode.__call__", "flowpipe/node.py:FunctionNode._initialize" ], "edited_modules": [ "flowpipe/node.py:FunctionNode" ] }, "file": "flowpi...
PaulSchweizer/flowpipe
06cade8408791fde0ab422c19d5d8e73facbc234
Add sub output plugs through Node decorator This should be made possible: ```python @Node(outputs=["out.a", "out.b"]) MyNode(): pass ``` Resulting in a node like this: ``` +-----------+ | MyNode | +-----------+ | out % | out.a o | out.b o +-----------+ ```
diff --git a/flowpipe/node.py b/flowpipe/node.py index 7fc825d..a9671e9 100644 --- a/flowpipe/node.py +++ b/flowpipe/node.py @@ -436,8 +436,13 @@ class FunctionNode(INode): metadata = copy.deepcopy(self.metadata) metadata.update(kwargs.pop("metadata", {})) graph = kwargs.pop('graph', 'default...
PedalPi__PluginsManager-11
[ { "changes": { "added_entities": [ "pluginsmanager/mod_host/mod_host.py:ModHost.__del__", "pluginsmanager/mod_host/mod_host.py:ModHost._remove_pedalboard" ], "added_modules": null, "edited_entities": [ "pluginsmanager/mod_host/mod_host.py:ModHost.on_current_pedalb...
PedalPi/PluginsManager
749de55874f446519f7ebd01aacef38d1b810bb0
Connections with sys_effect doesn't work For test https://gist.github.com/SrMouraSilva/f7a3904f3984bcaec7e15c60039bc3c3 # Error 1 ## Description ```python > sys_effect.outputs[0].connect(reverb.inputs[0]) Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/paulo/PycharmProj...
diff --git a/Readme.rst b/Readme.rst index 4502fd9..b6ebb43 100644 --- a/Readme.rst +++ b/Readme.rst @@ -136,10 +136,7 @@ Connecting *mode one*: .. code-block:: python - # For connect output system effects, use - pedalboard.connections.append(Connection(sys_effect.outputs[0], reverb.inputs[0])) - # Instea...
PedestrianDynamics__PedPy-162
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pedpy/methods/velocity_calculator.py:compute_mean_velocity_per_frame", "pedpy/methods/velocity_calculator.py:compute_voronoi_velocity", "pedpy/methods/velocity_calculator.py:compute_pass...
PedestrianDynamics/PedPy
c67fc318d407fcec8bf718de500cce143682c3fb
Compute the individual velocity outside the mean functions Same procedure as for the individual Voronoi polygons, it makes more sense to compute these data beforehand and then pass it to the mean functions to avoid unnecessary computations.
diff --git a/jpsreport.ipynb b/jpsreport.ipynb index 5549b13..0f4a888 100644 --- a/jpsreport.ipynb +++ b/jpsreport.ipynb @@ -490,12 +490,16 @@ "mean_area_speeds = {}\n", "\n", "for name, trajectory in trajectories.items():\n", - " mean_area_speed, individual_speed_area = compute_mean_velocity_per_f...
PedestrianDynamics__PedPy-249
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pedpy/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pedpy/io/trajector...
PedestrianDynamics/PedPy
136146bd80f0f9dd7a638b9854541de092abdc13
Better error handling for jupedsim sqlite file import Add checks to verify if the file is in the expected format and give understandable feedback to the user
diff --git a/pedpy/__init__.py b/pedpy/__init__.py index df8ecda..b105c16 100644 --- a/pedpy/__init__.py +++ b/pedpy/__init__.py @@ -67,11 +67,13 @@ __all__ = [ "MeasurementLine", "WalkableArea", "TrajectoryData", + "LoadTrajectoryError", "TrajectoryUnit", "load_trajectory", "load_traje...
PedestrianDynamics__PedPy-278
[ { "changes": { "added_entities": [ "pedpy/data/geometry.py:_polygon_from_wkt", "pedpy/data/geometry.py:_polygon_from_shapely", "pedpy/data/geometry.py:_polygon_from_coordinates" ], "added_modules": [ "pedpy/data/geometry.py:_polygon_from_wkt", "pedpy/dat...
PedestrianDynamics/PedPy
7954f4954c8701d20ed5a966b21acfcd86eefa74
Create WalkableArea from GeometryCollection Currently `WalkableArea`s can only be created from `shapely.Polygon`-types and their wkt representation. As JuPedSim uses `shapely.GeometryCollection` as their geometry exchange format, including such types, would make the usage in simulation contexts easier. **GeometryCol...
diff --git a/pedpy/data/geometry.py b/pedpy/data/geometry.py index dcedfbc..0541438 100644 --- a/pedpy/data/geometry.py +++ b/pedpy/data/geometry.py @@ -1,7 +1,8 @@ """Module handling the geometrical environment of the analysis.""" from dataclasses import dataclass -from typing import Any, List, Optional +from numb...
PedestrianDynamics__PedPy-376
[ { "changes": { "added_entities": [ "pedpy/methods/method_utils.py:_compute_crossing_frames" ], "added_modules": [ "pedpy/methods/method_utils.py:_compute_crossing_frames" ], "edited_entities": [ "pedpy/methods/method_utils.py:compute_frame_range_in_area", ...
PedestrianDynamics/PedPy
daba718f4a771a7164da08cd09878a201513208e
compute_crossing_frames may count multiple crossings when movement ends on line Opposite of what the definition of the method (description and code comment) says, when the movement of a pedestrian ends on the line it counts as crossed. **To reproduce:** ```python import numpy as np import pandas as pd from ped...
diff --git a/pedpy/methods/method_utils.py b/pedpy/methods/method_utils.py index 59e2cca..722052a 100644 --- a/pedpy/methods/method_utils.py +++ b/pedpy/methods/method_utils.py @@ -6,7 +6,7 @@ import logging from collections import defaultdict from dataclasses import dataclass from enum import Enum, auto -from typin...
PennChopMicrobiomeProgram__PhylogeneticProfiler-4
[ { "changes": { "added_entities": [ "phyloprofilerlib/main.py:Metaphlan.revise_output" ], "added_modules": null, "edited_entities": [ "phyloprofilerlib/main.py:Metaphlan.run" ], "edited_modules": [ "phyloprofilerlib/main.py:Metaphlan" ] }, ...
PennChopMicrobiomeProgram/PhylogeneticProfiler
fc368fcef164305e45513d27d592f0118229ec0e
Sum of proportions should equal 1 MetaPhlan prints the proportions for each level of the taxonomy, which results in the sum of proportions being (number of ranks) * 100. This kind of output is difficult for us to use downstream. It would be better for us to have the full taxonomic assignment at the species level only...
diff --git a/phyloprofilerlib/main.py b/phyloprofilerlib/main.py index c7ba473..4105c14 100644 --- a/phyloprofilerlib/main.py +++ b/phyloprofilerlib/main.py @@ -52,7 +52,25 @@ class Metaphlan(object): def run(self, R1, R2, out_dir): command = self.make_command(R1, R2) - subprocess.check_call(comm...
PennChopMicrobiomeProgram__illqc-17
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "illqclib/main.py:Trimmomatic.make_command" ], "edited_modules": [ "illqclib/main.py:Trimmomatic" ] }, "file": "illqclib/main.py" } ]
PennChopMicrobiomeProgram/illqc
bc504d4c93300db446ab7b70cb0660f682d07687
Cannot configure setting for sliding window Python needs a tuple value for this setting, but JSON does not support tuple types. Suggest converting to value tuple before line 70: https://github.com/PennChopMicrobiomeProgram/illqc/blob/master/illqclib/main.py#L70
diff --git a/illqclib/main.py b/illqclib/main.py index e8503bf..396d282 100644 --- a/illqclib/main.py +++ b/illqclib/main.py @@ -67,7 +67,7 @@ class Trimmomatic(object): "ILLUMINACLIP:%s:2:30:10:8:true" % self._adapter_fp, "LEADING:%d" % self.config["leading"], "TRAILING:%d" % sel...
PennLINC__CuBIDS-382
[ { "changes": { "added_entities": [ "cubids/cubids.py:get_entity_value", "cubids/cubids.py:build_path" ], "added_modules": [ "cubids/cubids.py:get_entity_value", "cubids/cubids.py:build_path" ], "edited_entities": [ "cubids/cubids.py:CuBIDS.ch...
PennLINC/CuBIDS
61fed301bec324d36449dfa2bcef0c4dd3698a41
`cubids-apply` adds extra leading zero to run entity In my case, it tried to rename `sub-03_ses-1_task-rest_acq-multiecho_run-02_echo-1_part-mag_bold.nii.gz` to `sub-03_ses-1_task-rest_acq-multiechoVARIANTNumVolumes_run-002_bold.nii.gz`. Note the shift from one leading zero to two. This seems to be due to this secti...
diff --git a/cubids/cubids.py b/cubids/cubids.py index 0959919..158e97d 100644 --- a/cubids/cubids.py +++ b/cubids/cubids.py @@ -469,55 +469,19 @@ class CuBIDS(object): ----- This is the function I need to spend the most time on, since it has entities hardcoded. """ + new_path = build_...
PennLINC__CuBIDS-432
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "cubids/utils.py:assign_variants" ], "edited_modules": [ "cubids/utils.py:assign_variants" ] }, "file": "cubids/utils.py" } ]
PennLINC/CuBIDS
6e8726ec17f45e83e5997c5defb8d2d8ecbdc78b
Include variant cluster number/centroid or value in variant renaming recommendations ## Summary <!--What would you like changed/added and why?--> I think it would be informative to include the variant's value in the proposed acquisition value. For example, if you had two echo time variants: one with EchoTimes ranging f...
diff --git a/cubids/utils.py b/cubids/utils.py index 4eeefb2..a6be9b4 100644 --- a/cubids/utils.py +++ b/cubids/utils.py @@ -485,6 +485,10 @@ def format_params(param_group_df, config, modality): ``'derived_params'`` is a dictionary of dictionaries, where keys are modalities. The modality-wise dictionary's key...
PennLINC__CuBIDS-438
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "cubids/utils.py:assign_variants" ], "edited_modules": [ "cubids/utils.py:assign_variants" ] }, "file": "cubids/utils.py" } ]
PennLINC/CuBIDS
df31e94bdd3d76a7d096e4f91439ebbe7e668594
Clarify difference between cluster numbers and actual values in variant names Variant acquisition fields now have values in them since #432 was merged, which is great, but it made me realize that it might not be clear that some of the values are cluster numbers and others are actual values. For example, we might see `a...
diff --git a/cubids/utils.py b/cubids/utils.py index ee9bb77..c0f1ab5 100644 --- a/cubids/utils.py +++ b/cubids/utils.py @@ -951,7 +951,7 @@ def assign_variants(summary, rename_cols): cluster_val = 0 if cluster_val != dom_entity_set[f"Cluster_{col}"]: - ...
PennLINC__CuBIDS-442
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "cubids/utils.py:_entities_to_entity_set", "cubids/utils.py:assign_variants" ], "edited_modules": [ "cubids/utils.py:_entities_to_entity_set", "cubids/utils.py:assign_...
PennLINC/CuBIDS
41c80c4b368ed3e909d4c02b12d7fcf672831bd8
Place datatype at beginning, and acquisition at end, of entity strings ## Summary <!--What would you like changed/added and why?--> Request by @sattertt to improve readability of the TSVs.
diff --git a/cubids/utils.py b/cubids/utils.py index 3f1e416..128b0fa 100644 --- a/cubids/utils.py +++ b/cubids/utils.py @@ -112,8 +112,35 @@ def _entities_to_entity_set(entities): This is a set of entities to ignore in the entity set. The constant may be modified by the CuBIDS class, which will remove "sessi...
PennLINC__xcp_d-1065
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/cli/combineqc.py:main" ], "edited_modules": [ "xcp_d/cli/combineqc.py:main" ] }, "file": "xcp_d/cli/combineqc.py" }, { "changes": { "added_entities"...
PennLINC/xcp_d
3563e9e8605553bd345636033237e601e77f6de9
Rename ALFF and ReHo outputs based on BEP 012 ## Summary <!--What would you like changed/added and why?--> In BEP 012 (see https://github.com/bids-standard/bids-specification/pull/519), they use `_stat-<reho|alff>_boldmap` instead of `_<alff|reho>`.
diff --git a/docs/outputs.rst b/docs/outputs.rst index c7984bc..986bcdb 100644 --- a/docs/outputs.rst +++ b/docs/outputs.rst @@ -9,23 +9,25 @@ The *XCP-D* outputs are written out in BIDS format and consist of three main pa .. admonition:: A note on BIDS compliance - *XCP-D* attempts to follow the BIDS specifica...
PennLINC__xcp_d-1073
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/utils/atlas.py:copy_atlas" ], "edited_modules": [ "xcp_d/utils/atlas.py:copy_atlas" ] }, "file": "xcp_d/utils/atlas.py" }, { "changes": { "added_ent...
PennLINC/xcp_d
6ed41b0505f575237faba7bdc14bcf41b1f3a8ea
Error in finding parcellation atlases when running pipeline in parallel ## Summary <!--What is the nature of the bug?--> Now the output atlases folder is moved out of the subject directory, which is very reasonable. But for some unknown reason, when running pipeline for several subjects in parallel, some sub-tasks ...
diff --git a/xcp_d/utils/atlas.py b/xcp_d/utils/atlas.py index 3e39d5a..561973b 100644 --- a/xcp_d/utils/atlas.py +++ b/xcp_d/utils/atlas.py @@ -160,6 +160,24 @@ def get_atlas_cifti(atlas): def copy_atlas(name_source, in_file, output_dir, atlas): """Copy atlas file to output directory. + Parameters + ----...
PennLINC__xcp_d-1075
[ { "changes": { "added_entities": [ "xcp_d/interfaces/bids.py:CopyAtlas._run_interface" ], "added_modules": [ "xcp_d/interfaces/bids.py:_CopyAtlasInputSpec", "xcp_d/interfaces/bids.py:_CopyAtlasOutputSpec", "xcp_d/interfaces/bids.py:CopyAtlas" ], "edi...
PennLINC/xcp_d
f9a597d3093609c37532c6e62c569dde39e0a974
Processing native-resolution runs with different voxel sizes will fail ## Summary <!--What is the nature of the bug?--> When processing multiple runs in the same standard space (MNI152NLin2009cAsym) with the native BOLD resolution, if the different runs have different native resolutions (in this case, 1.625 x 1.625 x...
diff --git a/xcp_d/interfaces/bids.py b/xcp_d/interfaces/bids.py index 06e1c18..bfdc4bc 100644 --- a/xcp_d/interfaces/bids.py +++ b/xcp_d/interfaces/bids.py @@ -1,8 +1,12 @@ """Adapted interfaces from Niworkflows.""" +import os +import shutil from json import loads from pathlib import Path +import nibabel as nb ...
PennLINC__xcp_d-1088
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/utils/bids.py:write_dataset_description", "xcp_d/utils/bids.py:_make_xcpd_uri" ], "edited_modules": [ "xcp_d/utils/bids.py:write_dataset_description", "xcp_d/ut...
PennLINC/xcp_d
9fe66035990564ef9b3fa5d95aa979b3c2273a16
Replace `bids:xcp_d:` BIDS URIs with `bids::` ## Summary <!--What would you like changed/added and why?--> `bids::` is a protected case for the dataset in which the URI is defined (i.e., the XCP-D derivatives dataset).
diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index 0938f70..0e2b6c0 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -733,11 +733,6 @@ def write_dataset_description(fmri_dir, xcpd_dir, custom_confounds_folder=None): dset_desc["DatasetLinks"]["preprocessed"] = str(fmri_dir) - if "xcp_d...
PennLINC__xcp_d-1114
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/interfaces/censoring.py:GenerateConfounds._run_interface" ], "edited_modules": [ "xcp_d/interfaces/censoring.py:GenerateConfounds" ] }, "file": "xcp_d/interfaces/...
PennLINC/xcp_d
d3487107f6efc58056d656c5ba3d89336e5fc59b
Modified motion filter parameters are not reflected in the boilerplate or metadata ## Summary <!--What is the nature of the bug?--> The function `motion_regression_filter` will automatically adjust the motion filter parameters `band_stop_min` and `band_stop_max` if either is above the Nyquist frequency for the data (...
diff --git a/xcp_d/interfaces/censoring.py b/xcp_d/interfaces/censoring.py index 4532f78..05c4fb0 100644 --- a/xcp_d/interfaces/censoring.py +++ b/xcp_d/interfaces/censoring.py @@ -14,7 +14,12 @@ from nipype.interfaces.base import ( traits, ) -from xcp_d.utils.confounds import _infer_dummy_scans, load_confound_...
PennLINC__xcp_d-1172
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/cli/parser.py:_build_parser", "xcp_d/cli/parser.py:_validate_parameters" ], "edited_modules": [ "xcp_d/cli/parser.py:_build_parser", "xcp_d/cli/parser.py:_valid...
PennLINC/xcp_d
2f6f9b8939262490362173dc215db6d350d01ef5
Filter number is not correct with the commond ## Summary The filter number in the commond, CITATION, and json file is not equal. ## Additional details <!--Please fill in the following details--> - xcp_d version: v0.7.1rc5 - Docker version: None - Singularity version: 1.3.0-1.el7 ### What were you trying to d...
diff --git a/.versions.json b/.versions.json index 5b7faa1..c8f6ec5 100644 --- a/.versions.json +++ b/.versions.json @@ -26,6 +26,8 @@ "0.6.0": "Temporal filtering may have reintroduced variance from nuisance regression.", "0.6.1": "Temporal filtering may have reintroduced variance from nuisance regression.", ...
PennLINC__xcp_d-1232
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/cli/parser.py:_build_parser", "xcp_d/cli/parser.py:_validate_parameters" ], "edited_modules": [ "xcp_d/cli/parser.py:_build_parser", "xcp_d/cli/parser.py:_valid...
PennLINC/xcp_d
8ca5fbca6ae3fa950efff441f0f35169401bc106
Add `--mode none` option ## Summary <!--What would you like changed/added and why?--> Request from Damien Fair: support a "none" mode where lots of things are required and not set by the mode.
diff --git a/docs/workflows.rst b/docs/workflows.rst index 9c7425a..e38e862 100644 --- a/docs/workflows.rst +++ b/docs/workflows.rst @@ -35,6 +35,9 @@ based on recommended processing pipelines for different studies. XCP-D can be run in one of three modes: ``linc``, ``abcd``, or ``hbcd``. Each mode is designed by a di...
PennLINC__xcp_d-1244
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/interfaces/nilearn.py:DenoiseCifti._run_interface", "xcp_d/interfaces/nilearn.py:DenoiseNifti._run_interface" ], "edited_modules": [ "xcp_d/interfaces/nilearn.py:Denois...
PennLINC/xcp_d
84ee283db5d41240020368591ae95eeaa610fbca
Support voxel-wise regressors ## Summary I'm looking forward to getting [`fMRIPost-rapidtide`](https://github.com/nipreps/fmripost-rapidtide) working, and that will produce voxel-wise regressors. ## Additional details We'll need to modify the denoising function to loop over voxels. Nilearn has no plans to supp...
diff --git a/pyproject.toml b/pyproject.toml index f2312c3..ea9e6e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "nibabel >= 3.2.1", "nilearn == 0.10.4", # 0.10.2 raises error with compcor from fMRIPrep 23 "nipype ~= 1.8.5", - "nireports ~= 23.2.1", + "nirepo...
PennLINC__xcp_d-1300
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/cli/parser.py:_build_parser" ], "edited_modules": [ "xcp_d/cli/parser.py:_build_parser" ] }, "file": "xcp_d/cli/parser.py" }, { "changes": { "added_...
PennLINC/xcp_d
e842748676a94f181d8281c4e281d497aa3c43d0
Possible bug in DCANBoldProc that may or may not be relevant to XCP-D @cindyhfls noticed a possible bug in our code base for DCANBoldProc. Our team is going to check it out soon. I wanted to share in case the issue is present in XCP-D as well! See: https://github.com/DCAN-Labs/dcan_bold_processing/issues/28
diff --git a/xcp_d/cli/parser.py b/xcp_d/cli/parser.py index b229afe..1c97449 100644 --- a/xcp_d/cli/parser.py +++ b/xcp_d/cli/parser.py @@ -373,7 +373,15 @@ This parameter is used in conjunction with ``motion-filter-order`` and ``band-st dest="motion_filter_order", default=4, type=int, - ...
PennLINC__xcp_d-1433
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xcp_d/utils/bids.py:collect_data" ], "edited_modules": [ "xcp_d/utils/bids.py:collect_data" ] }, "file": "xcp_d/utils/bids.py" } ]
PennLINC/xcp_d
d9ca3ade1438326d898a1b7cbffed00ee12e9483
Native-space T2w is collected even when no T1w-space T2w is available ## Summary <!--What is the nature of the bug?--> Tim Hendrickson noticed that T2w images were being collected and used in the executive summary even when the T1w was the primary anatomical modality (i.e., transforms to standard spaces used the T1w, n...
diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index e6cc6ff..eeeda7a 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -271,45 +271,51 @@ def collect_data( raise FileNotFoundError('No T1w or T2w files found.') elif t1w_files and t2w_files: LOGGER.warning('Both T1w and T2w fou...
PennLINC__xcp_d-782
[ { "changes": { "added_entities": [ "xcp_d/cli/parser_utils.py:_restricted_float" ], "added_modules": [ "xcp_d/cli/parser_utils.py:_restricted_float" ], "edited_entities": null, "edited_modules": null }, "file": "xcp_d/cli/parser_utils.py" }, { ...
PennLINC/xcp_d
39f949ee09164e09527e680427121607f6d43d5d
Make coverage threshold configurable ## Summary <!--What would you like changed/added and why?--> In #757, we add a 50% coverage threshold and start to write out coverage files for each of the atlases. We want to allow users to set the coverage threshold themselves, so we need to make it a parameter that users can de...
diff --git a/xcp_d/cli/parser_utils.py b/xcp_d/cli/parser_utils.py index 3591aad..04b876e 100644 --- a/xcp_d/cli/parser_utils.py +++ b/xcp_d/cli/parser_utils.py @@ -76,6 +76,19 @@ def _float_or_auto(string, is_parser=True): return floatarg +def _restricted_float(x): + """From https://stackoverflow.com/a/121...
PennyLaneAI__pennylane-1168
[ { "changes": { "added_entities": [ "pennylane/_device.py:Device.shot_vector" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/_device.py:Device" ] }, "file": "pennylane/_device.py" } ]
PennyLaneAI/pennylane
0021c3feecf16745c70418ea5444197731c7943f
Please expose device._shot_vector via public property This is a features request: Please expose the shot vector via some public and documented property of the device. Thank you! This is inspired by me needing to predict the output shape of certain QNodes and in case of a non trivial shot vector and all observables b...
diff --git a/pennylane/_device.py b/pennylane/_device.py index b1697ef14..d07080323 100644 --- a/pennylane/_device.py +++ b/pennylane/_device.py @@ -264,6 +264,33 @@ class Device(abc.ABC): "Shots must be a single non-negative integer or a sequence of non-negative integers." ) + @prope...
PennyLaneAI__pennylane-1319
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/devices/default_qubit.py:DefaultQubit" ] }, "file": "pennylane/devices/default_qubit.py" }, { "changes": { "added_entities": null, ...
PennyLaneAI/pennylane
b8ea0de26dbecdb67d8e08959d0cbd2c57f3ebb7
[unitaryhack] Add the CPhase operation *This issue has been tagged for contributions during [unitaryHACK](https://unitaryfund.github.io/unitaryhack/participating-projects.html)* **Context** We would like to define a new diagonal operation called `CPhase`, see [further details here](https://qiskit.org/documentation/...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 3aafaae7c..d457c9037 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,6 +1,8 @@ # Release 0.16.0-dev (development release) <h3>New features since last release</h3> +* Added CPhase operation as an alias for ControlledPhaseShift operatio...
PennyLaneAI__pennylane-1320
[ { "changes": { "added_entities": [ "pennylane/ops/qubit.py:Toffoli.decomposition" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/ops/qubit.py:Toffoli" ] }, "file": "pennylane/ops/qubit.py" } ]
PennyLaneAI/pennylane
6a2cf0a72303718b78abe4426822655b5db79b93
[unitaryhack] Define decomposition for `qml.Toffoli` *This issue has been tagged for contributions during [unitaryHACK](https://unitaryfund.github.io/unitaryhack/participating-projects.html)* Each PennyLane operation defines a decomposition. The decomposition of an operation is an ordered list of other operations. A...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index b15e59151..3aafaae7c 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,9 @@ <h3>New features since last release</h3> +* The `qml.Toffoli` operation now has a decomposition over elementary gates. + [(#1320)](https://github.com/Pe...
PennyLaneAI__pennylane-1325
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/utils.py:inv" ], "edited_modules": [ "pennylane/utils.py:inv" ] }, "file": "pennylane/utils.py" } ]
PennyLaneAI/pennylane
9777f09ca265074531dde26e38c1322c72381c39
[unitaryhack] Deprecate `qml.inv` *This issue has been tagged for contributions during [unitaryHACK](https://unitaryfund.github.io/unitaryhack/participating-projects.html)* Currently, PennyLane has two functions for inverting quantum operations: * [`qml.inv()`](https://github.com/PennyLaneAI/pennylane/blob/4ece39...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 912f61439..b15e59151 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -159,6 +159,9 @@ random_mat2 = rng.standard_normal(3, requires_grad=False) <h3>Improvements</h3> +* The `qml.inv()` function is now deprecated with a warning to use th...
PennyLaneAI__pennylane-1329
[ { "changes": { "added_entities": [ "pennylane/ops/qubit.py:SWAP.decomposition" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/ops/qubit.py:SWAP" ] }, "file": "pennylane/ops/qubit.py" } ]
PennyLaneAI/pennylane
2107490ba0ea196b62656d89bff7bc5b8a4205a0
[unitaryhack] Define decomposition for `qml.SWAP` *This issue has been tagged for contributions during [unitaryHACK](https://unitaryfund.github.io/unitaryhack/participating-projects.html)* Each PennyLane operation defines a decomposition. The decomposition of an operation is an ordered list of other operations. Appl...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 8e0e26687..912f61439 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,8 @@ <h3>New features since last release</h3> +* The `qml.SWAP` operation now has a decomposition over elementary gates. [(#1329)](https://github.com/PennyLan...
PennyLaneAI__pennylane-1353
[ { "changes": { "added_entities": [ "pennylane/circuit_graph.py:is_returned_observable", "pennylane/circuit_graph.py:CircuitGraph.max_simultaneous_measurements" ], "added_modules": [ "pennylane/circuit_graph.py:is_returned_observable" ], "edited_entities": [ ...
PennyLaneAI/pennylane
305279a39a1d70a49ff89b4d09644e62d65e735c
Drawing fails for (a) qubit-wise commuting observables, and (b) QNodes with no operations Consider the following minimal example in which a QNode returns multiple qubit wise commuting obeservables: ```python import networkx import pennylane as qml from pennylane import expval, PauliX, PauliY, PauliZ dev = qml....
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index c0a68ec87..a2d4b3f1f 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -322,6 +322,9 @@ random_mat2 = rng.standard_normal(3, requires_grad=False) <h3>Bug fixes</h3> +* Fixes drawing QNodes that contain multiple measurements on a single wi...
PennyLaneAI__pennylane-1357
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/channel.py:AmplitudeDamping._kraus_matrices", "pennylane/ops/channel.py:GeneralizedAmplitudeDamping._kraus_matrices", "pennylane/ops/channel.py:PhaseDamping._kraus_matrices...
PennyLaneAI/pennylane
be3c88d320ee48a0f3fb761c981356137de20027
Noise channels do not validate parameter values, leading to errors #### Issue description Description of the issue - include code snippets and screenshots here if relevant. You may use the following template below * *Expected behavior:* Raise an error showing that the probability (or sum of probabilities) are no...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index bf107144e..4a3c53850 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,9 @@ <h3>New features since last release</h3> +* Added validation for noise channel parameters. Invalid noise parameters now + raise a `ValueError`. [(#1357)]...
PennyLaneAI__pennylane-1405
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/grouping/group_observables.py:group_observables" ], "edited_modules": [ "pennylane/grouping/group_observables.py:group_observables" ] }, "file": "pennylane/gr...
PennyLaneAI/pennylane
abeeae3e8e085fa2802ebb63acf0a042cccbd67f
Hamiltonians created via addition produce incorrect results with `ExpvalCost(optimize=True)` Good afternoon, I was having problem with vqe when I set the flag: optmize = True . I noticed that there were errors when entering Hamiltonians of the form Z1@Z2 + Z2@Z1. We know it is the same as 2.Z1.Z2 but the optimizer se...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index a04d061aa..249848161 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -503,6 +503,10 @@ random_mat2 = rng.standard_normal(3, requires_grad=False) <h3>Bug fixes</h3> +* Fixes a bug where multiple identical Hamiltonian terms will produce a...
PennyLaneAI__pennylane-1411
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/operation.py:Operator.__copy__" ], "edited_modules": [ "pennylane/operation.py:Operator" ] }, "file": "pennylane/operation.py" } ]
PennyLaneAI/pennylane
dedf69442b2492df52f723c1c55020f16545ef2d
Copying `qml.ControlledQubitUnitary` The `Operator` base class defines a `__copy__` method for operators. For almost all `Operator`'s, this method works fine to duplicate a given instance. But `qml.ControlledQubitUnitary` has a more complicated set of data, and copying it does not work fully. ```python import p...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 1ee7f40da..8c8c3da30 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -577,6 +577,9 @@ random_mat2 = rng.standard_normal(3, requires_grad=False) <h3>Bug fixes</h3> +* Fixes a bug where a copy of `qml.ControlledQubitUnitary` was non-funct...
PennyLaneAI__pennylane-2525
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/matrix_ops.py:DiagonalQubitUnitary._controlled" ], "edited_modules": [ "pennylane/ops/qubit/matrix_ops.py:DiagonalQubitUnitary" ] }, "file": "pennyl...
PennyLaneAI/pennylane
b0ab9be2a9ff8e64c4a264936f4945f490bf375d
[BUG] The `_controlled` method of `DiagonalQubitUnitary` returns the wrong operation ### Expected behavior `DiagonalQubitUnitary(D, wires=wires)._controlled(control=control)` queues the controlled version of the `DiagonalQubitUnitary`, controlled by the wires `control`, which should again be a `DiagonalQubitUnitary` w...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 3b07fae6c..62e070a86 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -47,6 +47,12 @@ <h3>Deprecations</h3> +<h3>Bug fixes</h3> + +* Fixes a bug in `DiagonalQubitUnitary._controlled` where an invalid o...
PennyLaneAI__pennylane-2543
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/_qubit_device.py:QubitDevice.adjoint_jacobian" ], "edited_modules": [ "pennylane/_qubit_device.py:QubitDevice" ] }, "file": "pennylane/_qubit_device.py" }, ...
PennyLaneAI/pennylane
55381d38adab411d5a44027260a9626abf6e464d
[BUG] Adjoint and backpropagation differentiation gives different results for custom qml.Hermitian observables ### Expected behavior A QML model with a custom `qml.Hermitian` observable should give the identical results when trained with either adjoint differentiation or backprop differentiation methods. ### Actual b...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 588621e9d..e233745f1 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -12,6 +12,9 @@ <h3>Improvements</h3> +* Introduced an `operations_only` argument to the `tape.get_parameters` method. + [(#2543)](...
PennyLaneAI__pennylane-2601
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/templates/embeddings/basis.py:BasisEmbedding.__init__" ], "edited_modules": [ "pennylane/templates/embeddings/basis.py:BasisEmbedding" ] }, "file": "pennylane...
PennyLaneAI/pennylane
5c25a2504ef5ffa59c02397d0ef36bb704313a9c
int to qml.BasisEmbedding ### Feature details Currently, to use `BasisEmbedding` we have to pass a list with the bits [0,1,0,0] for example to put a PauliX gate in the second qubit. It would be nice to be able to pass an integer number like: ```python qml.BasisEmbedding(4, wires = range(4)) ``` This result wou...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 4630e2225..1a65e5b7e 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -104,6 +104,9 @@ * Sparse Hamiltonians representation has changed from COOrdinate (COO) to Compressed Sparse Row (CSR) format. The CSR ...
PennyLaneAI__pennylane-2603
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/operation.py:Observable.__add__" ], "edited_modules": [ "pennylane/operation.py:Observable" ] }, "file": "pennylane/operation.py" }, { "changes": { ...
PennyLaneAI/pennylane
2b07d22cfcc6406ba28e5c647062340b240a4ee5
Support adding observable to scalar `0`? ### Feature details It would be nice to be able to do the following: ``` H = sum([qml.PauliX(i) for i in range(10)]) ``` The issue here is that `sum` naturally starts at integer 0 but there's no way to add observables to an integer 0. Philosophically it seems valid to u...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e32411a68..c12f9fd9d 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -4,6 +4,14 @@ <h3>New features since last release</h3> +* Support adding `Observable` objects to the integer `0`. + [(#2603)](http...
PennyLaneAI__pennylane-2649
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/devices/default_qubit.py:DefaultQubit" ] }, "file": "pennylane/devices/default_qubit.py" }, { "changes": { "added_entities": null, ...
PennyLaneAI/pennylane
c6e7ca6714cf8f11b373fc8f8e13b0681b222a07
Adding `IsingXY` operation ### **Context** We would like to define a new operation called IsingXY, as [defined in the PennyLane-Braket plugin](https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/code/api/braket.pennylane_plugin.XY.html). ### **Steps to take** **Adding the operation** - A...
diff --git a/doc/introduction/operations.rst b/doc/introduction/operations.rst index 3facaa3f4..e1ac06ae0 100644 --- a/doc/introduction/operations.rst +++ b/doc/introduction/operations.rst @@ -155,6 +155,7 @@ Parametrized gates ~pennylane.U2 ~pennylane.U3 ~pennylane.IsingXX + ~pennylane.IsingXY ~...
PennyLaneAI__pennylane-2654
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pennylane/ops/qubit/parametric_ops.py" }, { "changes": { "added_entities": [ "pennylane/utils.py:__getattr__" ], "added_modu...
PennyLaneAI/pennylane
5d83fdf36fa83b74479cb54db51c03c0df16d8fc
Remove `qml.utils.expand` ### Feature details It seems that the utility function `qml.utils.expand` is no longer used anywhere as of #2609. It therefore could be removed. A differentiable, more up-to-date version is available in `qml.operation.expand_matrix`. ### Implementation _No response_ ### How important woul...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 2942673a7..068935a9a 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -665,6 +665,9 @@ * The `qml.queuing.Queue` class is now removed. [(#2599)](https://github.com/PennyLaneAI/pennylane/pull/2599) +* ...
PennyLaneAI__pennylane-2668
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/drawer/tape_mpl.py:tape_mpl" ], "edited_modules": [ "pennylane/drawer/tape_mpl.py:tape_mpl" ] }, "file": "pennylane/drawer/tape_mpl.py" }, { "changes"...
PennyLaneAI/pennylane
189de280e93a6c0921948d2941647cea3e0f2f08
Have control state of qubits visible in the circuit drawing ### Feature details When using a controlled gate with custom control values, the drawing of the circuit does not represent this. The control values correctly show up in the mpl figure. Example: ``` dev = qml.device('default.qubit',wires=4, shots=100) @qml...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 30ebfd728..8600b0912 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -309,6 +309,9 @@ * The performance of building sparse Hamiltonians has been improved by accumulating the sparse representation of coeff...
PennyLaneAI__pennylane-2947
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/functions/equal.py:equal" ], "edited_modules": [ "pennylane/ops/functions/equal.py:equal" ] }, "file": "pennylane/ops/functions/equal.py" } ]
PennyLaneAI/pennylane
ee190b3a7644a47574ee64e4d68487b8c8521259
[BUG] `qml.equal` ignore in-place inversion Currently, we have: ``` >>> qml.equal(qml.RX(1.0, wires=0), qml.RX(1.0, wires=0).inv()) True ``` If two operations are inverses of each other, they should not be equal.
diff --git a/doc/releases/changelog-0.25.0.md b/doc/releases/changelog-0.25.0.md index 1696b9060..3a49b7bd4 100644 --- a/doc/releases/changelog-0.25.0.md +++ b/doc/releases/changelog-0.25.0.md @@ -710,6 +710,9 @@ of operators. <h3>Bug fixes 🐞</h3> +* Fixes `qml.equal` so that operators with different inverse prop...
PennyLaneAI__pennylane-2964
[ { "changes": { "added_entities": [ "pennylane/ops/identity.py:Identity.compute_sparse_matrix" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/ops/identity.py:Identity" ] }, "file": "pennylane/ops/identity.py" }, { ...
PennyLaneAI/pennylane
754f2c978cba83a83ba7117df1b930d1512ea333
Add sparse matrix representations for Pauli Operators While the Pauli operators (`PauliX`, `PauliY`, `PauliZ`, `Identity`) themselves are fairly dense, they are often multiplied together to form large tensors. To assist with the formation of sparse matrices for large combination operations, we should add sparse matrice...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index cbe4b45ba..f16ecddac 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -112,6 +112,9 @@ >>> qml.simplify(adj_op) RX(-1, wires=[0]) ``` + +* Added `sparse_matrix()` support for single qubit observa...
PennyLaneAI__pennylane-3024
[ { "changes": { "added_entities": [ "pennylane/transforms/optimization/optimization_utils.py:_singular_quat_to_zyz", "pennylane/transforms/optimization/optimization_utils.py:_regular_quat_to_zyz" ], "added_modules": [ "pennylane/transforms/optimization/optimization_utils...
PennyLaneAI/pennylane
3306eddbf2822c4de958d75519d2e4a235c54dc5
[BUG] `single_qubit_fusion` returns wrong angles for specific case ### Expected behavior The tape transform `single_qubit_fusion` always performs valid transforms, not changing the action of the tape. ### Actual behavior For the following specific case, the transform reports wrong angles. Having tracked this d...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index b9b27cf98..79dd35847 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -304,6 +304,10 @@ <h3>Bug fixes</h3> +* Fixes a bug where the tape transform `single_qubit_fusion` computed wrong rotation angles +...
PennyLaneAI__pennylane-3033
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pennylane/grouping/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "penny...
PennyLaneAI/pennylane
29acf0d15698802b19249d23178e5fcdf123f51b
[BUG] `qml.is_commuting` breaks with `Tensor` operators. If we try to check commutation of `Tensor` objects with `qml.is_commuting`, we get: ``` >>> qml.is_commuting(qml.PauliX(0) @ qml.PauliX(1), qml.PauliX(0) @ qml.PauliY(2)) ----> 1 qml.is_commuting(qml.PauliX(0) @ qml.PauliX(1), qml.PauliX(0) @ qml.PauliY(2)...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index c03562076..00b0bdecc 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -418,6 +418,9 @@ `~/math/matrix_manipulation.py` [(#3008)](https://github.com/PennyLaneAI/pennylane/pull/3008) +* `qml.grouping....
PennyLaneAI__pennylane-3057
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/op_math/exp.py:Exp.matrix" ], "edited_modules": [ "pennylane/ops/op_math/exp.py:Exp" ] }, "file": "pennylane/ops/op_math/exp.py" } ]
PennyLaneAI/pennylane
f09e09a7bdb1b37ff5f1f9197ea6e8bbe135ead9
[BUG] Matrix method of `qml.exp` doesn't utilize `wire_order` ### Expected behavior Matrix method of `qml.exp` should utilize `wire_order` in calculating both `diagonalizing_mat` and `eigenval_mat`. ### Actual behavior Since `qml.eigvals` doesn't support `wire_order` currently, the matrix method of `qml.exp` skips...
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bcb981d48..2cfedfce7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,4 +18,3 @@ repos: hooks: - id: black exclude: ^doc/ - language_version: python3.8 diff --git a/doc/releases/changelog-0.26.0.md b/doc/...
PennyLaneAI__pennylane-3104
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/transforms/transpile.py:transpile" ], "edited_modules": [ "pennylane/transforms/transpile.py:transpile" ] }, "file": "pennylane/transforms/transpile.py" } ]
PennyLaneAI/pennylane
ea559f96d226a4cae248ce17d9afb33bb8b5a35f
[BUG] qml.transforms.transpile does not work with MultiRZ ### Expected behavior qml.transforms.transpile does not add SWAP gates for MultiRZ operations between 2 qubits and just ignores it. This might be due to MultiRZ being able to act on more than 2 qubits at a time. However, it's currently the only way to add RZZ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 7425dbcea..89991a3b0 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -99,6 +99,9 @@ keyword argument when using `GellMann`, which determines which of the 8 Gell-Man <h3>Bug fixes</h3> +* Fixed the `qm...
PennyLaneAI__pennylane-3181
[ { "changes": { "added_entities": [ "pennylane/ops/qubit/observables.py:Hermitian._validate_input" ], "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/observables.py:Hermitian.__init__", "pennylane/ops/qubit/observables.py:Hermitian.compute_matrix" ...
PennyLaneAI/pennylane
9c04eef9bd7f40072c6d6131a39f10a29331505f
[BUG] Error when multiplying certain Hamiltonian observables ### Expected behavior I've been playing around with the different observable types in Pennylane and noticed we do support multiplying Hamiltonians together, both from tensor products of Paulis and from Hermitian observables: ```py import pennylane as qml...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 21471d126..158ac49c3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -86,6 +86,9 @@ keyword argument when using `GellMann`, which determines which of the 8 Gell-Man <h3>Improvements</h3> +* The matrix...
PennyLaneAI__pennylane-3182
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/queuing.py:QueuingManager.stop_recording" ], "edited_modules": [ "pennylane/queuing.py:QueuingManager" ] }, "file": "pennylane/queuing.py" } ]
PennyLaneAI/pennylane
d82ffc493e87271184a2b31992a39c8aa36d9b6e
[BUG] Inline transforms vs. Decorator transforms ### Expected behavior This script: ``` def circuit(circuit_param): qml.RY(circuit_param, wires=0) qml.Hadamard(wires=0) qml.T(wires=0) def noise(noise_param, wires): qml.CRX(noise_param, wires=[0,1]) qml.CNOT(wires=[1,0]) dev = qm...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e2beb942c..fcc47fcc3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -206,6 +206,9 @@ keyword argument when using `GellMann`, which determines which of the 8 Gell-Man * Fixed a bug where `qml.math.fidelit...
PennyLaneAI__pennylane-3206
[ { "changes": { "added_entities": [ "pennylane/ops/qubit/matrix_ops.py:ControlledQubitUnitary.control_values" ], "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/matrix_ops.py:ControlledQubitUnitary.pow", "pennylane/ops/qubit/matrix_ops.py:Controlle...
PennyLaneAI/pennylane
43cb8bf7d4e8753b6e717224504bd4222e3b7ef9
[BUG] Incorrect control values in `ControlledQubitUnitary.pow()` ### Expected behavior For some integer `x` and 2x2 unitary matrix `mat`, using `ControlledQubitUnitary.pow()` has the following expected behaviour: ```pycon >>> op = qml.ControlledQubitUnitary(mat, control_wires=[0, 1], wires=2, control_values="00") >...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 2949050b8..5d9832fe5 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -140,6 +140,9 @@ keyword argument when using `GellMann`, which determines which of the 8 Gell-Man * New `null.qubit` device. The `nul...
PennyLaneAI__pennylane-3266
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/devices/default_qubit.py:DefaultQubit.expval" ], "edited_modules": [ "pennylane/devices/default_qubit.py:DefaultQubit" ] }, "file": "pennylane/devices/default...
PennyLaneAI/pennylane
83b1da0dcbda3012af26f1885d025118dbaaf2a5
[BUG] Wires are not checked when computing the `expval` of a `Hamiltonian` with `shots=None` ### Expected behavior The attached code should raise the error: ``` pennylane.wires.WireError: Did not find some of the wires (0, 1) on device with wires (0,). ``` ### Actual behavior It runs and returns an incorrec...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index ed8709038..a19551983 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -667,6 +667,10 @@ Users can specify the control wires as well as the values to control the operati * Fixed a bug where `qml.BasisEmbedd...
PennyLaneAI__pennylane-3278
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/observables.py:SparseHamiltonian.__init__" ], "edited_modules": [ "pennylane/ops/qubit/observables.py:SparseHamiltonian" ] }, "file": "pennylane/ops...
PennyLaneAI/pennylane
2420bf35aeca8e3c8ef343d593e9b117671e09c8
[BUG] Issue with expval of SparseH not building correct sized matrix ### Expected behavior The following example should run to completion: ```python import pennylane as qml dev = qml.device("default.qubit", wires=4) @qml.qnode(dev, diff_method="parameter-shift") def circuit(p): qml.PauliX(0) return qm...
diff --git a/doc/releases/changelog-0.27.0.md b/doc/releases/changelog-0.27.0.md index e7f2db581..853c0da7a 100644 --- a/doc/releases/changelog-0.27.0.md +++ b/doc/releases/changelog-0.27.0.md @@ -592,6 +592,9 @@ <h3>Bug fixes</h3> +* `qml.SparseHamiltonian` now validates the size of the input matrix. + [(#3278)]...
PennyLaneAI__pennylane-3381
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/transforms/insert_ops.py:insert" ], "edited_modules": [ "pennylane/transforms/insert_ops.py:insert" ] }, "file": "pennylane/transforms/insert_ops.py" } ]
PennyLaneAI/pennylane
25071c8c7d577b9016af21b28ac1ae8363b5bb3a
[BUG] Inline transforms vs. Decorator transforms ### Expected behavior This script: ``` def circuit(circuit_param): qml.RY(circuit_param, wires=0) qml.Hadamard(wires=0) qml.T(wires=0) def noise(noise_param, wires): qml.CRX(noise_param, wires=[0,1]) qml.CNOT(wires=[1,0]) dev = qm...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index d571ddc3f..d72f80ad2 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -101,7 +101,11 @@ [(#3302)](https://github.com/PennyLaneAI/pennylane/pull/3302) * A representation has been added to the `Molecule...
PennyLaneAI__pennylane-3477
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/matrix_ops.py:QubitUnitary.compute_decomposition" ], "edited_modules": [ "pennylane/ops/qubit/matrix_ops.py:QubitUnitary" ] }, "file": "pennylane/op...
PennyLaneAI/pennylane
d06c9c197dd6745e0056a94c8cdd419b4c0b6bfa
Implement decomposition of `QubitUnitary` with parameter broadcasting ### Feature details When using a broadcasted unitary matrix in `QubitUnitary` (possible as of #2609), the `decomposition` is not defined yet. This can be implemented but may not be entirely straightforward. ### Implementation To implement this fe...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 0df4dd3a6..5fe8e4fbd 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -303,6 +303,11 @@ the optional `use_grouping` attribute. [(#3456)](https://github.com/PennyLaneAI/pennylane/pull/3456) +* Update...
PennyLaneAI__pennylane-3483
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/op_math/prod.py:prod" ], "edited_modules": [ "pennylane/ops/op_math/prod.py:prod" ] }, "file": "pennylane/ops/op_math/prod.py" }, { "changes": { ...
PennyLaneAI/pennylane
6b8e970d4cc6eaf70dc1b59b47086689f3b2c474
Add `lazy=True` keyword argument to `qml.s_prod`, `qml.prod`, and `qml.op_sum` Currently, `qml.pow` and `qml.adjoint` both have a keyword argument `lazy=True` that indicates whether or not to perform some basic simplification steps: ``` >>> qml.adjoint(qml.PauliX(0), lazy=True) Adjoint(PauliX(wires=[0])) >>> qml....
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index aed8a4a2c..0570aa7a9 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -409,6 +409,9 @@ the optional `use_grouping` attribute. [(#3456)](https://github.com/PennyLaneAI/pennylane/pull/3456) +* Add the...
PennyLaneAI__pennylane-3624
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/math/is_independent.py:_get_random_args" ], "edited_modules": [ "pennylane/math/is_independent.py:_get_random_args" ] }, "file": "pennylane/math/is_independen...
PennyLaneAI/pennylane
efe3c077efdd366121fd8eee322250cf498a5653
[BUG] qml.chem.molecular_hamiltonian sets random number generator seed ### Expected behavior When using the argument `shots=100` to a device one expects variation in the output. This variation depends on the random number generator that is used internally in the device. Setting on controlling the seed of the RNG i...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index fc59a61f5..6adf859bb 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -160,13 +160,22 @@ from the queue instead of updating their metadata to have an `"owner"`. [(#3282)](https://github.com/PennyLaneA...
PennyLaneAI__pennylane-3753
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/_qubit_device.py:QubitDevice._permute_wires", "pennylane/_qubit_device.py:QubitDevice.marginal_prob", "pennylane/_qubit_device.py:QubitDevice.expval", "pennylane/_qubit...
PennyLaneAI/pennylane
162472fe896f727ceadc72c4fce11626f7eff7f8
[BUG] Confusing behavior with the `wires` argument of `qml.probs` ### Expected behavior Consider a case where where a device's wires are ordered as `[2,0,1]` and we'd like to get the probabilities associated with these wires in the order `[0,1,2]`. That is, if a `qml.PauliX(wires=[0])` operation is applied, I would ex...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 9e8f3e39f..560da79ca 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -718,6 +718,10 @@ * Redirect `qml.math.ndim` to `jnp.ndim` when using it on a jax tensor. [(#3730)](https://github.com/PennyLaneAI/p...
PennyLaneAI__pennylane-3921
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/measurements/sample.py:SampleMP.shape", "pennylane/measurements/sample.py:SampleMP._shape_new" ], "edited_modules": [ "pennylane/measurements/sample.py:SampleMP" ...
PennyLaneAI/pennylane
4a001137d469c3163fadc9f64554e3e9384fd342
[BUG] `Sample` does not work with jitting when a subset of wires are used ### Expected behavior `qml.sample` works without errors when a circuit with parameters is jitted and a subset of the circuit wires are specified in the call to `qml.sample`. ### Actual behavior An exception is raised due to a mismatch be...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 56d423515..b86cd9fda 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -197,6 +197,9 @@ (~2e-8) in the computed dipole moment values, resulting from the new [PySCF 2.2.0](https://github.com/pyscf/pyscf/re...
PennyLaneAI__pennylane-3983
[ { "changes": { "added_entities": [ "pennylane/ops/op_math/evolution.py:Evolution.data", "pennylane/ops/op_math/evolution.py:Evolution.__copy__" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pennylane/ops/op_math/evolution.py:Evoluti...
PennyLaneAI/pennylane
60c39bdd9ca245df78e7cc5a900228a0f870b356
[BUG] Composite operator parameters are not trainable ### Expected behavior The parameters of composite ops are trainable (just like the 1st-generation Tensor and Hamiltonians). ### Actual behavior They are not trainable. ### Additional information This is because composite operators put their parameters in vanill...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 32a1ddcfa..74af67582 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -158,8 +158,9 @@ * `retworkx` has been renamed to `rustworkx` to accomodate the change in name for the package. [(#3975)](https://gi...
PennyLaneAI__pennylane-4161
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/pauli/utils.py:are_identical_pauli_words" ], "edited_modules": [ "pennylane/pauli/utils.py:are_identical_pauli_words" ] }, "file": "pennylane/pauli/utils.py" ...
PennyLaneAI/pennylane
2886e28476ac5410b491e8d782ceecc71e430d87
[BUG] Wrong expectation value of Hamiltonian with return qml.expval(H) ### Expected behavior Expected to get the same expectation value of a qml.Hamiltonian no matter 1. how the operators and the corresponding coefficient are ordered when it was constructed. 2. applied the grouping method ('QWC') or not. ### A...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 36cd9cb70..3018521fe 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -178,6 +178,10 @@ * Removes a patch in `interfaces/autograd.py` that checks for the `strawberryfields.gbs` device. That device is p...
PennyLaneAI__pennylane-4251
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/devices/default_qubit.py:DefaultQubit.expval" ], "edited_modules": [ "pennylane/devices/default_qubit.py:DefaultQubit" ] }, "file": "pennylane/devices/default...
PennyLaneAI/pennylane
ffafa34bc4d684fde732ede081346e317bdbe3a3
[BUG] Issue with the gradients of the expectation value of an operator ### Expected behavior Hi, I'm trying to compute the gradient of the circuit with respect to the parameters on the operator $\theta_{i,i+1}(\sigma^+_i\sigma^-_{i+1} + \sigma^+_{i+1}\sigma^-_i)$ where $\theta$ is my variable. When I compute the expec...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index b4de43a35..07084e2f4 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -438,6 +438,9 @@ An if conditional was intended to prevent divide by zero errors but the division was by the sine of the argument so ...
PennyLaneAI__pennylane-4295
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/drawer/mpldrawer.py:MPLDrawer.ctrl" ], "edited_modules": [ "pennylane/drawer/mpldrawer.py:MPLDrawer" ] }, "file": "pennylane/drawer/mpldrawer.py" } ]
PennyLaneAI/pennylane
6e0d11a8025007f4295b78733e318bd343710c5a
[BUG] draw_mpl misses controls for multi-target-wire ops with interspersed wires ### Expected behavior All control and target wires are indicated in some way, or the draw function fails. ### Actual behavior The control wire sandwiched between target wires is hidden behind a box drawing, For example, the attached ima...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 7667e77f5..5c4a4b0d9 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -14,6 +14,11 @@ <h3>Bug fixes 🐛</h3> +* Raise a warning if control indicators are hidden when calling `qml.draw_mpl` + [(#4295)](...
PennyLaneAI__pennylane-4343
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/pulse/hardware_hamiltonian.py:HardwareHamiltonian.__add__" ], "edited_modules": [ "pennylane/pulse/hardware_hamiltonian.py:HardwareHamiltonian" ] }, "file": "...
PennyLaneAI/pennylane
c627a5df976d4205520ba9614b93daeb1a9c535c
[BUG] `sum` not working with hardware Hamiltonians (transmons and rydberg) ### Expected behavior Working with hardware Hamiltonians, we add them together with similar syntax to `H = H_interaction + H_drive`. Often, we repeatedly add terms manually, e.g., `H_drive += qml.pulse.transmon_drive(amplitude, phase, freq, wir...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 93c39b88d..ef846119c 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -13,6 +13,10 @@ <h3>Improvements 🛠</h3> +* `HardwareHamiltonian`s can now be summed with `int` or `float`. + A sequence of `Hardw...
PennyLaneAI__pennylane-4366
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/operation.py:Observable._obs_data" ], "edited_modules": [ "pennylane/operation.py:Observable" ] }, "file": "pennylane/operation.py" }, { "changes": { ...
PennyLaneAI/pennylane
d17e6d92e3f3ef631a346295151978e4bac39466
[BUG] op_math adding two GellMann observables doesn't treat them as different Hermitians ### Expected behavior ``` >>> gell_1 = qml.GellMann(wires=0, index=3) >>> gell_2 = qml.GellMann(wires=0, index=8) >>> ham_added = gell_1 + gell_2 >>> print(type(ham_added)) <class 'pennylane.ops.qubit.hamiltonian.Hamiltonian'...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index a8d591446..5232b802c 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -137,6 +137,11 @@ * `default.qutrit` now supports all qutrit operations used with `qml.adjoint`. [(#4348)](https://github.com/PennyL...
PennyLaneAI__pennylane-4421
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/optimize/qnspsa.py:QNSPSAOptimizer._get_overlap_tape" ], "edited_modules": [ "pennylane/optimize/qnspsa.py:QNSPSAOptimizer" ] }, "file": "pennylane/optimize/q...
PennyLaneAI/pennylane
e9fb43b96093bf4205881c2370b33828a6e2a8c5
[BUG] `qml.QNSPSAOptimizer` includes `op.adjoint` instead of `qml.adjoint(op)` in source ### Expected behavior Circuit that includes `qml.RandomLayers` and uses `qml.QNSPSAOptimizer` executes normally. ### Actual behavior Execution raises `AdjointUndefinedError`. Other optimizers execute fine. ### Additiona...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index bb4a9d4b8..2a9141cd3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -196,6 +196,9 @@ `Tensor.sparse_matrix()`, it is recommended to use the `wire_order` keyword argument over `wires`. [(#4424)](htt...
PennyLaneAI__pennylane-4441
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/operation.py:Operator.__sub__" ], "edited_modules": [ "pennylane/operation.py:Operator" ] }, "file": "pennylane/operation.py" } ]
PennyLaneAI/pennylane
e3e85aa82df2a811ad59b11215a3d22a8f6f1c01
[BUG] Unexpected behaviour with operator subtraction and `.simplify()` ### Expected behavior I am trying to combine Pauli strings using addition/subtraction and tensor products. Subtracting operators from each other and simplifying the result should be possible. For example, ``` >>> H1 = qml.PauliZ(0) >>> H2 = ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 8a9ccee85..4a9add0c3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -311,6 +311,9 @@ array([False, False]) and `var` measurements. [(#4426)](https://github.com/PennyLaneAI/pennylane/pull/4426) +* ...
PennyLaneAI__pennylane-4540
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/functions/bind_new_parameters.py:bind_new_parameters", "pennylane/ops/functions/bind_new_parameters.py:bind_new_parameters_hamiltonian" ], "edited_modules": [ "...
PennyLaneAI/pennylane
6fae4e77ab73a330cd28eb237cd3b7ed712f4dac
[BUG] pennylane.tape.Unwarp does not unwrap Hamiltonian coefficients ### Expected behavior `qml.tape.unwrap` convert all ArrayBox in a tape to usual arrays. ### Actual behavior Coefficients of the `Hamiltonian` object instance (accessible via `ham.coeffs`) are not unwrapped. ### Additional information _N...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index ea10f7a9b..2f805d618 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -66,6 +66,9 @@ <h3>Bug fixes 🐛</h3> +* `convert_to_numpy_parameters` now uses `qml.ops.functions.bind_new_parameters`. This reinit...
PennyLaneAI__pennylane-4663
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/data/data_manager/foldermap.py:FolderMapView.find" ], "edited_modules": [ "pennylane/data/data_manager/foldermap.py:FolderMapView" ] }, "file": "pennylane/dat...
PennyLaneAI/pennylane
4c3ab729c0715c0a78a0e9b3454a650f0e7e7096
[BUG] `qml.data.load()` fails when using 'full' parameter value ### Expected behavior `qml.data.load('qspin',sysname='Heisenberg',periodicity='open',lattice='full',layout='2x2')` Should return the Heisenberg dataset corresponding to the `open` periodicity, `rectangular` lattice, and `2x2` layout. ### Actual beha...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 1ac65dd07..b904b6e4a 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -210,6 +210,9 @@ still a `_qfunc_output` property on `QNode` instances. [(#4651)](https://github.com/PennyLaneAI/pennylane/pull/46...
PennyLaneAI__pennylane-4697
[ { "changes": { "added_entities": [ "pennylane/ops/op_math/controlled.py:_is_single_qubit_special_unitary" ], "added_modules": [ "pennylane/ops/op_math/controlled.py:_is_single_qubit_special_unitary" ], "edited_entities": [ "pennylane/ops/op_math/controlled.p...
PennyLaneAI/pennylane
39c996ac3f5bf97c87ae0cb3f3b8ba29b5955001
Decomposition of multi-controlled RZ not supported[BUG] ### Expected behavior Should be able to decompose a multi-controlled RZ gate: ```python import pennylane as qml dev = qml.device("default.qubit", wires=[0,1,2]) decomposition = qml.ctrl(qml.RZ(0, wires=[0]), control=[1,2]).decomposition() @qml.qnode(dev) ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 0220304d1..cd0d2c9a3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -198,6 +198,9 @@ <h3>Improvements 🛠</h3> +* Multi-controlled operations with a single qubit special unitary target can now automat...
PennyLaneAI__pennylane-4993
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/_qubit_device.py:QubitDevice.expval", "pennylane/_qubit_device.py:QubitDevice.var" ], "edited_modules": [ "pennylane/_qubit_device.py:QubitDevice" ] }, ...
PennyLaneAI/pennylane
974ab77bfdb488ad11c2a4241b6940b7d4bf53c4
[BUG] qubit device expval method doesn't work with batch and BasisStateProjector ### Expected behavior When utilizing a qubit device with batch processing, expval output, and BasisStateProjector, the probabilities need to be correctly indexed in the good dimension. ### Actual behavior When utilizing a qubit device w...
diff --git a/doc/releases/changelog-0.34.0.md b/doc/releases/changelog-0.34.0.md index 21d33279a..2d64b8c32 100644 --- a/doc/releases/changelog-0.34.0.md +++ b/doc/releases/changelog-0.34.0.md @@ -708,7 +708,10 @@ [(#4951)](https://github.com/PennyLaneAI/pennylane/pull/4951) * `MPLDrawer` does not add the bonus s...
PennyLaneAI__pennylane-5063
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/op_math/sprod.py:SProd.__init__" ], "edited_modules": [ "pennylane/ops/op_math/sprod.py:SProd" ] }, "file": "pennylane/ops/op_math/sprod.py" }, { ...
PennyLaneAI/pennylane
f854611abc354f480a3b04894f0956fb4d3d3b8e
[Bug] qml.equal return False unexpectedly Encountered this problem in https://github.com/PennyLaneAI/pennylane/pull/5051 for creating a `qml.commutator` function. Even though the result from computing the commutator seems the same, `qml.equal` returns `False` when checking with the true result. Really not clear what...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 3cec643ed..96ee5ab67 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -35,10 +35,11 @@ * A new `pennylane.workflow` module is added. This module now contains `qnode.py`, `execution.py`, `set_shots.py`, `ja...
PennyLaneAI__pennylane-5256
[ { "changes": { "added_entities": [ "pennylane/measurements/counts.py:CountsMP.process_counts", "pennylane/measurements/counts.py:CountsMP._map_counts", "pennylane/measurements/counts.py:CountsMP._include_all_outcomes", "pennylane/measurements/counts.py:_remove_unobserved_ou...
PennyLaneAI/pennylane
9d54b1caddc239c0884b0de116f0322b80b622c2
Implement `CountsMP.process_counts` # Context Currently, our sample-based measurement processes that inherit from `SampleMeasurement` implement a [process_samples](https://github.com/PennyLaneAI/pennylane/blob/a05ae286c5925e0c881099cea751193d368779fc/pennylane/measurements/measurements.py#L535) method. This method i...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 2a70356a3..445064a36 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -114,6 +114,9 @@ * `qml.transforms.split_non_commuting` will now work with single-term operator arithmetic. [(#5314)](https://github...
PennyLaneAI__pennylane-5407
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/pauli/pauli_arithmetic.py:PauliSentence.to_mat" ], "edited_modules": [ "pennylane/pauli/pauli_arithmetic.py:PauliSentence" ] }, "file": "pennylane/pauli/pauli...
PennyLaneAI/pennylane
45f8e75834e6d7a649421cb19776ff4ea2dd5d1b
[Bug] `PauliSentence.to_mat(wire_order)` cannot handle Identities with wires ```python PauliSentence({PauliWord({}): 1.}).to_mat([0, 1]) ``` ```pycon --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[4]...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 0759bc717..2012081bb 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -264,9 +264,13 @@ * We no longer perform unwanted dtype promotion in the `pauli_rep` of `SProd` instances when using tensorflow. [(#...
PennyLaneAI__pennylane-5439
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/optimize/qnspsa.py:QNSPSAOptimizer.__init__", "pennylane/optimize/qnspsa.py:QNSPSAOptimizer._step_core", "pennylane/optimize/qnspsa.py:QNSPSAOptimizer._post_process_tensor", ...
PennyLaneAI/pennylane
05e266d387f6a09a26090d764ad6904bc538bf1b
[BUG] `QNSPSAOptimizer` with Autograd changes differentiable parameters type to vanilla NumPy array ### Expected behavior Updating parameters with `opt = qml.QNSPSAOptimizer` should not change the type of the parameters. ### Actual behavior The parameters change from `<class 'pennylane.numpy.tensor.tensor'>` to `<cl...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index d1f17ae1d..621b094b7 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -291,6 +291,9 @@ <h3>Bug fixes 🐛</h3> +* The `QNSPSAOptimizer` now properly handles differentiable parameters, resulting in being ...
PennyLaneAI__pennylane-5455
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/qubit/hamiltonian.py:Hamiltonian.__matmul__" ], "edited_modules": [ "pennylane/ops/qubit/hamiltonian.py:Hamiltonian" ] }, "file": "pennylane/ops/qubit/ham...
PennyLaneAI/pennylane
8327ffa0e2a262ed2f33b458c4d252cf3047e062
[BUG] Hamiltonians defined using operator arithmetic queuing extra gates ### Expected behavior When defining ``` dev = qml.device('default.qubit', wires = [0,1]) def H(alpha, beta): coeffs = [alpha, beta] ops = [qml.PauliX(0) @ qml.PauliX(1),qml.PauliZ(0) @ qml.PauliZ(1)] return qml.dot(coeffs,ops) ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 621b094b7..5356fa8a7 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -291,6 +291,9 @@ <h3>Bug fixes 🐛</h3> +* Using `@` with legacy Hamiltonian instances now properly de-queues the previously existin...
PennyLaneAI__pennylane-5538
[ { "changes": { "added_entities": [ "pennylane/ops/functions/equal.py:_equal_hilbert_schmidt" ], "added_modules": [ "pennylane/ops/functions/equal.py:_equal_hilbert_schmidt" ], "edited_entities": null, "edited_modules": null }, "file": "pennylane/ops/fu...
PennyLaneAI/pennylane
d03216e6ce5407a7f28489aa4d4b23a9c4345fac
[BUG] `qml.equal` does not work with `qml.HilbertSchmidt` ### Expected behavior Equal ops are detected to be equal ### Actual behavior Equal ops are reported to be different ### Additional information The culprit is `v_tape` in the hyperparameters. ### Source code ```shell u_tape = qml.tape.QuantumScript([qml.Ha...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 6291af1df..8681fe6af 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -390,6 +390,9 @@ <h3>Bug fixes 🐛</h3> +* (In)equality of `qml.HilbertSchmidt` instances is now reported correctly by `qml.equal`. ...
PennyLaneAI__pennylane-5582
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/devices/null_qubit.py:NullQubit.preprocess" ], "edited_modules": [ "pennylane/devices/null_qubit.py:NullQubit" ] }, "file": "pennylane/devices/null_qubit.py" ...
PennyLaneAI/pennylane
ea0107d15a2794dbe7772d89edd18a99b9b1e664
[BUG] `null.qubit` no longer plays nicely with custom operations ### Expected behavior ``` py import pennylane as qml from pennylane.resource.error import ErrorOperation class IssueErrorOp(ErrorOperation): def __init__(self, phase, wires): self.phase = phase super().__init__(phase, wires=...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index a1d7cae39..7d475e151 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -543,6 +543,9 @@ <h3>Bug fixes 🐛</h3> +* `null.qubit` now automatically supports any operation without a decomposition. + [(#5582...
PennyLaneAI__pennylane-5716
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/templates/layers/strongly_entangling.py:StronglyEntanglingLayers.compute_decomposition" ], "edited_modules": [ "pennylane/templates/layers/strongly_entangling.py:StronglyEn...
PennyLaneAI/pennylane
85ff62b9c9218f523ef7ff0535cde7cbf55ebb7b
Issue when using batched data on StronglyEntanglingLayers template.[BUG] ### Expected behavior I want to use the StronglyEntanglingLayers template to process batched data. the shape of the data is like [batch_size, layers, wires, 3]. ### Actual behavior Some errors happened: ``` .../pennylane/templates/layers/st...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index bd4e5f0ff..9d88744ff 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -144,6 +144,9 @@ <h3>Bug fixes 🐛</h3> +* The decomposition of `StronglyEntanglingLayers` is now compatible with broadcasting. + [...
PennyLaneAI__pennylane-5725
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/op_math/controlled.py:create_controlled_op" ], "edited_modules": [ "pennylane/ops/op_math/controlled.py:create_controlled_op" ] }, "file": "pennylane/ops/...
PennyLaneAI/pennylane
fdca35219255946ca8dd5dcd8a15d9fedbc5d034
[BUG] `defer_measurements` does not work with `qml.cond` applied to controlled gates ### Expected behavior `qml.cond` can be applied to any valid `Operation` and `defer_measurements` can deal with the resulting operation as well. ### Actual behavior Using `qml.cond` on a controlled operation and deferring measuremen...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 052a8975c..bd4e5f0ff 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -9,6 +9,9 @@ <h3>Improvements 🛠</h3> +* `ctrl` now works with tuple-valued `control_values` when applied to any already controlled...
PennyLaneAI__pennylane-5761
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/devices/default_qubit.py:_supports_adjoint", "pennylane/devices/default_qubit.py:DefaultQubit.supports_derivatives" ], "edited_modules": [ "pennylane/devices/defaul...
PennyLaneAI/pennylane
f318ec44fd717434854a87b8d67197c9b0672089
[BUG] Adjoint method does not respect global wires return types ### Expected behavior Found by @Shiro-Raven: The adjoint method _validation_ takes the same wires into account for measurements as forward execution unrelated to the adjoint method. ### Actual behavior An error is raised. ### Additional information ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 489fd740d..a7d698c73 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -190,6 +190,9 @@ <h3>Bug fixes 🐛</h3> +* The validation of the adjoint method in `DefaultQubit` correctly handles device wires now...
PennyLaneAI__pennylane-5781
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/devices/default_qubit.py:adjoint_state_measurements" ], "edited_modules": [ "pennylane/devices/default_qubit.py:adjoint_state_measurements" ] }, "file": "penn...
PennyLaneAI/pennylane
c1cd0829df15f4d1eca110032e50a2b487bfe1e1
[BUG] Specs does not take into account transforms ### Expected behavior Transformes applied to a QNode should influence the values output by `qml.specs()`. ### Actual behavior Very similar to the (now fixed) bug https://github.com/PennyLaneAI/pennylane/issues/5275, this does not seem to happen. ### Additional infor...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e28571f3d..f76d6850b 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -269,6 +269,9 @@ * The qchem docs are updated with the new qchem improvements. [(#5758)](https://github.com/PennyLaneAI/pennylane/pu...
PennyLaneAI__pennylane-5793
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pennylane/ops/qutrit/__init__.py" }, { "changes": { "added_entities": [ "pennylane/ops/qutrit/channel.py:QutritChannel.__init__", ...
PennyLaneAI/pennylane
8a51dda34ddc50a4ad303eb9cf46226dedf4a84d
Add a QutritChannel operation ### Feature details Version 0.36 of PennyLane includes a [`"default.qutrit.mixed"`](https://docs.pennylane.ai/en/latest/code/api/pennylane.devices.default_qutrit_mixed.DefaultQutritMixed.html) device that is capable of simulating [qutrit systems](https://pennylane.ai/qml/demos/tutorial_...
diff --git a/doc/introduction/operations.rst b/doc/introduction/operations.rst index ac7e23efc..bb978640d 100644 --- a/doc/introduction/operations.rst +++ b/doc/introduction/operations.rst @@ -509,6 +509,7 @@ Qutrit noisy channels ~pennylane.QutritDepolarizingChannel ~pennylane.QutritAmplitudeDamping ~pe...
PennyLaneAI__pennylane-5831
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/op_math/exp.py:Exp.simplify" ], "edited_modules": [ "pennylane/ops/op_math/exp.py:Exp" ] }, "file": "pennylane/ops/op_math/exp.py" } ]
PennyLaneAI/pennylane
d65f671326b71bd9e755a157ec913af31888934b
[BUG] `qml.simplify` removes information regarding `num_steps` from `Exp` ### Expected behavior ``` py >>> op1 = qml.exp(qml.Z(0) + 1.2*qml.Z(1), -1.2j, num_steps=2) >>> qml.simplify(op1).num_steps 2 ``` ### Actual behavior ``` py >>> op1 = qml.exp(qml.Z(0) + 1.2*qml.Z(1), -1.2j, num_steps=2) >>> qml.simplify(...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 12959fa66..8c23238f7 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -369,6 +369,9 @@ * Fixed a bug where `split_non_commuting` raises an error when the circuit contains measurements of observables that a...
PennyLaneAI__pennylane-5835
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/identity.py:Identity.pow" ], "edited_modules": [ "pennylane/ops/identity.py:Identity" ] }, "file": "pennylane/ops/identity.py" }, { "changes": { ...
PennyLaneAI/pennylane
45f8d4a3456d2a669da37b77342b58def94e00fa
[BUG] `qml.Adjoint` and `qml.Pow` do not commute when exponent is fractional ### Expected behavior Taking the `qml.adjoint()` of a powered-operator, i.e. an operator resulting from `qml.pow`, returns the same result whether we use `lazy=True` or `lazy=False` in `qml.adjoint()`. ### Actual behavior Setting the flag `...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 17acd824f..6c89bfe1c 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -323,6 +323,10 @@ <h3>Bug fixes 🐛</h3> +* Fixes a bug where fractional powers and adjoints of operators were commuted, which is + ...
PennyLaneAI__pennylane-5846
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/qaoa/layers.py:_diagonal_terms", "pennylane/qaoa/layers.py:cost_layer", "pennylane/qaoa/layers.py:mixer_layer" ], "edited_modules": [ "pennylane/qaoa/layers...
PennyLaneAI/pennylane
2252d453cfeb62f8aafc454a9513a87f614db533
[BUG] QAOA layers incorrectly forbid `Sum` observables ### Expected behavior A `Sum` observable should be treated just like a legacy hamiltonian object or a new `LinearCombination` object. ### Actual behavior The `QAOA` layers manually raise an error during a validation step, forbidding `Sum` and other multi-term op...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 25cefac72..5b2896486 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -326,6 +326,9 @@ <h3>Bug fixes 🐛</h3> +* `qml.qaoa.cost_layer` and `qml.qaoa.mixer_layer` can now be used with `Sum` operators. + ...
PennyLaneAI__pennylane-5851
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/ops/functions/equal.py:_equal_operators" ], "edited_modules": [ "pennylane/ops/functions/equal.py:_equal_operators" ] }, "file": "pennylane/ops/functions/equa...
PennyLaneAI/pennylane
9b3060fd56e1e65a0d69a27b8a13583ce716a538
[BUG] Incorrect answers from qml.var due to sum hashing ### Expected behavior Given some circuit like this, ``` dev = qml.device("default.qubit", wires=3) @qml.qnode(dev) def circuit_separated(): qml.RX(np.pi / 3, 0) qml.RZ(np.pi / 3, 0) return [ qml.var(qml.Z(0)), qml.var(qml.X(0)) ...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index f944e02b5..847bcf3d6 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -341,6 +341,10 @@ <h3>Bug fixes 🐛</h3> +* Fixes a bug where `Sum`'s with repeated identical operations ended up with the same hash...
PennyLaneAI__pennylane-5857
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/transforms/core/transform_dispatcher.py:TransformDispatcher._qfunc_transform" ], "edited_modules": [ "pennylane/transforms/core/transform_dispatcher.py:TransformDispatcher"...
PennyLaneAI/pennylane
cc954890bfd49b5173bddcd3015069d52b619412
Broadcast Expand Prevents Torchlayer from detecting Inputs Argument ### Expected behavior The torchlayer should be created successfully without any errors. This works fine if the broadcast expand function decorator "@qml.transforms.broadcast_expand" is commented out from the minimal code provided. ### Actual beha...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 11e431fa3..19dcc314a 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -264,6 +264,9 @@ * `qml.qchem.molecular_dipole` function is added for calculating the dipole operator using "dhf" and "openfermion" bac...
PennyLaneAI__pennylane-5860
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pennylane/gradients/hadamard_gradient.py:_expval_hadamard_grad" ], "edited_modules": [ "pennylane/gradients/hadamard_gradient.py:_expval_hadamard_grad" ] }, "file": "pe...
PennyLaneAI/pennylane
248a808a35419caa2b89e4379e2fb3edd11f549b
[BUG] hadamard gradient does not work with wires-broadcasted measurements ### Expected behavior I would expect `hadamard_grad` to be interchangeable with `param_shift` in cases where there is no explicit error ### Actual behavior Output gradient is simply `array([0.])` ### Additional information _No response_ ###...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e3641f9a5..a9de6a1b3 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -415,6 +415,9 @@ <h3>Bug fixes 🐛</h3> +* Fixes a bug where `hadamard_grad` returned a wrong shape for `qml.probs()` without wires....