def distance(self, other: cirq.ops.Qid) -> float:
        """Returns the distance between two qubits in 3d."""
        if not isinstance(other, ThreeDQubit):
            raise TypeError(f"Can compute distance to another ThreeDQubit, but {other}")
        return sqrt((self.x - other.x) ** 2 + (self.y - other.y) ** 2 + (self.z - other.z) ** 2)
Returns the distance between two qubits in 3d.
cirq-pasqal/cirq_pasqal/pasqal_qubits.py