Skip to content

Commit e55355f

Browse files
authored
Merge branch 'develop' into develop
2 parents 44ab635 + 3a1d8bb commit e55355f

File tree

133 files changed

+3847
-4051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3847
-4051
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ coverage:
55
target: 89%
66
patch:
77
default:
8-
target: auto
8+
target: 99%
99
threshold: 0%

.github/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* Added the `serialize` module to save MrMustard objects to file.
1010
[(#451)](https://github.com/XanaduAI/MrMustard/pull/451)
1111

12+
* Added `isort` to run before black upon `make format` to sort Python imports.
13+
[(#506)](https://github.com/XanaduAI/MrMustard/pull/506)
14+
1215
### Breaking changes
1316

1417
### Improvements
@@ -43,6 +46,9 @@
4346
* Fix object visualizations in VS Code Notebooks by using the built-in display tools.
4447
[(#425)](https://github.com/XanaduAI/MrMustard/pull/425)
4548

49+
* Fix the TensorFlow issue with the expected number of gradients in `custom_gradient`.
50+
[(#506)](https://github.com/XanaduAI/MrMustard/pull/506)
51+
4652
### Documentation
4753

4854
### Tests
@@ -54,6 +60,7 @@
5460
[Austin Lund](https://github.com/aplund)
5561
[Kasper Nielsen](https://github.com/kaspernielsen96)
5662
[Matthew Silverman](https://github.com/timmysilv)
63+
[Ali Asadi](https://github.com/maliasadi)
5764

5865

5966
---

.github/workflows/tests_docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ jobs:
3939
- name: Run tests
4040
run: |
4141
python -m pytest --doctest-modules mrmustard/math/parameter_set.py
42-
python -m pytest --doctest-modules mrmustard/physics/ansatze.py
43-
python -m pytest --doctest-modules mrmustard/physics/representations.py
42+
python -m pytest --doctest-modules mrmustard/physics/ansatz
4443
python -m pytest --doctest-modules mrmustard/lab_dev

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ ignored-classes=numpy,tensorflow,scipy,networkx,strawberryfields,thewalrus
2828
# can either give multiple identifier separated by comma (,) or put this option
2929
# multiple time (only on the command line, not in the configuration file where
3030
# it should appear only once).
31-
disable=fixme,no-member,line-too-long,invalid-name,too-many-lines,redefined-builtin,too-many-locals,duplicate-code,too-many-arguments,too-few-public-methods,no-else-return,isinstance-second-argument-not-valid-type,no-self-argument, arguments-differ
31+
disable=fixme,no-member,line-too-long,invalid-name,too-many-lines,redefined-builtin,too-many-locals,duplicate-code,too-many-arguments,too-few-public-methods,no-else-return,isinstance-second-argument-not-valid-type,no-self-argument, arguments-differ, protected-access

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ PYTHON3 := $(shell which python3 2>/dev/null)
22
TESTRUNNER := -m pytest tests -p no:warnings
33
COVERAGE := --cov=mrmustard --cov-report=html --cov-append
44

5+
ifdef check
6+
CHECK := --check --diff
7+
ICHECK := --check
8+
else
9+
CHECK :=
10+
ICHECK :=
11+
endif
12+
513
.PHONY: help
614
help:
715
@echo "Please use \`make <target>' where <target> is one of"
@@ -10,7 +18,7 @@ help:
1018
@echo " dist to package the source distribution"
1119
@echo " clean to delete all temporary, cache, and build files"
1220
@echo " clean-docs to delete all built documentation"
13-
@echo " format to run black formatting"
21+
@echo " format [check=1] to run isort and black formatting; use with 'check=1' to check instead of modify"
1422
@echo " test to run the test suite for entire codebase"
1523
@echo " coverage to generate a coverage report for entire codebase"
1624

@@ -59,7 +67,8 @@ clean-docs:
5967

6068
.PHONY : format
6169
format:
62-
black -l 100 mrmustard/ tests/
70+
isort --py 312 --profile black -l 100 -p mrmustard/ tests/ $(ICHECK)
71+
black -t py310 -t py311 -t py312 -l 100 mrmustard/ tests/ $(CHECK)
6372

6473
.PHONY : lint
6574
lint:

doc/code/lab_dev.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ mrmustard.lab_dev
44
.. toctree::
55
:maxdepth: 1
66

7-
lab_dev/wires
87
lab_dev/circuit_components
98
lab_dev/states
109
lab_dev/transformations

doc/code/lab_dev/wires.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

doc/code/physics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mrmustard.physics
44
.. toctree::
55
:maxdepth: 1
66

7-
physics/ansatze
7+
physics/wires
88
physics/representations
99

1010
.. toctree::

doc/code/physics/ansatze.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Calculations on Bargmann objects
22
================================
33

4-
.. currentmodule:: mrmustard.physics.bargmann
4+
.. currentmodule:: mrmustard.physics.bargmann_utils
55

6-
.. automodapi:: mrmustard.physics.bargmann
6+
.. automodapi:: mrmustard.physics.bargmann_utils
77
:no-heading:
88
:include-all-objects:

0 commit comments

Comments
 (0)