def create_job(
        self,
        serialized_program: cirq_ionq.SerializedProgram,
        repetitions: int | None = None,
        target: str | None = None,
        name: str | None = None,
        extra_query_params: dict | None = None,
    ) -> dict:
        """Create a job.

        Args:
            serialized_program: The `cirq_ionq.SerializedProgram` containing the serialized
                information about the circuit to run.
            repetitions: The number of times to repeat the circuit. For simulation the repeated
                sampling is not done on the server, but is passed as metadata to be recovered
                from the returned job.
            target: If supplied the target to run on. Supports one of `qpu` or `simulator`. If not
                set, uses `default_target`.
            name: An optional name of the job. Different than the `job_id` of the job.
            extra_query_params: Specify any parameters to include in the request.

        Returns:
            The json body of the response as a dict. This does not contain populated information
            about the job, but does contain the job id.

        Raises:
            An IonQException if the request fails.
        """
        actual_target = self._target(target)

        json: dict[str, Any] = {
            'target': actual_target,
            'lang': 'json',
            'body': serialized_program.body,
        }
        if name:
            json['name'] = name
        # We have to pass measurement keys through the metadata.
        json['metadata'] = serialized_program.metadata
        if serialized_program.settings:
            json['settings'] = serialized_program.settings

        # Shots are ignored by simulator, but pass them anyway.
        json['shots'] = str(repetitions)
        # API does not return number of shots so pass this through as metadata.
        json['metadata']['shots'] = str(repetitions)

        if serialized_program.error_mitigation:
            json['error_mitigation'] = serialized_program.error_mitigation

        if extra_query_params is not None:
            json.update(extra_query_params)

        def request():
            return requests.post(f'{self.url}/jobs', json=json, headers=self.headers)

        return self._make_request(request, json).json()
Create a job.

        Args:
            serialized_program: The `cirq_ionq.SerializedProgram` containing the serialized
                information about the circuit to run.
            repetitions: The number of times to repeat the circuit. For simulation the repeated
                sampling is not done on the server, but is passed as metadata to be recovered
                from the returned job.
            target: If supplied the target to run on. Supports one of `qpu` or `simulator`. If not
                set, uses `default_target`.
            name: An optional name of the job. Different than the `job_id` of the job.
            extra_query_params: Specify any parameters to include in the request.

        Returns:
            The json body of the response as a dict. This does not contain populated information
            about the job, but does contain the job id.

        Raises:
            An IonQException if the request fails.
        
cirq-ionq/cirq_ionq/ionq_client.py