Skip to content

Commit

Permalink
Update pennylane/devices/_qutrit_device.py
Browse files Browse the repository at this point in the history
Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
  • Loading branch information
mudit2812 and lillian542 committed Sep 18, 2024
1 parent 831dae0 commit 0f5395c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pennylane/devices/_qutrit_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,16 @@ def vn_entropy(self, wires, log_base):

def vn_entanglement_entropy(self, wires0, wires1, log_base):
r"""Returns the Von Neumann entanglement entropy prior to measurement.
.. math::
S(\rho_A) = -\text{Tr}[\rho_A \log \rho_A] = -\text{Tr}[\rho_B \log \rho_B] = S(\rho_B)
Args:
wires0 (Sequence[int] or int): the wires of the first subsystem
wires1 (Sequence[int] or int): the wires of the second subsystem
log_base (float): Base for the logarithm.
Returns:
float: returns the Von Neumann entropy
"""
Expand Down

0 comments on commit 0f5395c

Please sign in to comment.