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

Add circuit_evolution_batch to run circuit evolution in batch mode #30

Merged
merged 8 commits into from Jan 29, 2024

Conversation

ma-sadeghi
Copy link
Contributor

This PR adds a thin wrapper around circuit_evolution so it can be run in batch mode, i.e. run multiple times to generate multiple plausible candidate circuits in parallel. We need this in AutoEIS, where we want to generate multiple potential candidates and then rank them based on some statistical criteria. We originally tried to use Python multiprocessing to do this on our side, but it turned out to be quite fragile especially for macOS.

The wrapper accepts two keyword arguments in addition to the ones accepted by circuit_evolution:

  • iters: Defines how many candidate circuits to generate
  • numprocs: Number of workers to use; Defaults to the number of physical cores.

@MaximeVH I'd really appreciate it if you could review this PR and let me know what you think.

@ma-sadeghi ma-sadeghi changed the title Add circuit_evolution_batch to run circuit_evolution in batch mode Add circuit_evolution_batch to run circuit evolution in batch mode Jan 28, 2024
@MaximeVH MaximeVH merged commit 573fb3a into MaximeVH:master Jan 29, 2024
5 checks passed
@MaximeVH
Copy link
Owner

I think this is indeed a useful addition to the package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants