13
13
# limitations under the License.
14
14
"""Metadata subtype for 2D Homogenous devices."""
15
15
16
- from typing import TYPE_CHECKING , cast , Optional , FrozenSet , Iterable , Tuple , Dict
16
+ from typing import TYPE_CHECKING , cast , FrozenSet , Iterable , Mapping , Optional , Tuple
17
17
18
18
import networkx as nx
19
19
from cirq import value
@@ -31,7 +31,7 @@ def __init__(
31
31
self ,
32
32
qubit_pairs : Iterable [Tuple ['cirq.GridQubit' , 'cirq.GridQubit' ]],
33
33
gateset : 'cirq.Gateset' ,
34
- gate_durations : Optional [Dict ['cirq.GateFamily' , 'cirq.Duration' ]] = None ,
34
+ gate_durations : Optional [Mapping ['cirq.GateFamily' , 'cirq.Duration' ]] = None ,
35
35
all_qubits : Optional [Iterable ['cirq.GridQubit' ]] = None ,
36
36
compilation_target_gatesets : Iterable ['cirq.CompilationTargetGateset' ] = (),
37
37
):
@@ -147,7 +147,7 @@ def compilation_target_gatesets(self) -> Tuple['cirq.CompilationTargetGateset',
147
147
return self ._compilation_target_gatesets
148
148
149
149
@property
150
- def gate_durations (self ) -> Optional [Dict ['cirq.GateFamily' , 'cirq.Duration' ]]:
150
+ def gate_durations (self ) -> Optional [Mapping ['cirq.GateFamily' , 'cirq.Duration' ]]:
151
151
"""Get a dictionary mapping from gate family to duration for gates.
152
152
153
153
To look up the duration of a specific gate instance / gate type / operation which is part of
0 commit comments