cirq.google.EngineProgram

class cirq.google.EngineProgram(project_id: str, program_id: str, context: engine_base.EngineContext, _program: Optional[google.cloud.quantum_v1alpha1.proto.quantum_pb2.QuantumProgram] = None)[source]

A program created via the Quantum Engine API.

This program wraps a Circuit with additional metadata used to
schedule against the devices managed by Quantum Engine.
project\_id

A project_id of the parent Google Cloud Project.

program\_id

Unique ID of the program within the parent project.

__init__(project_id: str, program_id: str, context: engine_base.EngineContext, _program: Optional[google.cloud.quantum_v1alpha1.proto.quantum_pb2.QuantumProgram] = 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.

  • context – Engine configuration and context to use.

  • _program – The optional current program state.

Methods

add_labels(labels)

Adds new labels to a previously created quantum program.

create_time()

Returns when the program was created.

delete([delete_jobs])

Deletes a previously created quantum program.

description()

Returns the description of the program.

engine()

Returns the parent Engine object.

get_circuit()

Returns the cirq Circuit for the Quantum Engine program. This is only

get_job(job_id)

Returns an EngineJob for an existing Quantum Engine job.

labels()

Returns the labels of the program.

remove_labels(keys)

Removes labels with given keys from the labels of a previously

run([job_id, param_resolver, repetitions, …])

Runs the supplied Circuit via Quantum Engine.

run_sweep([job_id, params, repetitions, …])

Runs the program on the QuantumEngine.

set_description(description)

Sets the description of the program.

set_labels(labels)

Sets (overwriting) the labels for a previously created quantum

update_time()

Returns when the program was last updated.