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

Register workflows by target type #272

Merged
merged 6 commits into from
Sep 11, 2024
Merged

Register workflows by target type #272

merged 6 commits into from
Sep 11, 2024

Conversation

mtweiden
Copy link
Contributor

@mtweiden mtweiden commented Sep 3, 2024

This pull request replaces the _compile_registry object with type specific registries. This enables default workflows to be registered depending on the type of the target.

Removed

  • _compile_registry

Added

  • _compile_circuit_registry, _compile_unitary_registry, _compile_stateprep_registry, _compile_statemap_registry
  • registry_workflow function now takes as a parameter a target type ('circuit', 'unitary', 'stateprep', 'statemap')

Fixed

  • Bug in bqskit/compiler/compile.py which always sets the target as Circuit(1) for targets of type UnitaryMatrix.

@mtweiden mtweiden requested a review from edyounis September 3, 2024 19:45
bqskit/compiler/registry.py Outdated Show resolved Hide resolved
bqskit/compiler/registry.py Show resolved Hide resolved
bqskit/compiler/registry.py Outdated Show resolved Hide resolved
@edyounis edyounis merged commit e4b212e into main Sep 11, 2024
9 of 10 checks passed
@edyounis edyounis deleted the typed-registry branch September 11, 2024 21:50
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.

2 participants