Skip to content

Commit

Permalink
Adds Double Excitation operations (#1123)
Browse files Browse the repository at this point in the history
* Adds first verison of double excitation operations

* excludes ops from reversible test

* Update .github/CHANGELOG.md

* Adds gate_data for testing

* Adds first patch of tests

* Fixes indent error

* Update pennylane/devices/tf_ops.py

* black

* removes interface tests

* fixes docstring warning

* fixes docstring warning

* adds interface tests for plus/minus

* Apply suggestions from code review

* adds grad interface tests

* Apply suggestions from code review

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

* prototype new interface tests

* Apply suggestions from code review

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

* changes from code review

* Update .github/CHANGELOG.md

* documentation fixes

* try

* this should fix it

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: agran2018 <45397799+agran2018@users.noreply.github.com>

* changes from code review

* improves docstrings

* removes useless import

* black

* fix indent

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: agran2018 <45397799+agran2018@users.noreply.github.com>
  • Loading branch information
4 people committed Mar 23, 2021
1 parent 6aa1228 commit c05978e
Show file tree
Hide file tree
Showing 15 changed files with 2,718 additions and 1,890 deletions.
23 changes: 22 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,29 @@

The `SingleExcitation` operation supports analytic gradients on hardware
using only four expectation value calculations, following results from
[Kottmann et al.](https://arxiv.org/abs/2011.05938)
[Kottmann et al.](https://arxiv.org/abs/2011.05938)

* Added the `DoubleExcitation` four-qubit operation, which is useful for quantum
chemistry applications. [(#1123)](https://github.com/PennyLaneAI/pennylane/pull/1123)

It can be used to perform an SO(2) rotation in the subspace
spanned by the states :math:`|1100\rangle` and :math:`|0011\rangle`.
For example, the following circuit performs the transformation
:math:`|1100\rangle\rightarrow \cos(\phi/2)|1100\rangle - \sin(\phi/2)|0011\rangle`:

```python
dev = qml.device('default.qubit', wires=2)

@qml.qnode(dev)
def circuit(phi):
qml.PauliX(wires=0)
qml.PauliX(wires=1)
qml.DoubleExcitation(phi, wires=[0, 1, 2, 3])
```

The `DoubleExcitation` operation supports analytic gradients on hardware using only
four expectation value calculations, following results from
[Kottmann et al.](https://arxiv.org/abs/2011.05938).

* Adds a new function ``qml.math.conj``.
[(#1143)](https://github.com/PennyLaneAI/pennylane/pull/1143)
Expand Down
4 changes: 4 additions & 0 deletions doc/introduction/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Qubit gates
~pennylane.SingleExcitation
~pennylane.SingleExcitationPlus
~pennylane.SingleExcitationMinus
~pennylane.DoubleExcitation
~pennylane.DoubleExcitationPlus
~pennylane.DoubleExcitationMinus


:html:`</div>`

Expand Down
Loading

0 comments on commit c05978e

Please sign in to comment.