View source on GitHub |
Hardware metadata for homogenous 2d symmetric grid devices.
Inherits From: DeviceMetadata
cirq.GridDeviceMetadata(
qubit_pairs: Iterable[Tuple['cirq.GridQubit', 'cirq.GridQubit']],
gateset: 'cirq.Gateset',
gate_durations: Optional[Mapping['cirq.GateFamily', 'cirq.Duration']] = None,
all_qubits: Optional[Iterable['cirq.GridQubit']] = None,
compilation_target_gatesets: Iterable['cirq.CompilationTargetGateset'] = ()
)
Used in the notebooks
Used in the tutorials |
---|
Args | |
---|---|
qubit_pairs
|
Iterable of pairs of cirq.GridQubit s representing
bi-directional couplings.
|
gateset
|
cirq.Gateset indicating gates supported
everywhere on the device.
|
gate_durations
|
Optional dictionary of cirq.GateFamily
instances mapping to cirq.Duration instances for
gate timing metadata information. If provided,
all keys must exist in gateset.
|
all_qubits
|
Optional iterable specifying all qubits found on the device. If None, all_qubits will be inferred from the entries in qubit_pairs. |
compilation_target_gatesets
|
A collection of valid
cirq.CompilationTargetGateset s which can be used to
transform circuits into ones that consist of only
operations in gateset .
|
Attributes | |
---|---|
compilation_target_gatesets
|
Returns a sequence of valid cirq.CompilationTargetGateset s for this device.
|
gate_durations
|
Get a dictionary mapping from gate family to duration for gates.
To look up the duration of a specific gate instance / gate type / operation which is part of the device's gateset, you can search for its corresponding GateFamily. For example:
|
gateset
|
Returns the cirq.Gateset of supported gates on this device.
|
isolated_qubits
|
Returns the set of all isolated qubits on the device (if applicable). |
nx_graph
|
Returns a nx.Graph where nodes are qubits and edges are couple-able qubits. |
qubit_pairs
|
Returns the set of all couple-able qubits on the device.
Each element in the outer frozenset is a 2-element frozenset representing a bidirectional pair. |
qubit_set
|
Returns the set of grid qubits on the device. |
Methods
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool