def __init__(self, octagon_position: int):
        r"""Initializes an `OctagonalQubit` using indices 0-7.
              4  - 3
            /        \
          5           2
          |           |
          6           1
            \       /
              7 - 0

        Args:
            octagon_position: Position within octagon, indexed as pictured above.

        Returns:
            The initialized `OctagonalQubit`.

        Raises:
            ValueError: If the position specified is greater than 7.
        """
        if octagon_position >= 8:
            raise ValueError(f'OctagonQubit must be less than 8, received {octagon_position}')

        self._octagon_position = octagon_position
        self.index = octagon_position
Initializes an `OctagonalQubit` using indices 0-7.
              4  - 3
            /        \
          5           2
          |           |
          6           1
            \       /
              7 - 0

        Args:
            octagon_position: Position within octagon, indexed as pictured above.

        Returns:
            The initialized `OctagonalQubit`.

        Raises:
            ValueError: If the position specified is greater than 7.
        
cirq-rigetti/cirq_rigetti/aspen_device.py