def __init__(
        self,
        key: cirq.TParamKey,
        start: float,
        stop: float,
        length: int,
        metadata: Any | None = None,
    ) -> None:
        """Creates a linear-spaced sweep for a given key.

        For the given args, assigns to the list of values
            start, start + (stop - start) / (length - 1), ..., stop

        Args:
            key: sympy.Symbol or equivalent to sweep across.
            start: minimum value of linear sweep.
            stop: maximum value of linear sweep.
            length: number of points in the sweep.
            metadata: Optional metadata to attach to the sweep to
                annotate the sweep or its variable.
        """
        super().__init__(key)
        self.start = start
        self.stop = stop
        self.length = length
        self.metadata = metadata
Creates a linear-spaced sweep for a given key.

        For the given args, assigns to the list of values
            start, start + (stop - start) / (length - 1), ..., stop

        Args:
            key: sympy.Symbol or equivalent to sweep across.
            start: minimum value of linear sweep.
            stop: maximum value of linear sweep.
            length: number of points in the sweep.
            metadata: Optional metadata to attach to the sweep to
                annotate the sweep or its variable.
        
cirq-core/cirq/study/sweeps.py