1- # Copyright 2021  Google 
1+ # Copyright 2022  Google 
22# 
33# Licensed under the Apache License, Version 2.0 (the "License"); 
44# you may not use this file except in compliance with the License. 
1212# See the License for the specific language governing permissions and 
1313# limitations under the License. 
1414
15- from  typing  import  Sequence , Tuple , List 
15+ from  typing  import  Sequence , Tuple , List ,  Iterator 
1616
1717import  cirq 
1818import  functools 
@@ -167,7 +167,7 @@ def simulate_dtc_circuit_list_sweep(
167167    circuit_list : Sequence [cirq .Circuit ],
168168    param_resolvers : Sequence [cirq .ParamResolver ],
169169    qubit_order : Sequence [cirq .Qid ],
170- ):
170+ )  ->   Iterator [ np . ndarray ] :
171171    """Simulate a dtc circuit list over a sweep of param_resolvers 
172172
173173    Args: 
@@ -245,7 +245,7 @@ def get_polarizations(
245245    return  polarizations 
246246
247247
248- def  signal_ratio (zeta_1 : np .ndarray , zeta_2 : np .ndarray ):
248+ def  signal_ratio (zeta_1 : np .ndarray , zeta_2 : np .ndarray )  ->   np . ndarray :
249249    """Calculate signal ratio between two signals 
250250
251251    Args: 
@@ -266,7 +266,7 @@ def simulate_for_polarizations(
266266    circuit_list : Sequence [cirq .Circuit ],
267267    autocorrelate : bool  =  True ,
268268    take_abs : bool  =  False ,
269- ):
269+ )  ->   np . ndarray :
270270    """Simulate and get polarizations for a single DTCExperiment and circuit list 
271271
272272    Args: 
@@ -324,7 +324,7 @@ def run_comparison_experiment(
324324    autocorrelate : bool  =  True ,
325325    take_abs : bool  =  False ,
326326    ** kwargs ,
327- ):
327+ )  ->   Iterator [ np . ndarray ] :
328328    """Run comparison experiment 
329329
330330    Args: 
0 commit comments