qml.qinfo.transforms.vn_entanglement_entropy

vn_entanglement_entropy(tape, wires0, wires1, base=None, **kwargs)[source]

Compute the Von Neumann entanglement entropy from a circuit returning a state():

\[S(\rho_A) = -\text{Tr}[\rho_A \log \rho_A] = -\text{Tr}[\rho_B \log \rho_B] = S(\rho_B)\]

where \(S\) is the von Neumann entropy; \(\rho_A = \text{Tr}_B [\rho_{AB}]\) and \(\rho_B = \text{Tr}_A [\rho_{AB}]\) are the reduced density matrices for each partition.

The Von Neumann entanglement entropy is a measure of the degree of quantum entanglement between two subsystems constituting a pure bipartite quantum state. The entropy of entanglement is the Von Neumann entropy of the reduced density matrix for any of the subsystems. If it is non-zero, it indicates the two subsystems are entangled.

Parameters
  • tape (QNode or QuantumTape or Callable) – A quantum circuit returning a state().

  • wires0 (Sequence(int)) – List of wires in the first subsystem.

  • wires1 (Sequence(int)) – List of wires in the second subsystem.

  • base (float) – Base for the logarithm. If None, the natural logarithm is used.

Returns

The transformed circuit as described in qml.transform. Executing this circuit will provide the entanglement entropy in the form of a tensor.

Return type

qnode (QNode) or quantum function (Callable) or tuple[List[QuantumTape], function]