You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
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
where
first
andlast
are iterators to a collection ofsize_t
specifying one of two subpartitions of the qubits indexed from zero to tableau'snum_qubits
minus one. The functions would throwstd::out_of_range
if the collection contains qubits outside the range. Return typesize_t
is chosen to matchTableau.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.The text was updated successfully, but these errors were encountered: