def to_grid_qubit(self) -> cirq.GridQubit:
        """Converts `AspenQubit` to `cirq.GridQubit`.

        Returns:
            The equivalent GridQubit.

        Raises:
            ValueError: AspenQubit cannot be converted to GridQubit.
        """
        for grid_qubit, aspen_index in _grid_qubit_mapping.items():
            if self.index == aspen_index:
                return grid_qubit
        raise ValueError(f'cannot use {self} as a GridQubit')
Converts `AspenQubit` to `cirq.GridQubit`.

        Returns:
            The equivalent GridQubit.

        Raises:
            ValueError: AspenQubit cannot be converted to GridQubit.
        
cirq-rigetti/cirq_rigetti/aspen_device.py