def pauli_mpp(nr_sites, local_dim):
r"""Pauli POVM tensor product as MP-POVM
The resulting MP-POVM will contain all tensor products of the
elements of the local Pauli POVM from :func:`mpp.pauli_povm()`.
:param int nr_sites: Number of sites of the returned MP-POVM
:param int local_dim: Local dimension
:rtype: MPPovm
For example, for two qubits the `(1, 3)` measurement outcome is
`minus X` on the first and `minus Y` on the second qubit:
>>> nr_sites = 2
>>> local_dim = 2
>>> pauli = pauli_mpp(nr_sites, local_dim)
>>> xy = np.kron([1, -1], [1, -1j]) / 2
>>> xyproj = np.outer(xy, xy.conj())
>>> proj = pauli.get([1, 3], astype=mp.MPArray) \
... .to_array_global().reshape((4, 4))
>>> abs(proj - xyproj / 3**nr_sites).max() <= 1e-10
True
The prefactor `1 / 3**nr_sites` arises because X, Y and Z are in a
single POVM.
"""
from mpnum.povm import pauli_povm
return MPPovm.from_local_povm(pauli_povm(local_dim), nr_sites)
评论列表
文章目录