SaveIntermediatePass

class SaveIntermediatePass(path_to_save_dir, project_name=None, save_as_qasm=True)[source]

Bases: BasePass

The SaveIntermediate class.

The SaveIntermediatePass stores individual CircuitGates in pickle or qasm format.

__init__(path_to_save_dir, project_name=None, save_as_qasm=True)[source]

Constructor for the SaveIntermediatePass.

Parameters:
  • path_to_save_dir (str) – Path to the directory in which inter- qasm for circuit blocks should be saved.

  • project_name (str) – Name of the project files.

Raises:

ValueError – If path_to_save_dir is not an existing directory.

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.

run(circuit, data)

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