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

Support classical fisher gradients when using Autograd #2688

Merged
merged 8 commits into from
Jun 15, 2022

Conversation

josh146
Copy link
Member

@josh146 josh146 commented Jun 11, 2022

Context: The qml.math.divide() function was producing a list of a list of ArrayBox objects when using autograd, which was causing differentiation to fail. It seems that either swapping back to standard python division, or stacking the output of qml.math.divide(), fixes the problem.

Description of the Change:

  • Swapped back to standard Python division, since this is likely faster than adding additional stacks.

Benefits: differentiating the fisher information now works:

dev = qml.device("default.qubit", wires=3)

@qml.qnode(dev)
def circuit(weights):
    qml.RX(weights[0], wires=0)
    qml.RX(weights[1], wires=1)
    qml.RX(weights[2], wires=2)
    qml.CNOT(wires=[0, 1])
    qml.RY(weights[4], wires=0)
    qml.RY(weights[5], wires=1)
    qml.RY(weights[6], wires=2)
    qml.CNOT(wires=[1, 2])
    qml.CRX(weights[7], wires=[0, 1])
    qml.CRY(weights[8], wires=[1, 2])
    qml.CRZ(weights[9], wires=[2, 0])
    return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))

weights = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], requires_grad=True)
print(qml.jacobian(qml.qinfo.classical_fisher(circuit), argnum=0)(weights))

Possible Drawbacks: I haven't verified if the gradient is correct or not 🙂

Related GitHub Issues: n/a

@josh146 josh146 added the bug 🐛 Something isn't working label Jun 11, 2022
@josh146 josh146 requested a review from Qottmann June 11, 2022 17:47
@codecov
Copy link

codecov bot commented Jun 11, 2022

Codecov Report

❗ No coverage uploaded for pull request base (v0.24.0-rc0@76e3fa3). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             v0.24.0-rc0    #2688   +/-   ##
==============================================
  Coverage               ?   99.61%           
==============================================
  Files                  ?      251           
  Lines                  ?    20670           
  Branches               ?        0           
==============================================
  Hits                   ?    20590           
  Misses                 ?       80           
  Partials               ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76e3fa3...084d4f1. Read the comment docs.

@Qottmann
Copy link
Contributor

Qottmann commented Jun 13, 2022

This PR is now based on master, but I guess we would want this to be in the new release candidate v0.24.0-rc0? Can I just switch the base or will I wreak havoc by doing this?

I.e. I would like to add a differentiability test for autograd before merging.

@Qottmann
Copy link
Contributor

Jax and autograd now produce the correct result for the simple analytic example. Tensorflow and torch still yield the wrong result. Here are the two examples that are not working. Would be worth adding this to the doc string, warning the user that differentiating with torch and tf does not work atm.

import torch

@qml.qnode(dev, interface="torch")
def circ(params):
    qml.RY(params, wires=0)
    return qml.probs(wires=range(1))

params = np.pi / 4 * torch.tensor([1.0], requires_grad=True) # note that this is arbitrary, result is constant for any value

print("Check analytical result: ", np.allclose(qml.qinfo.classical_fisher(circ)(params).detach().numpy(),1))

result = np.zeros((1, 1, 1), dtype="float64")

result_calc = torch.autograd.functional.jacobian(qml.qinfo.classical_fisher(circ), params)

print("Check analytic gradient: ", np.allclose(result, result_calc, atol=1e-6), "value = ", result_calc)
Check analytical result:  True
Check analytic gradient:  False value =  tensor([[[-2.0000]]])
import tensorflow as tf

@qml.qnode(dev, interface="tf")
def circ(params):
    qml.RY(params, wires=0)
    return qml.probs(wires=range(1))

params = tf.Variable([np.pi/4])

print("Check analytical result: ", np.allclose(qml.qinfo.classical_fisher(circ)(params),1))

result = np.zeros((1, 1, 1), dtype="float64")

with tf.GradientTape() as tape:
    loss = qml.qinfo.classical_fisher(circ)(params)
result_calc = tape.jacobian(loss, params)

print("Check analytic gradient: ", np.allclose(result, result_calc, atol=1e-6), "value = ", result_calc)
Check analytical result:  True
Check analytic gradient:  False value =  tf.Tensor([[[-1.9999996]]], shape=(1, 1, 1), dtype=float32)

@Qottmann
Copy link
Contributor

Some further testing, this time no analytic results but just for consistency. It seems that (torch and tf) and (autograd and jax) are producing consistent results.

dev = qml.device("default.qubit", wires=3)

def qfunc(weights):
    qml.RX(weights[0], wires=0)
    qml.RX(weights[1], wires=1)
    qml.RX(weights[2], wires=2)
    qml.CNOT(wires=[0, 1])
    qml.RY(weights[4], wires=0)
    qml.RY(weights[5], wires=1)
    qml.RY(weights[6], wires=2)
    qml.CNOT(wires=[1, 2])
    qml.CRX(weights[7], wires=[0, 1])
    qml.CRY(weights[8], wires=[1, 2])
    qml.CRZ(weights[9], wires=[2, 0])
    return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))

# Compute gradients of CFIM for different interfaces
circuit = qml.QNode(qfunc, dev, interface="torch")
weights = torch.tensor([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], requires_grad=True)
grad_torch = torch.autograd.functional.jacobian(qml.qinfo.classical_fisher(circuit), weights)

circuit = qml.QNode(qfunc, dev, interface="autograd")
weights = pnp.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], requires_grad=True)
grad_autograd = qml.jacobian(qml.qinfo.classical_fisher(circuit))(weights)

circuit = qml.QNode(qfunc, dev, interface="jax")
weights = jnp.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0])
grad_jax = jax.jacobian(qml.qinfo.classical_fisher(circuit))(weights)

circuit = qml.QNode(qfunc, dev, interface="tf")
weights = tf.Variable([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0])
with tf.GradientTape() as tape:
    loss = qml.qinfo.classical_fisher(circuit)(weights)
grad_tf = tape.jacobian(loss, weights)

# Evaluate and compare
grads = [grad_autograd, grad_tf, grad_torch, grad_jax]

is_same = np.zeros((4,4))

for i, g1 in enumerate(grads):
    for j, g2 in enumerate(grads):
        is_same[i, j] = np.allclose(g1, g2, atol=1e-6)

print(is_same)
[[1. 0. 0. 1.]
 [0. 1. 1. 0.]
 [0. 1. 1. 0.]
 [1. 0. 0. 1.]]

@josh146 josh146 changed the base branch from master to v0.24.0-rc0 June 13, 2022 15:49
@josh146
Copy link
Member Author

josh146 commented Jun 13, 2022

Thanks for checking this @Qottmann!

Regarding the TF and Torch examples; it might be really good to add Torch and TF tests to the test suite for the gradient (alongside JAX and Autograd gradient tests), but simply mark the Torch and TF tests as @pytest.mark.xfail. This way, pytest expects the test to fail.

@rmoyard rmoyard merged commit 8c39317 into v0.24.0-rc0 Jun 15, 2022
@rmoyard rmoyard deleted the fix-cfim-autograd branch June 15, 2022 14:11
dime10 pushed a commit that referenced this pull request Jun 16, 2022
* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* exclude files from pr

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: GitHub Actions Bot <>
dime10 added a commit that referenced this pull request Jun 17, 2022
* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* exclude files from pr

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: GitHub Actions Bot <>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
rmoyard added a commit that referenced this pull request Jun 20, 2022
* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* exclude files from pr

* Trigger CI

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: GitHub Actions Bot <>
rmoyard added a commit that referenced this pull request Jun 20, 2022
* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* update documentation (#2750)

* Release notes `v0.24.0` (#2701)

* Update

* Reorganization new features

* Typo

* Check all PRs

* Typo removed

* Add 2688

* Isaac changes up to ~Improvements

* Isaac full pass through release notes

* Add rc

* Math rendering

* Add grad example

* Math rendering again

* Change matrices

* Remove matrices

* Reorganize

* Math rendering and ECR description

* Took out matrix definitions of IsingXY and ECR

* Reference for IsingXY

* vn_entropy fix names

* changelog changes

* Add bug fix ham wires

* more

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* NGD link

* Small edits

* op_math.Pow more descriptive

* Correct some values

* Include update

* Apply suggestions from my code review (very minor grammar)

* lightning qubit additions

* Remove PL-lightning stuff

* Move qchem PR

* Removed PL lightning contributors

* Remove more PL lightning contributors

* Update version

* Contributors full stop

* Trigger CI

Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: Antal Szava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>

* Update rc sync

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
albi3ro added a commit that referenced this pull request Aug 9, 2022
* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
antalszava added a commit that referenced this pull request Aug 10, 2022
* Update the Hermiticity check of `qml.Hermitian` to use `qml.math` (#2895)

* fix

* changelog

* lint

* important typo fix (#2901)

* test lightning (#2903)

* Update the readme and PennyLane Logo (#2912)

* Update PennyLane Logo

* remove wordmark from readme

* update citation

* et al

* Update the logo

* replace with svg

* Add warning to `qml.cond` docs about unsupported cases (#2883)

* docs

* docs

* `qml.simplify` can reduce number of rotation parameters (#2905)

* move rotation simplify into op method

* add additional example

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* seed and flaky (#2917)

* Fixes a bug where kUpCCGSD wasn't working with the parameter-shift rule (#2913)

* First commit

* Added PR link

* More accurate description in changelog

* Test PS rule against backprop

* Fixed error with test

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Add module documentation for `ops` (#2730)

* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>

* exclude files from pr

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: GitHub Actions Bot <>
rmoyard added a commit that referenced this pull request Aug 11, 2022
* Update the Hermiticity check of `qml.Hermitian` to use `qml.math` (#2895)

* fix

* changelog

* lint

* important typo fix (#2901)

* test lightning (#2903)

* Update the readme and PennyLane Logo (#2912)

* Update PennyLane Logo

* remove wordmark from readme

* update citation

* et al

* Update the logo

* replace with svg

* Add warning to `qml.cond` docs about unsupported cases (#2883)

* docs

* docs

* `qml.simplify` can reduce number of rotation parameters (#2905)

* move rotation simplify into op method

* add additional example

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* seed and flaky (#2917)

* Fixes a bug where kUpCCGSD wasn't working with the parameter-shift rule (#2913)

* First commit

* Added PR link

* More accurate description in changelog

* Test PS rule against backprop

* Fixed error with test

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Add module documentation for `ops` (#2730)

* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>

* Fix check batching bug (#2900)

* check batching only if batching supported

* Update doc/releases/changelog-0.25.0.md

* just change op arithmetic properties

* just raise errors

* Update pennylane/operation.py

* modify has_matrix and matrix

* remove test

* Update tests/ops/op_math/test_controlled_op.py

* Update tests/ops/op_math/test_sprod.py

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* prod tests, controlled name

* more interface tests

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* Update development guide to explain `dev.stopping.condition` (#2925)

* update developer docs to reflect default qubit change

* typo

* Update doc/development/adding_operators.rst

* add code examples

* exclude files from pr

* Trigger CI

* missing test

* Trigger CI

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: GitHub Actions Bot <>
rmoyard added a commit that referenced this pull request Aug 12, 2022
* Update the Hermiticity check of `qml.Hermitian` to use `qml.math` (#2895)

* fix

* changelog

* lint

* important typo fix (#2901)

* test lightning (#2903)

* Update the readme and PennyLane Logo (#2912)

* Update PennyLane Logo

* remove wordmark from readme

* update citation

* et al

* Update the logo

* replace with svg

* Add warning to `qml.cond` docs about unsupported cases (#2883)

* docs

* docs

* `qml.simplify` can reduce number of rotation parameters (#2905)

* move rotation simplify into op method

* add additional example

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* seed and flaky (#2917)

* Fixes a bug where kUpCCGSD wasn't working with the parameter-shift rule (#2913)

* First commit

* Added PR link

* More accurate description in changelog

* Test PS rule against backprop

* Fixed error with test

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Add module documentation for `ops` (#2730)

* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>

* Fix check batching bug (#2900)

* check batching only if batching supported

* Update doc/releases/changelog-0.25.0.md

* just change op arithmetic properties

* just raise errors

* Update pennylane/operation.py

* modify has_matrix and matrix

* remove test

* Update tests/ops/op_math/test_controlled_op.py

* Update tests/ops/op_math/test_sprod.py

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* prod tests, controlled name

* more interface tests

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* Update development guide to explain `dev.stopping.condition` (#2925)

* update developer docs to reflect default qubit change

* typo

* Update doc/development/adding_operators.rst

* add code examples

* Fix test randomness for `ShotAdaptiveOptimizer` (#2929)

* return types

* Update test

* Typo

* State finite shots warn (#2918)

* first draft to gauge test failures

* skip config tests when finite shots and state based return

* skip tape shape test cases

* device test

* updated device test

* new return types tests

* remove errors, catch the warnings

* changelog

* run tests

Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>

* Add a test for logic that accidentally got in untested (#2930)

* add test

* Trigger CI

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix symbolic `Controlled` operator documentation (#2934)

* Minor documentation fixes (#2933)

* native instead of propriertary

* misc documentation fixes

* Update doc/introduction/measurements.rst

* remove do_queue from adjoint docstring

* exclude files from pr

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>
Co-authored-by: GitHub Actions Bot <>
antalszava added a commit that referenced this pull request Aug 15, 2022
* Update the Hermiticity check of `qml.Hermitian` to use `qml.math` (#2895)

* fix

* changelog

* lint

* important typo fix (#2901)

* test lightning (#2903)

* Update the readme and PennyLane Logo (#2912)

* Update PennyLane Logo

* remove wordmark from readme

* update citation

* et al

* Update the logo

* replace with svg

* Add warning to `qml.cond` docs about unsupported cases (#2883)

* docs

* docs

* `qml.simplify` can reduce number of rotation parameters (#2905)

* move rotation simplify into op method

* add additional example

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* seed and flaky (#2917)

* Fixes a bug where kUpCCGSD wasn't working with the parameter-shift rule (#2913)

* First commit

* Added PR link

* More accurate description in changelog

* Test PS rule against backprop

* Fixed error with test

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Add module documentation for `ops` (#2730)

* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>

* Fix check batching bug (#2900)

* check batching only if batching supported

* Update doc/releases/changelog-0.25.0.md

* just change op arithmetic properties

* just raise errors

* Update pennylane/operation.py

* modify has_matrix and matrix

* remove test

* Update tests/ops/op_math/test_controlled_op.py

* Update tests/ops/op_math/test_sprod.py

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* prod tests, controlled name

* more interface tests

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* Update development guide to explain `dev.stopping.condition` (#2925)

* update developer docs to reflect default qubit change

* typo

* Update doc/development/adding_operators.rst

* add code examples

* Fix test randomness for `ShotAdaptiveOptimizer` (#2929)

* return types

* Update test

* Typo

* State finite shots warn (#2918)

* first draft to gauge test failures

* skip config tests when finite shots and state based return

* skip tape shape test cases

* device test

* updated device test

* new return types tests

* remove errors, catch the warnings

* changelog

* run tests

Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>

* Add a test for logic that accidentally got in untested (#2930)

* add test

* Trigger CI

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix symbolic `Controlled` operator documentation (#2934)

* Minor documentation fixes (#2933)

* native instead of propriertary

* misc documentation fixes

* Update doc/introduction/measurements.rst

* remove do_queue from adjoint docstring

* docs: 📝 Fix docstring. (#2941)

* Fix-docs (#2942)

* docs: 📝 Fix docstring.

* docs: 📝 Fix docstring.

* Set is_sampled to True when using Counts return type (#2928)

* fix (Tape): 🐛 Set is_sampled to True when using Counts return type.

* fix (Device): 🐛 Fix Counts check.

* test: 🧪 Adapt tests.

* chore (changelog): ✏️ Add feature to changelog.

* test: 🧪 Delete duplicated import.

* test: 🧪 Add test.

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: antalszava <antalszava@gmail.com>

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>

* Modify resource docs (#2944)

* `qml.equal` considers in-place inversion. (#2947)

* equal considers inversion

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix docker & update pypi uploader (#2936)

* return types

* Typoo

* Typo

* Update uploader

* needs update

* Return tests.

* typoo

* update examples for prod (#2948)

* Update `qml.math.allclose` to work for trainable Torch tensors (motivated by `qml.equal`) (#2937)

* docs updates; fix qml.equal Torch Runtime Error issue for requires_grad=True

* revert tests/math/test_functions.py

* test allclose with trainable Torch Tensor

* revert removing a test; update tests based on review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update `qml.Flipsign` docs example (#2949)

* formatting the flipsign example

* example return type

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Release notes `v0.25.0` (#2902)

* return types

* Typo

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: antalszava <antalszava@gmail.com>

* Suggestion form Antal

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>

* Suggestions

* chore (changelog): ✏️ Fix PR link.

* Moved new return type into another new feature section

* Minor

* Minor

* Updated Op-Arithmetic changelog

* Op arithmetic and re-did previous commits that were undone

* Moved item to improvements

* Controlled class feature shuffled, code example added

* Minor

* Double check names and PRs

* minor

* stopping condition breaking change

* Minor typos and shuffled one entry into Op arithmetic

* Removed hyperlinks to docs for formatting

* Apply suggestions from Josh's code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add details for hf deprecation

* Suggestions from Josh's review

* minor

* Simpler PS broadcast example

* Minor

* Fix broken link

* Check examples new features

* Flipsign

* Image update for param shift broadcast speedup

* Controlled update

* Minor change to code example for FirstQuantization

* Minor

* Controlled entry

* Josh's suggestion

* Apply suggestions from Josh's code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: AlbertMitjans <a.mitjanscoma@gmail.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: albi3ro <chrissie.c.l@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: soranjh <soranjh@yahoo.com>

* Doc for `enable_return` and `disable_return` (#2950)

* return types

* Add doc

* typo

* Update pennylane/return_types.py

* Typo

* Update

* Typo

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* New try

* Trigger CI

* replace pycon

* Apply suggestions from code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

* remove python

* return

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>

* exclude files from pr

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: albi3ro <chrissie.c.l@gmail.com>
Co-authored-by: soranjh <soranjh@yahoo.com>
Co-authored-by: GitHub Actions Bot <>
rmoyard added a commit that referenced this pull request Aug 15, 2022
* Update the Hermiticity check of `qml.Hermitian` to use `qml.math` (#2895)

* fix

* changelog

* lint

* important typo fix (#2901)

* test lightning (#2903)

* Update the readme and PennyLane Logo (#2912)

* Update PennyLane Logo

* remove wordmark from readme

* update citation

* et al

* Update the logo

* replace with svg

* Add warning to `qml.cond` docs about unsupported cases (#2883)

* docs

* docs

* `qml.simplify` can reduce number of rotation parameters (#2905)

* move rotation simplify into op method

* add additional example

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* seed and flaky (#2917)

* Fixes a bug where kUpCCGSD wasn't working with the parameter-shift rule (#2913)

* First commit

* Added PR link

* More accurate description in changelog

* Test PS rule against backprop

* Fixed error with test

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Add module documentation for `ops` (#2730)

* Update phase decomp test (#2697)

* Update interfaces.rst (#2698)

* Allow templates to be decomposed (#2704)

* Allow templates to be decomposed

* Add TODO to clean

* Update changelog

* Fix pylint error

Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>

* Deprecate `qml.ExpvalCost` (#2571)

* Add UserWarning to ExpvalCost and catch said warning in all tests containing ExpvalCost

* added warning in doc string

* added to the changelog in 0.23.1

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/vqe/vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_qng.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/qchem/of_tests/test_convert.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_qaoa.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/test_vqe.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/transforms/test_adjoint_metric_tensor.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update tests/optimize/test_optimize_shot_adapative.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* overlooked to catch the new warning in test_dipole_of

* switched to the right changelog

Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update JAX jit forward mode forward evaluation (#2700)

* update logic

* update logic

* test case

* test assertion

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Improve ising gates documentation (#2711)

* Update doc

* Update

* Update pennylane/ops/qubit/parametric_ops.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Apply suggestions from code review

* CHange

* Typo

Co-authored-by: antalszava <antalszava@gmail.com>

* Support classical fisher gradients when using Autograd (#2688)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Support classical Fisher gradients when using TF and torch (#2710)

* Support classical fisher gradients when using Autograd

* Update doc/releases/changelog-dev.md

* added test for jax and autograd

* black

* added xfail tests

* added comment in doc string about torch and tf not diffable

* Fix differentiability for tensorflow and torch

* Remove warning

* Fix TF not iterable error

* Trigger CI

* added example in doc-string about diffability

* close-block becomes code-block lol

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Change pytest mark

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Remove `hardware` argument in `qml.qinfo.quantum_fisher` (#2695)

* removed hardware argument, adapted doc string

* updated tests

* black

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/qinfo/transforms.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add default.qubit condition and change doc string

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Add `qinfo` measurements in supported configurations docs (#2712)

* Add documentation for new qinfo measurements

* Add docs for finite diff

* Fix JAX tests

* Change param shift to red

* Move entropy param shift tests

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Use access_state (#2719)

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update docs v0.24 (#2724)

* private func has no indices arg

* update the circuit name in the example

* reduced_dm doc update

* correct Hamiltonian creation for classical Fisher

* Delete exactly one space from reduced_dm docstring to correct rendering

* Update outputting quantum_fisher example

* Move summary to start (#2727)

* add ops module section

* only include functions and op_math

* added weights initialization example (#2735)

* Wires not updated for a hamiltonian with in-place addition (#2738)

* fixed hamiltonian wire bug

* changelog

* try other way

* Cleanup docs (#2736)

* Documentation changes for `batch_partial` (#2737)

* Update docs

* Add double backticks

* Add other backtick :xd:

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Fix sphinx class/method links (#2729)

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* trying something else

* Fix rendering of matrix rep of ECR (#2741)

* fix rendering of matrix rep of ECR

* lint

* trigger ci

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix doc quantum information and ising (#2732)

* Ising doc

* Move entropy test

* Math doc

* Measurement doc

* qinfo doc

* Update pennylane/qinfo/transforms.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Update pennylane/math/quantum.py

* Update

* Fix kwargs for fidelity (#2740)

* update

* Typo

* Update pennylane/qinfo/transforms.py

Co-authored-by: Christina Lee <christina@xanadu.ai>

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Reduced dm

* Apply suggestions from code review

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* remove reduce dm

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>

* hope

* Add quantum info measurements to introduction doc page (#2734)

* add quantum info measurements to introduction page

* minor doc fixes

* more minor fixes

* revert kwargs change

* Apply suggestions from code review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* maybe this time

* probably not going to work but worth a try

* Apply suggestions from code review

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>

* update with master

* updates

* merge something

* update docstring

* line length problem

* fix controlled signature

* fix s_prod

* add control class notes

* update docs for Sprod and Sum

* typo

* small fix

* fixing docs

* added pragma no-cover to signature property

* Apply suggestions from code review

* clean up

* fix sprod demo

* add info to quick start operations guide

* typo

* added example

* re-link top level imports to prevent duplication of docstring pages generated by sphinx

* typo

* change constructor imports to toplevel

* Apply suggestions from code review

* add equal to ops.functions docstring

* Update doc/introduction/operations.rst

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/controlled_class.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/ops/op_math/sum.py

Co-authored-by: antalszava <antalszava@gmail.com>

* lint

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>

* Fix check batching bug (#2900)

* check batching only if batching supported

* Update doc/releases/changelog-0.25.0.md

* just change op arithmetic properties

* just raise errors

* Update pennylane/operation.py

* modify has_matrix and matrix

* remove test

* Update tests/ops/op_math/test_controlled_op.py

* Update tests/ops/op_math/test_sprod.py

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* prod tests, controlled name

* more interface tests

Co-authored-by: David Wierichs <davidwierichs@gmail.com>

* Update development guide to explain `dev.stopping.condition` (#2925)

* update developer docs to reflect default qubit change

* typo

* Update doc/development/adding_operators.rst

* add code examples

* Fix test randomness for `ShotAdaptiveOptimizer` (#2929)

* return types

* Update test

* Typo

* State finite shots warn (#2918)

* first draft to gauge test failures

* skip config tests when finite shots and state based return

* skip tape shape test cases

* device test

* updated device test

* new return types tests

* remove errors, catch the warnings

* changelog

* run tests

Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>

* Add a test for logic that accidentally got in untested (#2930)

* add test

* Trigger CI

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix symbolic `Controlled` operator documentation (#2934)

* Minor documentation fixes (#2933)

* native instead of propriertary

* misc documentation fixes

* Update doc/introduction/measurements.rst

* remove do_queue from adjoint docstring

* docs: 📝 Fix docstring. (#2941)

* Fix-docs (#2942)

* docs: 📝 Fix docstring.

* docs: 📝 Fix docstring.

* Set is_sampled to True when using Counts return type (#2928)

* fix (Tape): 🐛 Set is_sampled to True when using Counts return type.

* fix (Device): 🐛 Fix Counts check.

* test: 🧪 Adapt tests.

* chore (changelog): ✏️ Add feature to changelog.

* test: 🧪 Delete duplicated import.

* test: 🧪 Add test.

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: antalszava <antalszava@gmail.com>

Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>

* Modify resource docs (#2944)

* `qml.equal` considers in-place inversion. (#2947)

* equal considers inversion

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Fix docker & update pypi uploader (#2936)

* return types

* Typoo

* Typo

* Update uploader

* needs update

* Return tests.

* typoo

* update examples for prod (#2948)

* Update `qml.math.allclose` to work for trainable Torch tensors (motivated by `qml.equal`) (#2937)

* docs updates; fix qml.equal Torch Runtime Error issue for requires_grad=True

* revert tests/math/test_functions.py

* test allclose with trainable Torch Tensor

* revert removing a test; update tests based on review

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Update `qml.Flipsign` docs example (#2949)

* formatting the flipsign example

* example return type

Co-authored-by: Romain Moyard <rmoyard@gmail.com>

* Release notes `v0.25.0` (#2902)

* return types

* Typo

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: antalszava <antalszava@gmail.com>

* Suggestion form Antal

* Update doc/releases/changelog-0.25.0.md

Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>

* Suggestions

* chore (changelog): ✏️ Fix PR link.

* Moved new return type into another new feature section

* Minor

* Minor

* Updated Op-Arithmetic changelog

* Op arithmetic and re-did previous commits that were undone

* Moved item to improvements

* Controlled class feature shuffled, code example added

* Minor

* Double check names and PRs

* minor

* stopping condition breaking change

* Minor typos and shuffled one entry into Op arithmetic

* Removed hyperlinks to docs for formatting

* Apply suggestions from Josh's code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

* add details for hf deprecation

* Suggestions from Josh's review

* minor

* Simpler PS broadcast example

* Minor

* Fix broken link

* Check examples new features

* Flipsign

* Image update for param shift broadcast speedup

* Controlled update

* Minor change to code example for FirstQuantization

* Minor

* Controlled entry

* Josh's suggestion

* Apply suggestions from Josh's code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: AlbertMitjans <a.mitjanscoma@gmail.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: albi3ro <chrissie.c.l@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: soranjh <soranjh@yahoo.com>

* Doc for `enable_return` and `disable_return` (#2950)

* return types

* Add doc

* typo

* Update pennylane/return_types.py

* Typo

* Update

* Typo

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Update pennylane/return_types.py

Co-authored-by: antalszava <antalszava@gmail.com>

* New try

* Trigger CI

* replace pycon

* Apply suggestions from code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

* remove python

* return

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>

* Warning for broadcasting and templates. (#2956)

* Add warning

* Update

* Matrix incompatible for `Hamiltonian` objects in Arithmetic Operators (#2957)

* added fix and tests

* fix sum test

* added is instance checks in class

* lint

* changelog

* Bump pl-lightning `0.25.0` (#2953)

* return types

* Add bump

* Trigger CI

* Trigger CI

* Trigger CI

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: David Wierichs <davidwierichs@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <edward.jiang@resident.xanadu.ai>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Co-authored-by: Qottmann <qottmann@LT0290.ad.icfo.net>
Co-authored-by: Qottmann <korbinian.kottmann@gmail.com>
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
Co-authored-by: albi3ro <chrissie.c.l@gmail.com>
Co-authored-by: soranjh <soranjh@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants