View source on GitHub |
Return a proto id for a cirq.Qid
.
cirq_google.api.v2.qubit_to_proto_id(
q: cirq.Qid
) -> str
For cirq.GridQubit
s this id {row}_{col}
where {row}
is the integer
row of the grid qubit, and {col}
is the integer column of the qubit.
For cirq.NamedQubit
s this id is the name.
For cirq.LineQubit
s this is string of the x
attribute.