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

Hash structure of only multi-qubit gates #221

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

mtweiden
Copy link
Contributor

The hash_structure function in the SeedLayerGenerator assigns a unique hash to each circuit structure. Due to possible mismatches between the 1Q gates used in seed circuits and the 1Q gates used in the internal layer_gen, synthesis may revisit the same structure many times.

Example:
A seed circuit with CNOTs at locations [(0,1), (1,2), (1,2)] has U3 gates after each CNOT application. Depending on the layer generator assigned by _get_layer_gen in QSearch, multiple 1Q gates may follow each of the U3 gates. These extra 1Q gates impact the circuit structure's hash so that the same structure may be revisited multiple times. This change ensures that only multi-qubit gates are involved in determining the hash of the circuit's structure.

@mtweiden mtweiden requested a review from edyounis January 29, 2024 20:24
@mtweiden mtweiden merged commit d835de3 into runtime-cache Feb 15, 2024
1 of 17 checks passed
@mtweiden mtweiden deleted the hash-structure-2Q branch February 15, 2024 01:19
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