def populate_qubits_in_device_proto(
    qubits: Collection[cirq.Qid], out: device_pb2.DeviceSpecification
) -> None:
    """Populates `DeviceSpecification.valid_qubits` with the device's qubits.

    Args:
        qubits: The collection of the device's qubits.
        out: The `DeviceSpecification` to be populated.
    """
    out.valid_qubits.extend(v2.qubit_to_proto_id(q) for q in qubits)
Populates `DeviceSpecification.valid_qubits` with the device's qubits.

    Args:
        qubits: The collection of the device's qubits.
        out: The `DeviceSpecification` to be populated.
    
cirq-google/cirq_google/devices/known_devices.py