def run(
        self,
        program: cirq.AbstractCircuit,
        param_resolver: cirq.ParamResolverOrSimilarType = None,
        repetitions: int = 1,
    ) -> cirq.Result:
        """Samples from the given `Circuit`.

        This mode of operation for a sampler will provide results
        in the form of measurement outcomes.  It will not provide
        access to state vectors (even if the underlying
        sampling mechanism is a simulator).  This method will substitute
        parameters in the `param_resolver` attributes for `sympy.Symbols`
        used within the Circuit.  This circuit will be executed a number
        of times specified in the `repetitions` attribute, though some
        simulated implementations may instead sample from the final
        distribution rather than execute the circuit each time.

        Args:
            program: The circuit to sample from.
            param_resolver: Parameters to run with the program.
            repetitions: The number of times to sample.

        Returns:
            `cirq.Result` that contains all the measurements for a run.
        """
        return self.run_sweep(program, param_resolver, repetitions)[0]
Samples from the given `Circuit`.

        This mode of operation for a sampler will provide results
        in the form of measurement outcomes.  It will not provide
        access to state vectors (even if the underlying
        sampling mechanism is a simulator).  This method will substitute
        parameters in the `param_resolver` attributes for `sympy.Symbols`
        used within the Circuit.  This circuit will be executed a number
        of times specified in the `repetitions` attribute, though some
        simulated implementations may instead sample from the final
        distribution rather than execute the circuit each time.

        Args:
            program: The circuit to sample from.
            param_resolver: Parameters to run with the program.
            repetitions: The number of times to sample.

        Returns:
            `cirq.Result` that contains all the measurements for a run.
        
cirq-core/cirq/work/sampler.py