-
Notifications
You must be signed in to change notification settings - Fork 48
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
Timeout GreedyPauliSimp
#1684
Timeout GreedyPauliSimp
#1684
Conversation
std::queue< | ||
std::pair<std::future<Circuit>, std::shared_ptr<std::atomic<bool>>>> | ||
all_threads; |
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.
Is this needed?
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.
not anymore!
c.decompose_boxes_recursively(); | ||
circuits.push_back(c); | ||
} else { | ||
// If the thread is not ready, move it to the back of the queue |
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 elaborate on this comment?
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.
Ah, it's actually outdated from an earlier version with the multithreading - I can remove it
pytket/binders/transform.cpp
Outdated
"\n:param timeout: Sets maximum out of time spent finding solution." | ||
"\n:param thread_timeout: Sets maximum out of time spent finding a " | ||
"single solution in one thread." | ||
"\n:param trials: Sets maximum number of found solutions." |
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.
Maybe explain what qualifies as the best solution?
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.
Yeah good point, have done
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.
Only one issue with the docs, and we also need to update the stubs.
pytket/binders/transform.cpp
Outdated
"\n:param trials: Sets maximum number of found solutions. The " | ||
"circuit " | ||
"smallest circuit is returned, priorising the number of 2qb-gates, " | ||
"then " | ||
"gates, then depth." |
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.
Also add this to passes.cpp
?
The lines are quite jumbled. The circuit smallest circuit is returned
should be The smallest circuit is returned
.
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.
done!
Still need to update the stubs |
Oops done, sorry forgot to push |
Add
trials
option toGreedyPauliSimp
, running multiple attempts atGreedyPauliSimp
and returning the "smallest" circuit.Checklist