@@ -208,6 +208,7 @@ def __init__(
208
208
def __str__ (self ) -> str :
209
209
return f'Engine(project_id={ self .project_id !r} )'
210
210
211
+ @util .deprecated_gate_set_parameter
211
212
def run (
212
213
self ,
213
214
program : cirq .AbstractCircuit ,
@@ -216,7 +217,7 @@ def run(
216
217
param_resolver : cirq .ParamResolver = cirq .ParamResolver ({}),
217
218
repetitions : int = 1 ,
218
219
processor_ids : Sequence [str ] = ('xmonsim' ,),
219
- gate_set : Serializer = None ,
220
+ gate_set : Optional [ Serializer ] = None ,
220
221
program_description : Optional [str ] = None ,
221
222
program_labels : Optional [Dict [str , str ]] = None ,
222
223
job_description : Optional [str ] = None ,
@@ -262,14 +263,14 @@ def run(
262
263
params = [param_resolver ],
263
264
repetitions = repetitions ,
264
265
processor_ids = processor_ids ,
265
- gate_set = gate_set ,
266
266
program_description = program_description ,
267
267
program_labels = program_labels ,
268
268
job_description = job_description ,
269
269
job_labels = job_labels ,
270
270
)
271
271
)[0 ]
272
272
273
+ @util .deprecated_gate_set_parameter
273
274
def run_sweep (
274
275
self ,
275
276
program : cirq .AbstractCircuit ,
@@ -321,7 +322,7 @@ def run_sweep(
321
322
ValueError: If no gate set is provided.
322
323
"""
323
324
engine_program = self .create_program (
324
- program , program_id , gate_set , program_description , program_labels
325
+ program , program_id , description = program_description , labels = program_labels
325
326
)
326
327
return engine_program .run_sweep (
327
328
job_id = job_id ,
@@ -332,6 +333,7 @@ def run_sweep(
332
333
labels = job_labels ,
333
334
)
334
335
336
+ @util .deprecated_gate_set_parameter
335
337
def run_batch (
336
338
self ,
337
339
programs : Sequence [cirq .AbstractCircuit ],
@@ -402,7 +404,7 @@ def run_batch(
402
404
if not processor_ids :
403
405
raise ValueError ('Processor id must be specified.' )
404
406
engine_program = self .create_batch_program (
405
- programs , program_id , gate_set , program_description , program_labels
407
+ programs , program_id , description = program_description , labels = program_labels
406
408
)
407
409
return engine_program .run_batch (
408
410
job_id = job_id ,
@@ -413,6 +415,7 @@ def run_batch(
413
415
labels = job_labels ,
414
416
)
415
417
418
+ @util .deprecated_gate_set_parameter
416
419
def run_calibration (
417
420
self ,
418
421
layers : List ['cirq_google.CalibrationLayer' ],
@@ -481,7 +484,7 @@ def run_calibration(
481
484
if job_labels is None :
482
485
job_labels = {'calibration' : '' }
483
486
engine_program = self .create_calibration_program (
484
- layers , program_id , gate_set , program_description , program_labels
487
+ layers , program_id , description = program_description , labels = program_labels
485
488
)
486
489
return engine_program .run_calibration (
487
490
job_id = job_id ,
@@ -490,6 +493,7 @@ def run_calibration(
490
493
labels = job_labels ,
491
494
)
492
495
496
+ @util .deprecated_gate_set_parameter
493
497
def create_program (
494
498
self ,
495
499
program : cirq .AbstractCircuit ,
@@ -533,6 +537,7 @@ def create_program(
533
537
self .project_id , new_program_id , self .context , new_program
534
538
)
535
539
540
+ @util .deprecated_gate_set_parameter
536
541
def create_batch_program (
537
542
self ,
538
543
programs : Sequence [cirq .AbstractCircuit ],
@@ -582,6 +587,7 @@ def create_batch_program(
582
587
self .project_id , new_program_id , self .context , new_program , result_type = ResultType .Batch
583
588
)
584
589
590
+ @util .deprecated_gate_set_parameter
585
591
def create_calibration_program (
586
592
self ,
587
593
layers : List ['cirq_google.CalibrationLayer' ],
@@ -773,6 +779,7 @@ def get_processor(self, processor_id: str) -> engine_processor.EngineProcessor:
773
779
return engine_processor .EngineProcessor (self .project_id , processor_id , self .context )
774
780
775
781
@deprecated (deadline = "v1.0" , fix = "Use get_sampler instead." )
782
+ @util .deprecated_gate_set_parameter
776
783
def sampler (
777
784
self , processor_id : Union [str , List [str ]], gate_set : Optional [Serializer ] = None
778
785
) -> engine_sampler .QuantumEngineSampler :
@@ -789,8 +796,9 @@ def sampler(
789
796
that will send circuits to the Quantum Computing Service
790
797
when sampled.
791
798
"""
792
- return self .get_sampler (processor_id , gate_set )
799
+ return self .get_sampler (processor_id )
793
800
801
+ @util .deprecated_gate_set_parameter
794
802
def get_sampler (
795
803
self , processor_id : Union [str , List [str ]], gate_set : Optional [Serializer ] = None
796
804
) -> engine_sampler .QuantumEngineSampler :
@@ -807,9 +815,7 @@ def get_sampler(
807
815
that will send circuits to the Quantum Computing Service
808
816
when sampled.
809
817
"""
810
- return engine_sampler .QuantumEngineSampler (
811
- engine = self , processor_id = processor_id , gate_set = gate_set
812
- )
818
+ return engine_sampler .QuantumEngineSampler (engine = self , processor_id = processor_id )
813
819
814
820
815
821
def get_engine (project_id : Optional [str ] = None ) -> Engine :
0 commit comments