1313# limitations under the License.
1414"""Metadata subtype for 2D Homogenous devices."""
1515
16- from typing import TYPE_CHECKING , cast , Optional , FrozenSet , Iterable , Tuple , Dict
16+ from typing import TYPE_CHECKING , cast , FrozenSet , Iterable , Mapping , Optional , Tuple
1717
1818import networkx as nx
1919from cirq import value
@@ -31,7 +31,7 @@ def __init__(
3131 self ,
3232 qubit_pairs : Iterable [Tuple ['cirq.GridQubit' , 'cirq.GridQubit' ]],
3333 gateset : 'cirq.Gateset' ,
34- gate_durations : Optional [Dict ['cirq.GateFamily' , 'cirq.Duration' ]] = None ,
34+ gate_durations : Optional [Mapping ['cirq.GateFamily' , 'cirq.Duration' ]] = None ,
3535 all_qubits : Optional [Iterable ['cirq.GridQubit' ]] = None ,
3636 compilation_target_gatesets : Iterable ['cirq.CompilationTargetGateset' ] = (),
3737 ):
@@ -147,7 +147,7 @@ def compilation_target_gatesets(self) -> Tuple['cirq.CompilationTargetGateset',
147147 return self ._compilation_target_gatesets
148148
149149 @property
150- def gate_durations (self ) -> Optional [Dict ['cirq.GateFamily' , 'cirq.Duration' ]]:
150+ def gate_durations (self ) -> Optional [Mapping ['cirq.GateFamily' , 'cirq.Duration' ]]:
151151 """Get a dictionary mapping from gate family to duration for gates.
152152
153153 To look up the duration of a specific gate instance / gate type / operation which is part of
0 commit comments