-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow flattening of subcircuits #4997
Conversation
I find the name "flatten_repetitions" somewhat confusing. Could we name this something different, perhaps "use_repetition_ids" with default Also, we could in the future change the default behavior so that specifying |
@95-martin-orion checking whether you saw this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good apart from some naming issues, and doesn't look like it conflicts with #5014 which is convenient.
Apologies for the delay, wanted to first make sure the fix for #5000 wouldn't break this (which it looks like it doesn't) |
* Allow flattening of subcircuits * format * Add serialization logic and tests * Change flatten_repetitions (default False) to use_repetition_ids (default True) * Add shape tests for simulation results from flattened subcircuits * docs * address PR comments * Add json test for use_repetition_ids
* Allow flattening of subcircuits * format * Add serialization logic and tests * Change flatten_repetitions (default False) to use_repetition_ids (default True) * Add shape tests for simulation results from flattened subcircuits * docs * address PR comments * Add json test for use_repetition_ids
* Allow flattening of subcircuits * format * Add serialization logic and tests * Change flatten_repetitions (default False) to use_repetition_ids (default True) * Add shape tests for simulation results from flattened subcircuits * docs * address PR comments * Add json test for use_repetition_ids
Add a
CircuitOperation.use_repetition_ids
option that when False, flattens the keys of measurements in the subcircuit, making them repeated keys instead of distinct per repetition.Step 5 of #4274 (comment). (@95-martin-orion @maffoo does this close the issue? It looks like everything else is complete. If so, I'll add the flag here)