![]() |
THIS CLASS IS DEPRECATED.
cirq_google.devices.XmonDevice(
*args, **kwargs
)
IT WILL BE REMOVED IN cirq v0.15
.
XmonDevice will no longer be supported.
Args | |
---|---|
measurement_duration
|
The maximum duration of a measurement. |
exp_w_duration
|
The maximum duration of an ExpW operation. |
exp_11_duration
|
The maximum duration of an ExpZ operation. |
qubits
|
Qubits on the device, identified by their x, y location. |
Attributes | |
---|---|
metadata
|
Return the metadata for this device |
Methods
at
at(
row: int, col: int
) -> Optional[cirq.GridQubit]
Returns the qubit at the given position, if there is one, else None.
can_add_operation_into_moment
can_add_operation_into_moment(
operation: cirq.Operation, moment: cirq.Moment
) -> bool
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.15
.
can_add_operation_into_moment will be removed in the future. Consider using device.validate_circuit instead.
Determines if it's possible to add an operation into a moment.
For example, on the XmonDevice two CZs shouldn't be placed in the same
moment if they are on adjacent qubits.
Args:
operation: The operation being added.
moment: The moment being transformed.
Returns:
Whether or not the moment will validate after adding the operation.
col
col(
col: int
) -> cirq_google.line.placement.anneal.LineSequence
Returns the qubits in the given column, in ascending order.
decompose_operation
decompose_operation(
operation: cirq.Operation
) -> cirq.OP_TREE
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.15
.
XmonDevice.decompose_operation is deprecated. Please use cirq.optimize_for_target_gateset() and cirq.CZTargetGateset.
duration_of
duration_of(
operation
)
is_supported_gate
@classmethod
is_supported_gate( gate: cirq.Gate )
Returns true if the gate is allowed.
neighbors_of
neighbors_of(
qubit: cirq.GridQubit
)
Returns the qubits that the given qubit can interact with.
qid_pairs
qid_pairs() -> Optional[FrozenSet['cirq.SymmetricalQidPair']]
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.15
.
qubit coupling data can now be found in device.metadata if provided.
Returns a set of qubit edges on the device, if possible.
This property can be overridden in child classes for special handling.
The default handling is: GridQids and LineQids will have neighbors as
edges, and others will be fully connected.
Returns:
If the device has a finite set of qubits, then a set of all edges
on the device is returned.
If the device has no well defined finite set of qubits (e.g.
`cirq.UnconstrainedDevice` has this property), then `None` is
returned.
qubit_set
qubit_set() -> FrozenSet[cirq.GridQubit]
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.15
.
Use metadata.qubit_set if applicable.
row
row(
row: int
) -> cirq_google.line.placement.anneal.LineSequence
Returns the qubits in the given row, in ascending order.
validate_circuit
validate_circuit(
circuit: cirq.AbstractCircuit
)
Raises an exception if a circuit is not valid.
Args | |
---|---|
circuit
|
The circuit to validate. |
Raises | |
---|---|
ValueError
|
The circuit isn't valid for this device. |
validate_gate
validate_gate(
gate: cirq.Gate
)
Raises an error if the given gate isn't allowed.
Raises | |
---|---|
ValueError
|
Unsupported gate. |
validate_moment
validate_moment(
moment: cirq.Moment
)
Raises an exception if a moment is not valid.
Args | |
---|---|
moment
|
The moment to validate. |
Raises | |
---|---|
ValueError
|
The moment isn't valid for this device. |
validate_operation
validate_operation(
operation: cirq.Operation
)
Raises an exception if an operation is not valid.
Args | |
---|---|
operation
|
The operation to validate. |
Raises | |
---|---|
ValueError
|
The operation isn't valid for this device. |
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool