Skip to content

Commit

Permalink
Remove EngineTimeSlot (#4608)
Browse files Browse the repository at this point in the history
- It looks like this wrapper got created but never used.
- It does not provide much value over the proto values directly,
so I am just going to delete it.
- This also fixes the typing which incorrectly says that the
schedule is returned as a EngineTimeSlot, but it is actually a
QuantumTimeSlot.

While technically a breaking change, it would be quite surprising
if anyone is dependent on this wrapper class, as it has never been used
anywhere.

BREAKING CHANGE=Removed EngineTimeSlot without deprecation, (minimal to no usage).
  • Loading branch information
dstrain115 authored Nov 1, 2021
1 parent bb4468c commit 4985a51
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 299 deletions.
1 change: 0 additions & 1 deletion cirq-google/cirq_google/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
EngineJob,
EngineProgram,
EngineProcessor,
EngineTimeSlot,
ProtoVersion,
QuantumEngineSampler,
get_engine,
Expand Down
4 changes: 0 additions & 4 deletions cirq-google/cirq_google/engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
EngineProcessor,
)

from cirq_google.engine.engine_timeslot import (
EngineTimeSlot,
)

from cirq_google.engine.engine_program import (
EngineProgram,
)
Expand Down
5 changes: 2 additions & 3 deletions cirq-google/cirq_google/engine/engine_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from cirq_google.api import v2
from cirq_google.devices import serializable_device
from cirq_google.engine import calibration
from cirq_google.engine.engine_timeslot import EngineTimeSlot
from cirq_google.serialization.serializable_gate_set import SerializableGateSet

if TYPE_CHECKING:
Expand Down Expand Up @@ -277,7 +276,7 @@ def list_reservations(
self,
from_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(),
to_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(weeks=2),
) -> List[EngineTimeSlot]:
) -> List[qenums.QuantumTimeSlot]:
"""Retrieves the reservations from a processor.
Only reservations from this processor and project will be
Expand Down Expand Up @@ -307,7 +306,7 @@ def get_schedule(
from_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(),
to_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(weeks=2),
time_slot_type: Optional[qenums.QuantumTimeSlot.TimeSlotType] = None,
) -> List[EngineTimeSlot]:
) -> List[qenums.QuantumTimeSlot]:
"""Retrieves the schedule for a processor.
The schedule may be filtered by time.
Expand Down
101 changes: 0 additions & 101 deletions cirq-google/cirq_google/engine/engine_timeslot.py

This file was deleted.

189 changes: 0 additions & 189 deletions cirq-google/cirq_google/engine/engine_timeslot_test.py

This file was deleted.

1 change: 0 additions & 1 deletion cirq-google/cirq_google/json_test_data/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
'EngineJob',
'EngineProcessor',
'EngineProgram',
'EngineTimeSlot',
'FSimPhaseCorrections',
'NAMED_GATESETS',
'ProtoVersion',
Expand Down

0 comments on commit 4985a51

Please sign in to comment.