Skip to content

Commit

Permalink
Fermionic ops in changelog (#4302)
Browse files Browse the repository at this point in the history
  • Loading branch information
trbromley authored Jun 26, 2023
1 parent d9779ed commit f29bf32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/releases/changelog-0.31.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@
```pycon
>>> word1 = qml.fermi.from_string('0+ 0- 3+ 3-')
>>> word2 = qml.fermi.from_string('3+ 3-')
>>> sentence = 1.2 * word1 - 0.345 * word2
>>> sentence = 1.2 * word1 + 0.345 * word2
>>> sentence
1.2 * a⁺(0) a(0) a⁺(3) a(3)
- 0.345 * a⁺(3) a(3)
+ 0.345 * a⁺(3) a(3)
```

Additionally, any fermionic operator, be it a single fermionic creation/annihilation operator, a Fermi word, or a Fermi sentence,
can be mapped to the qubit basis by using [qml.jordan_wigner](https://docs.pennylane.ai/en/stable/code/api/pennylane.jordan_wigner.html):

```pycon
>>> qml.jordan_wigner(sentence)
((0.1275+0j)*(Identity(wires=[0]))) + ((-0.1275+0j)*(PauliZ(wires=[3]))) + ((-0.3+0j)*(PauliZ(wires=[0]))) + ((0.3+0j)*(PauliZ(wires=[0]) @ PauliZ(wires=[3])))
((0.4725+0j)*(Identity(wires=[0]))) + ((-0.4725+0j)*(PauliZ(wires=[3]))) + ((-0.3+0j)*(PauliZ(wires=[0]))) + ((0.3+0j)*(PauliZ(wires=[0]) @ PauliZ(wires=[3])))
```

Learn how to create fermionic Hamiltonians describing some simple chemical systems by checking
Expand Down

0 comments on commit f29bf32

Please sign in to comment.