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

Secure pattern generation #193

Open
masa10-f opened this issue Jul 31, 2024 · 2 comments
Open

Secure pattern generation #193

masa10-f opened this issue Jul 31, 2024 · 2 comments
Assignees
Labels
new feature New feature or request

Comments

@masa10-f
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Graphix does not guarantee the runnability and deterministic properties of a pattern when it is passed to a simulator or QPU. It would be beneficial if these fundamanetal properties are ensured during the pattern generation process.

Describe the feature you'd like
A clear and concise description of what you want to happen.

One possible way to do this is to generate a pattern from the underlying graph and flowlike objects(including causal flow, gflow, and pauli flow). Flows can be understood as a feedforward protocol that ensures deterministic property of MBQC.

  1. Generalize the graph-based pattern generator(generator.generate_from_graph) with an arbitrary flowlike object(related to Add optional argument to pass gflow in generate_from_graph() #120 )
  2. Generate every pattern through the above generator
  3. Implement flags in the pattern class such as pattern.is_deterministic and pattern.is_runnable.

I plan to refactor some methods in the pattern class to clarify which operations preserve the properties. For example, standardize and shift_signals preserve the properties, but add does not. I will implement a property-preserving pattern concatenation method for those who want to directly edit the pattern.

Additional context
Add any other context or screenshots about the feature request here.

@masa10-f masa10-f added the new feature New feature or request label Jul 31, 2024
@masa10-f masa10-f self-assigned this Jul 31, 2024
@mgarnier59
Copy link
Contributor

mgarnier59 commented Aug 1, 2024

That's something we have in mind and will do soon. The easiest way seems to check we don't offend runnability when adding a command without reference to the graph and whether it has flow.

@masa10-f
Copy link
Contributor Author

masa10-f commented Aug 1, 2024

I don't grasp how to do that and its generality. So please let me discuss after your team's PR submitted.

Anyway, I have implemented the above features in another repo. So I will submit a PR soon after finishing circuit PR.

thierry-martinez added a commit to thierry-martinez/graphix that referenced this issue Sep 27, 2024
Nodes were not removed from `NodeIndex` dictionary which allow
non-runnable patterns to use wrong nodes by mistake.

Related to TeamGraphix#193 (runnability issues).
thierry-martinez added a commit that referenced this issue Oct 1, 2024
…214)

Nodes were not removed from `NodeIndex` dictionary which allow
non-runnable patterns to use wrong nodes by mistake.

Related to #193 (runnability issues).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants