cirq.google.JobConfig

class cirq.google.JobConfig(project_id: Optional[str] = None, program_id: Optional[str] = None, job_id: Optional[str] = None, gcs_prefix: Optional[str] = None, gcs_program: Optional[str] = None, gcs_results: Optional[str] = None)[source]

Configuration for a program and job to run on the Quantum Engine API.

Quantum engine has two resources: programs and jobs. Programs live
under cloud projects. Every program may have many jobs, which represent
scheduled or terminated programs executions. Program and job resources have
string names. This object contains the information necessary to create a
program and then create a job on Quantum Engine, hence running the program.
Program ids are of the form
projects/project_id/programs/program_id
while job ids are of the form
projects/project_id/programs/program_id/jobs/job_id
__init__(project_id: Optional[str] = None, program_id: Optional[str] = None, job_id: Optional[str] = None, gcs_prefix: Optional[str] = None, gcs_program: Optional[str] = None, gcs_results: Optional[str] = None) → None[source]

Configuration for a job that is run on Quantum Engine.

Requires project_id.

Parameters:
  • project_id – The project id string of the Google Cloud Project to use. Programs and Jobs will be created under this project id. If this is set to None, the engine’s default project id will be used instead. If that also isn’t set, calls will fail.
  • program_id – Id of the program to create, defaults to a random version of ‘prog-ABCD’.
  • job_id – Id of the job to create, defaults to ‘job-0’.
  • gcs_prefix – Google Cloud Storage bucket and object prefix to use for storing programs and results. The bucket will be created if needed. Must be in the form “gs://bucket-name/object-prefix/”.
  • gcs_program – Explicit override for the program storage location.
  • gcs_results – Explicit override for the results storage location.

Methods

copy()