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

Update CHANGELOG for release v0.10 #687

Merged
merged 9 commits into from
Jun 22, 2020
Merged
45 changes: 30 additions & 15 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[documentation](https://pennylane.ai/en/stable/code/api/pennylane.beta.plugins.DefaultQubitTF.html)
for more details.

* The ``default.tensor`` plugin has been significantly upgraded. It now allows two different
* The [``default.tensor`` plugin](https://github.com/XanaduAI/pennylane/blob/master/pennylane/beta/plugins/default_tensor.py) has been significantly upgraded. It now allows two different
tensor network representations to be used: `"exact"` and `"mps"`. The former uses a
exact factorized representation of quantum states, while the latter uses a matrix product state
representation.
Expand All @@ -51,37 +51,52 @@

A PennyLane QNode can be converted into a `torch.nn` layer using the `qml.qnn.TorchLayer` class:

```python
@qml.qnode(dev)
def qnode(inputs, weights_0, weight_1):
# define the circuit
# ...
```pycon
>>> @qml.qnode(dev)
... def qnode(inputs, weights_0, weight_1):
... # define the circuit
... # ...

Comment on lines +58 to 59
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
... # ...
... # ...

Copy link
Member Author

Choose a reason for hiding this comment

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

lol this "suggestion" is not registering as something that is committable in github

weight_shapes = {"weights_0": 3, "weight_1": 1}
qlayer = qml.qnn.TorchLayer(qnode, weight_shapes)
>>> weight_shapes = {"weights_0": 3, "weight_1": 1}
>>> qlayer = qml.qnn.TorchLayer(qnode, weight_shapes)
```

A hybrid model can then be easily constructed:

```python
model = torch.nn.Sequential(qlayer, torch.nn.Linear(2, 2))
```pycon
>>> model = torch.nn.Sequential(qlayer, torch.nn.Linear(2, 2))
```
* Added a new "reversible" differentiation method which can be used in simulators, but not hardware.

The reversible approach is similar to backpropagation, but trades off extra computation for
enhanced memory efficiency. Where backpropagation caches the state tensors at each step during
a simulated evolution, the reversible method only caches the final pre-measurement state. Compared to
the parameter-shift method, the reversible method can be faster or slower, depending on the
density and location of parametrized gates in a circuit (circuits with higher density of
parametrized gates near the end of the circuit will see a benefit).
a simulated evolution, the reversible method only caches the final pre-measurement state.

Compared to the parameter-shift method, the reversible method can be faster or slower,
depending on the density and location of parametrized gates in a circuit
(circuits with higher density of parametrized gates near the end of the circuit will see a benefit).
[(#670)](https://github.com/XanaduAI/pennylane/pull/670)

```pycon
>>> dev = qml.device("default.qubit", wires=2)
... @qml.qnode(dev, diff_method="reversible")
... def circuit(x):
... qml.RX(x, wires=0)
... qml.RX(x, wires=0)
... qml.CNOT(wires=[0,1])
... return qml.expval(qml.PauliZ(0))
>>> qml.grad(circuit)(0.5)
(array(-0.47942554),)
```

<h4>New templates and cost functions</h4>

* Added the new templates `UCCSD`, `SingleExcitationUnitary`, and`DoubleExcitationUnitary`,
which together implement the Unitary Coupled-Cluster Singles and Doubles (UCCSD) ansatz
to perform VQE-based quantum chemistry simulations using PennyLane-QChem.
[(#654)](https://github.com/XanaduAI/pennylane/pull/654)
[(#622)](https://github.com/XanaduAI/pennylane/pull/622)
[(#638)](https://github.com/XanaduAI/pennylane/pull/638)
[(#654)](https://github.com/XanaduAI/pennylane/pull/654)
[(#659)](https://github.com/XanaduAI/pennylane/pull/659)
[(#622)](https://github.com/XanaduAI/pennylane/pull/622)

Expand Down