-
Notifications
You must be signed in to change notification settings - Fork 47
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 timeout parameter to GreedyPauliSimp #1664
Conversation
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.
Can you add a test for the timeout?
Do the test changes in |
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.
Ahh I see. Looks great, thanks!
Description
Use std::async to add a timeout to
greedy_pauli_optimisation
.A segmentation fault was occurring when modifying the python expression held in
ClassicalExpBox
to relabel the expression bits to match a relabelling.To work around this, I've added a new argument to
Circuit::flatten_registers
,Circuit::rename_units
andFlattenRelabelRegistersPass
to optionally relabel expressions inClassicalExpBox
. This is fine for thegreedy_pauli_optimisation
case as the synthesis method does not effect the held expressions and we relabel back to the original assignment after re-synthesising the circuit.Checklist