Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

von Neumann entropy #785

Open
viathor opened this issue Jun 13, 2024 · 1 comment
Open

von Neumann entropy #785

viathor opened this issue Jun 13, 2024 · 1 comment

Comments

@viathor
Copy link
Contributor

viathor commented Jun 13, 2024

It's fairly simple to compute von Neumann entropy of a stabilizer state given its tableau and a partitioning of the qubit register, see e.g. here.

The API might look something like

template <size_t W>
struct Tableau {
    ...
    template <class QubitIt>
    TODO entanglement_support(QubitIt first, QubitIt last);

    template <class QubitIt>
    size_t von_neumann_entropy(QubitIt first, QubitIt last);
    ...
}

where first and last are iterators to a collection of size_t specifying one of two subpartitions of the qubits indexed from zero to tableau's num_qubits minus one. The functions would throw std::out_of_range if the collection contains qubits outside the range. Return type size_t is chosen to match Tableau.num_qubits (which makes sense in light of the formula (1) in the answer linked above). Return type TODO is a representation of the subset of the given partition on which the entanglement is supported.

The new functions should be exposed via pybind.

I found a mention of this feature in this past issue.

Credit: function entanglement_support suggested by @Strilanc.

@Strilanc
Copy link
Collaborator

The python API is more important than the C++ API. The C++ method should probably live in src/util_top/*, along with most of the other top-level utilities not used by other utilities, to avoid explosion in compilation times by dumping everything into the class source files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants