-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unitary from pattern #104
Comments
Hey, thanks for the suggestion. Direct unitary extraction from a pattern would certainly be a good feature (we don't have that yet)! For pattens with flow (only XY-plane measurements), it might be easier to directly translate into a gate network with CZ (edges connecting different flow paths) and (for XY-plane measurements with angle cc: @masa10-f - would you agree or not? lmk what you think. |
Thanks for the good comments! @shinich1 @FlorianFuerrutter As far as I understand, direct construction from tensornetwork seems to be the most efficient method, no matter the type of flow(causal flow / generalize flow / pauli flow). First off, we create a tensornetwork by turning each measurement command into its tensor equivalent(e.g. N -> |+>, E -> 4-rank CZ tensor, M -> projection vector). Then, we contract all the inner edges. After that, we end up with a 2n-rank tensor, which can be reshaped into an n-qubit Unitary matrix. In this approach, we don't have to compute each matrix element one by one; we get them all in one go. Regarding the implementation, we'll need to modify tensornet.py. It is not hard but may need some tensornetwork know-how. If you're just looking at patterns with causal flow, @shinich1 's idea is pretty straightforward. We can apply the same techniques used in various quantum circuit libraries. Just a reminder, the existence of Pauli flow is the weakest condition of Unitary embedding for a given pattern. So what we have to check here is pauli flow :) |
Describe the feature you'd like
Hey all, I'm interested if there is any (efficient) way to get the unitary implemented from a given pattern. I did not find any direct function but I think this could be done easily if one can set the input state arbitrarily (issue #53) and check for flow of a pattern.
Additional context
I would propose a (pseudo) code in that direction:
Maybe there is a better way to do this? Maybe even with the current code base?
The text was updated successfully, but these errors were encountered: