Skip to content

Commit 4985a51

Browse files
authored
Remove EngineTimeSlot (#4608)
- 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).
1 parent bb4468c commit 4985a51

File tree

6 files changed

+2
-299
lines changed

6 files changed

+2
-299
lines changed

cirq-google/cirq_google/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
EngineJob,
7272
EngineProgram,
7373
EngineProcessor,
74-
EngineTimeSlot,
7574
ProtoVersion,
7675
QuantumEngineSampler,
7776
get_engine,

cirq-google/cirq_google/engine/__init__.py

-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@
4545
EngineProcessor,
4646
)
4747

48-
from cirq_google.engine.engine_timeslot import (
49-
EngineTimeSlot,
50-
)
51-
5248
from cirq_google.engine.engine_program import (
5349
EngineProgram,
5450
)

cirq-google/cirq_google/engine/engine_processor.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from cirq_google.api import v2
2323
from cirq_google.devices import serializable_device
2424
from cirq_google.engine import calibration
25-
from cirq_google.engine.engine_timeslot import EngineTimeSlot
2625
from cirq_google.serialization.serializable_gate_set import SerializableGateSet
2726

2827
if TYPE_CHECKING:
@@ -277,7 +276,7 @@ def list_reservations(
277276
self,
278277
from_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(),
279278
to_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(weeks=2),
280-
) -> List[EngineTimeSlot]:
279+
) -> List[qenums.QuantumTimeSlot]:
281280
"""Retrieves the reservations from a processor.
282281
283282
Only reservations from this processor and project will be
@@ -307,7 +306,7 @@ def get_schedule(
307306
from_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(),
308307
to_time: Union[None, datetime.datetime, datetime.timedelta] = datetime.timedelta(weeks=2),
309308
time_slot_type: Optional[qenums.QuantumTimeSlot.TimeSlotType] = None,
310-
) -> List[EngineTimeSlot]:
309+
) -> List[qenums.QuantumTimeSlot]:
311310
"""Retrieves the schedule for a processor.
312311
313312
The schedule may be filtered by time.

cirq-google/cirq_google/engine/engine_timeslot.py

-101
This file was deleted.

cirq-google/cirq_google/engine/engine_timeslot_test.py

-189
This file was deleted.

cirq-google/cirq_google/json_test_data/spec.py

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
'EngineJob',
3838
'EngineProcessor',
3939
'EngineProgram',
40-
'EngineTimeSlot',
4140
'FSimPhaseCorrections',
4241
'NAMED_GATESETS',
4342
'ProtoVersion',

0 commit comments

Comments
 (0)