-
Notifications
You must be signed in to change notification settings - Fork 193
Description
What is the expected enhancement?
Add a function which performs the local complementation of a node applied to a graph. Local complementation is often used when working with graph states where each node corresponds to a qubit and each edge between two qubits represents a CZ gate (wikipedia page).
Figure 1 and the text around equation (2) in this paper describes the local complementation of a node applied to a graph.
Adapted from the above mentioned paper:
Local complementation of a node n applied to a graph acts to complement the neighbourhood of the node n. That is, in the neighbourhood of n, it removes edges if they are present, and adds any edges that are missing.
Local complementation is only defined on indirected graphs. It is not defined on graphs that have self-loops or have multiple edges between nodes.
I will immediately add a pull request for this feature.