code: def vn_entropy(wires, log_base=None) -> "VnEntropyMP":
      r"""Von Neumann entropy of the system prior to measurement.
  
      .. math::
          S( \rho ) = -\text{Tr}( \rho \log ( \rho ))
  
      Args:
          wires (Sequence[int] or int): The wires of the subsystem
          log_base (float): Base for the logarithm.
  
      Returns:
          VnEntropyMP: Measurement process instance
  
      **Example:**
  
      .. code-block:: python3
  
          dev = qml.device("default.qubit", wires=2)
  
          @qml.qnode(dev)
          def circuit_entropy(x):
              qml.IsingXX(x, wires=[0, 1])
              return qml.vn_entropy(wires=[0])
  
      Executing this QNode:
  
      >>> circuit_entropy(np.pi/2)
      0.6931472
  
      It is also possible to get the gradient of the previous QNode:
  
      >>> param = np.array(np.pi/4, requires_grad=True)
      >>> qml.grad(circuit_entropy)(param)
      tensor(0.62322524, requires_grad=True)
  
      .. note::
  
          Calculating the derivative of :func:`~.vn_entropy` is currently supported when
          using the classical backpropagation differentiation method (``diff_method="backprop"``)
          with a compatible device and finite differences (``diff_method="finite-diff"``).
  
      .. seealso:: :func:`pennylane.qinfo.transforms.vn_entropy` and :func:`pennylane.math.vn_entropy`
      """
      wires = Wires(wires)
      return VnEntropyMP(wires=wires, log_base=log_base)
  
file_path: pennylane/pennylane/measurements/vn_entropy.py
imports: from typing import Sequence, Optional
  import pennylane
  from pennylane.wires import Wires
  from .measurements import StateMeasurement, VnEntropy
label_desc: Use image node_id 1 for calling a global function with example usage: vn_entropy(wires, log_base) and returns: VnEntropyMP