Average bipartite entanglement

The command
outputs the average bipartite entanglement [D. A. Meyer and N. R. Wallach, J. Math. Phys. 43 4273 (2002)] between each qubit and the rest (n-1)-qubits state [J. Emerson, Y. S. Weinstein, M. Saraceno, S. Lloyd, and D. G. Cory, Science 302 2098 (2003)],

$\displaystyle Q=2-\frac{2}{n}\sum_{i=1}^n\mathrm{Tr}(\tilde\rho_i^2),$ (11)

where $ \tilde\rho_i$ is the reduced density operator of the i-th qubit.

WARNING: This is NOT a good measure of entanglement for mixed states, especially those with initial small polarizations. It has been hoped that some good measure of entanglement for mixed states will be proposed in some day.