Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make numerical representations of operators differentiable #1749

Merged
merged 40 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1960665
Convert most parametric ops to use qml.math.
Oct 13, 2021
8a1b084
Run black.
Oct 13, 2021
4c26d23
Use stack for everything. Update helper functions.
Oct 14, 2021
a93d794
Remove operations that have been converted.
Oct 14, 2021
56b4d9e
Update single excitations and devices.
Oct 14, 2021
9f3231e
Black utils.
Oct 14, 2021
0b8ece6
Update all devices to use the default operations.
Oct 14, 2021
b460a68
Remove empty dict.
Oct 14, 2021
0c8779b
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
glassnotes Oct 14, 2021
64a9c25
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
josh146 Oct 14, 2021
c1a8de5
Remove get unitary matrix from devices where not needed.
Oct 14, 2021
91c924f
Apply suggestions from code review
glassnotes Oct 14, 2021
22e14df
Update pennylane/ops/qubit/parametric_ops.py
josh146 Oct 14, 2021
ca6bad7
fix
josh146 Oct 14, 2021
5295a0a
fix
josh146 Oct 14, 2021
7c17da9
linting
josh146 Oct 14, 2021
9872936
fix torch errors
josh146 Oct 14, 2021
91be029
fix torch errors
josh146 Oct 14, 2021
177445d
fix tf errors
josh146 Oct 14, 2021
dc23908
Fix failing torch GPU test.
Oct 14, 2021
6e2f426
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
josh146 Oct 15, 2021
5d44213
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
Oct 15, 2021
37c5627
Remove ops files.
Oct 15, 2021
d6f3643
Update CHANGELOG.
Oct 15, 2021
b576ca4
Temporary commit.
Oct 15, 2021
bc54d6c
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
glassnotes Oct 16, 2021
b9fa516
Remove checks on theta shape.
glassnotes Oct 16, 2021
9ab79a7
Fix incorrect parameters in tensorflow section.
glassnotes Oct 16, 2021
9acb2f4
merge master
josh146 Oct 18, 2021
d9d58ca
fix tests
josh146 Oct 18, 2021
e504cfd
fix tests
josh146 Oct 18, 2021
438bc17
fix
josh146 Oct 18, 2021
4a78be2
Fix matrix op and add speedup with 1j mult.
glassnotes Oct 18, 2021
82b1731
Add missing tests.
glassnotes Oct 18, 2021
716f811
Fix tensor dimensions.
glassnotes Oct 18, 2021
6583f1d
Update changelog. Add missing eigval test.
glassnotes Oct 18, 2021
ed16fa0
Run black.
glassnotes Oct 18, 2021
29a6da2
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
josh146 Oct 18, 2021
83b9b0b
Apply suggestions from code review
glassnotes Oct 18, 2021
310c2ec
Merge branch 'master' into sc-7223-numerical-representations-of-opera…
glassnotes Oct 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@

<h3>Improvements</h3>

* All qubit operations have been re-written to use the `qml.math` framework
for internal classical processing and the generation of their matrix representations.
As a result these representations are now fully differentiable, and the
framework-specific device classes no longer need to maintain framework-specific
versions of these matrices.
[(#1749)](https://github.com/PennyLaneAI/pennylane/pull/1749)
Comment on lines +369 to +374
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 for avoiding 'interface' hahaha


* A new utility class `qml.BooleanFn` is introduced. It wraps a function that takes a single
argument and returns a Boolean.
[(#1734)](https://github.com/PennyLaneAI/pennylane/pull/1734)
Expand Down
2 changes: 1 addition & 1 deletion pennylane/beta/devices/default_tensor_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
raise ImportError("default.tensor.tf device requires TensorFlow>=2.0") from e

from pennylane.beta.devices.default_tensor import DefaultTensor
from pennylane.devices import tf_ops as ops
from pennylane.beta.devices import tf_ops as ops

# tolerance for numerical errors
tolerance = 1e-10
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions pennylane/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
default_qubit_autograd
default_gaussian
default_mixed
tf_ops
torch_ops
autograd_ops
tests
"""
# DefaultQubitTF and DefaultQubitAutograd not imported here since this
Expand Down
Loading