-
Notifications
You must be signed in to change notification settings - Fork 121
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
Check reservation status for a list of processors #140
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.
Thanks for adding this!
for time_slot in processor.get_schedule(): | ||
try: | ||
time_slot = EngineTimeSlot.from_proto(time_slot) | ||
# Parsing the end_time of the last time range in the schedule might give throw an error. |
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 expected? This seems like a problem. I am not sure we should just ignore ValueError blindly.
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.
It seems to be a problem in the EngineTimeSlot.from_proto function in cirq. For example, the end time of the last interval in the schedule has
end_time {
seconds: 253402300799
}
which raises ValueError: year 0 is out of range
when trying to parse it with the datetime library.
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.
Ok, I will go and fix this in cirq. Let's add a TODO (and ideally, a github issue) to go back and fix this.
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.
Added a TODO, and created an issue in cirq: quantumlib/Cirq#3787
32b7e84
to
60e6985
Compare
for time_slot in processor.get_schedule(): | ||
try: | ||
time_slot = EngineTimeSlot.from_proto(time_slot) | ||
# Parsing the end_time of the last time range in the schedule might give throw an error. |
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.
Ok, I will go and fix this in cirq. Let's add a TODO (and ideally, a github issue) to go back and fix this.
* Add reservation status check function * Check reservation wip * Add tests for get_available_processors * Break lines in comments * Fix tests * Use the correct processor id and convert QuantumTimeSlot to EngineTimeSlot * address comments * Add test for other project id * Add TODO for time range parsing problem
quantumlib/unitary#50