Skip to content

Commit

Permalink
Update pennylane/devices/_qubit_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 authored Sep 18, 2024
1 parent 32b8e04 commit 831dae0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pennylane/devices/_qubit_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,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 831dae0

Please sign in to comment.