-
Notifications
You must be signed in to change notification settings - Fork 117
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
Clarification on applying individual transformations #238
Comments
The first thing seems to be a bug, potentially in the |
…ult, as that is a more sensible option. See #238
I've now changed the default behaviour to |
Thanks @jvdwetering.
Taking these results into account:
|
It depends on what you want to do with your graph-like diagram. But yes, fusing all spiders is definitely a necessity. |
…ult, as that is a more sensible option. See zxcalc#238
What I would like to do with my graph-type diagram is to be able to apply a set of transformations to a circuit, making sure that I do not modify the functionality/semantics of the graph corresponding to the circuit. So this is my question, taking into account the new parameter in the function I can apply to a circuit:
Which one should I apply? |
My goal is to apply a single transformation to a graph that satisfies the 'graph-like' precondition.
First approach
I tried to apply the following transformations mentioned in #199 (
to_gh
andspider_simp
):Output:
But the graph was not 'graph-like'.
Second approach
My second approach was using specific functions to convert to 'graph-like'.
I converted the 'mod5_4_before' circuit to a graph, and later to a 'graph-like' graph using the 'to_graph_like' function.
I have to say that
to_graph_like
function appears in a code block with a note:"#The functions below haven't been updated in a while. Use at your own risk.", although the function appears to implement the requirements necessary for a graph to satisfy the 'graph-like' condition according to 'Hybrid quantum-classical circuit simplification
with the ZX-calculus'. (page 6).
After this, I applied the transformation 'zx.rules.remove_ids' to the graph of type 'graph-like', and checked the type of graph using the 'is_graph_like' function, this function returned
False
-> so, it was not a graph of type 'graph-like'.Output:
As I said at the beginning of this comment, my goal is to apply a transform to a circuit.
In this case, I tested the 'zx.rules.remove_ids' transformation, and the result does not seem to be satisfactory.
I am very confused, please:
And
The text was updated successfully, but these errors were encountered: