def distance(self, other: cirq.Qid) -> float:
        """Returns the distance between two qubits.

        Args:
            other: An OctagonalQubit to which we are measuring distance.

        Returns:
            The distance between two qubits.

        Raises:
            TypeError: other qubit must be OctagonalQubit.
        """
        if type(other) != OctagonalQubit:
            raise TypeError("can only measure distance from other Octagonal qubits")
        return sqrt((self.x - other.x) ** 2 + (self.y - other.y) ** 2 + (self.z - other.z) ** 2)
Returns the distance between two qubits.

        Args:
            other: An OctagonalQubit to which we are measuring distance.

        Returns:
            The distance between two qubits.

        Raises:
            TypeError: other qubit must be OctagonalQubit.
        
cirq-rigetti/cirq_rigetti/aspen_device.py