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

Workflow templates #139

Open
randomir opened this issue May 7, 2019 · 0 comments
Open

Workflow templates #139

randomir opened this issue May 7, 2019 · 0 comments
Labels
feature New feature or request question Further information is requested

Comments

@randomir
Copy link
Member

randomir commented May 7, 2019

For more involved workflows from #138, it might make sense to create them (and/or) as templates that would accept some workflow bits (runnables or parameters), and would construct a workflow according to a template.

Motivating pseudo-code example (see examples/qbsolv-like-alt.py):

ParallelizedSubsampler = WorkflowTemplate<subsampler, initial_state=None> hybrid.Map(
    subsampler
) | hybrid.Reduce(
    hybrid.Lambda(merge_substates),
    initial_state=initial_state
) | hybrid.SplatComposer()

Later we could use it:

qpu = ParallelizedSubsampler(hybrid.QPUSubproblemAutoEmbeddingSampler())
random = ParallelizedSubsampler(hybrid.RandomSubproblemSampler(), initial_state=some)
@randomir randomir added feature New feature or request question Further information is requested labels May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant