cirq.google.EngineJob

class cirq.google.EngineJob(project_id: str, program_id: str, job_id: str, context: engine_base.EngineContext, _job: Optional[google.cloud.quantum_v1alpha1.proto.quantum_pb2.QuantumJob] = None)[source]

A job created via the Quantum Engine API.

This job may be in a variety of states. It may be scheduling, it may be
executing on a machine, or it may have entered a terminal state
(either succeeding or failing).
project\_id

A project_id of the parent Google Cloud Project.

program\_id

Unique ID of the program within the parent project.

job\_id

Unique ID of the job within the parent program.

__init__(project_id: str, program_id: str, job_id: str, context: engine_base.EngineContext, _job: Optional[google.cloud.quantum_v1alpha1.proto.quantum_pb2.QuantumJob] = None) → None[source]

A job submitted to the engine.

Parameters
  • project_id – A project_id of the parent Google Cloud Project.

  • program_id – Unique ID of the program within the parent project.

  • job_id – Unique ID of the job within the parent program.

  • context – Engine configuration and context to use.

  • _job – The optional current job state.

Methods

add_labels(labels)

Adds new labels to a previously created quantum job.

cancel()

Cancel the job.

create_time()

Returns when the job was created.

delete()

Deletes the job and result, if any.

description()

Returns the description of the job.

engine()

Returns the parent Engine object.

failure()

Return failure code and message of the job if present.

get_calibration()

Returns the recorded calibration at the time when the job was run, if

get_processor()

Returns the EngineProcessor for the processor the job is/was run on,

get_repetitions_and_sweeps()

Returns the repetitions and sweeps for the Quantum Engine job.

labels()

Returns the labels of the job.

processor_ids()

Returns the processor ids provided when the job was created.

program()

Returns the parent EngineProgram object.

remove_labels(keys)

Removes labels with given keys from the labels of a previously

results()

Returns the job results, blocking until the job is complete.

set_description(description)

Sets the description of the job.

set_labels(labels)

Sets (overwriting) the labels for a previously created quantum job.

status()

Return the execution status of the job.

update_time()

Returns when the job was last updated.