Workflow

class Workflow(passes, name='')[source]

Bases: BasePass, Sequence[BasePass]

A BQSKit workflow captures a quantum circuit compilation process.

__init__(passes, name='')[source]

Initialize a workflow object from a sequence of passes.

Parameters:
  • passes (WorkflowLike) – The passes to run in the workflow.

  • name (str) – The optional name of the workflow.

Raises:

ValueError – If passes is empty.

Attributes

name

The name of the pass.

Methods

count(value)

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.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

load(filename)

run(circuit, data)

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

save(filename)