View source on GitHub |
Parse a proto id to a cirq.GridQubit
.
cirq_google.api.v2.grid_qubit_from_proto_id(
proto_id: str
) -> cirq.GridQubit
Proto ids for grid qubits are of the form {row}_{col}
where {row}
is
the integer row of the grid qubit, and {col}
is the integer column of
the qubit.
Args | |
---|---|
proto_id
|
The id to convert. |
Returns | |
---|---|
A cirq.GridQubit corresponding to the proto id.
|
Raises | |
---|---|
ValueError
|
If the string not of the correct format. |