def __init__(self, key: str | cirq.MeasurementKey, qid: cirq.Qid, index: int = 0):
        """Initializes the qubit.

        Args:
            key: The key of the measurement gate being deferred.
            qid: One qubit that is being measured. Each deferred measurement
                should create one new _MeasurementQid per qubit being measured
                by that gate.
            index: For repeated measurement keys, this represents the index of that measurement.
        """
        self._key = value.MeasurementKey.parse_serialized(key) if isinstance(key, str) else key
        self._qid = qid
        self._index = index
Initializes the qubit.

        Args:
            key: The key of the measurement gate being deferred.
            qid: One qubit that is being measured. Each deferred measurement
                should create one new _MeasurementQid per qubit being measured
                by that gate.
            index: For repeated measurement keys, this represents the index of that measurement.
        
cirq-core/cirq/transformers/measurement_transformers.py