The entanglement entropy obtained by tracing the partition function over a set of sites is a natural operator to compute. Would it be possible to add it to pulser.backend ?
Here is the Qutip code I have been using:
def vn_entropy(state: Qobj, sites=None) -> float:
"""
Compute von Neumann entropy by tracing over specified sites.
By default, this traces over half of the spin sites.
"""
state = state.unit()
state.dims = cast(list, state.dims)
L = len(state.dims[0])
if sites is None:
sites = list(range(L // 2))
return qutip.entropy_vn(state.ptrace(sites))
entropy = np.array([vn_entropy(state) for state in results.states])
It would be great to have an equivalent that could be computed during the time evolution. Would you have a solution based on a callback or something else meanwhile?
The entanglement entropy obtained by tracing the partition function over a set of sites is a natural operator to compute. Would it be possible to add it to
pulser.backend?Here is the Qutip code I have been using:
It would be great to have an equivalent that could be computed during the time evolution. Would you have a solution based on a callback or something else meanwhile?