RestoreIntermediatePass

class RestoreIntermediatePass(project_directory, load_blocks=True)[source]

Bases: BasePass

__init__(project_directory, load_blocks=True)[source]

Constructor for the RestoreIntermediatePass.

Parameters:
  • project_directory (str) – Path to the checkpoint block files. This directory must also contain a valid “structure.pickle” file.

  • load_blocks (bool) – If True, blocks in the project directory will be loaded to the block_list during the constructor. Otherwise the user must explicitly call load_blocks() themselves. Defaults to True.

Raises:

ValueError – If project_directory does not exist or if structure.pickle is invalid.

Attributes

name

The name of the pass.

Methods

execute(*args, **kwargs)

Map a function over iterable arguments in parallel.

get_connectivity(_, data)

Retrieve the current connectivity of the circuit.

get_model(_, data)

Retrieve the machine model from the data dictionary.

get_placement(_, data)

Retrieve the logical to physical qubit map from the data dictionary.

get_target(_, data)

Retrieve the target from the data dictionary.

in_parallel(data)

Return true if pass is being executed in a parallel.

reload_blocks()

Updates the block_list variable with the current contents of the proj_dir.

run(circuit, data)

Perform the pass's operation, see BasePass for more info.