We're celebrating World Quantum Day 2022! Join us

cirq_google.engine.SimulatedLocalJob

A quantum job backed by a (local) sampler.

Inherits From: AbstractLocalJob, AbstractJob

This class is designed to execute a local simulator using the AbstractEngine and AbstractJob interface. This class will keep track of the status based on the sampler's results.

If the simulation type is SYNCHRONOUS, the sampler will be called once the appropriate results method is called. Other methods will be added later.

This does not support calibration requests. ` Attributes: sampler: Sampler to call for results. simulation_type: Whether sampler execution should be synchronous or asynchronous.

Methods

add_labels

View source

Adds new labels to a previously created quantum job.

Params:

  • labels: New labels to add to the existing job labels.

Returns
This AbstractJob.

batched_results

View source

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

This method is intended for batched jobs. Instead of flattening results into a single list, this will return a Sequence[Result] for each circuit in the batch.

calibration_results

View source

Returns the results of a run_calibration() call.

This function will fail if any other type of results were returned.

cancel

View source

Cancel the job.

create_time

View source

Returns when the job was created.

delete

View source

Deletes the job and result, if any.

description

View source

Returns the description of the job.

engine

View source

Returns the parent program's AbstractEngine object.

execution_status

View source

Return the execution status of the job.

failure

View source

Return failure code and message of the job if present.

get_calibration

View source

Returns the recorded calibration at the time when the job was created, from the parent Engine object.

get_processor

View source

Returns the AbstractProcessor for the processor the job is/was run on, if available, else None.

get_repetitions_and_sweeps

View source

Returns the repetitions and sweeps for the job.

Returns
A tuple of the repetition count and list of sweeps.

id

View source

Returns the identifier of this job.

labels

View source

Returns the labels of the job.

processor_ids

View source

Returns the processor ids provided when the job was created.

program

View source

Returns the parent AbstractLocalProgram object.

remove_labels

View source

Removes labels with given keys from the labels of a previously created quantum job.

Params:

  • label_keys: Label keys to remove from the existing job labels.

Returns
This AbstractJob.

results

View source

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

set_description

View source

Sets the description of the job.

Params:

  • description: The new description for the job.

Returns
This AbstractJob.

set_labels

View source

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

Params:

  • labels: The entire set of new job labels.

Returns
This AbstractJob.

update_time

View source

Returns when the job was last updated.

__getitem__

View source

__iter__

View source

__len__

View source