qermit.mittask

class qermit.taskgraph.mittask.MitTask(_label, _n_in_wires, _n_out_wires, _method=None)[source]

An object a TaskGraph node is comprised of. A MitTask object is defined by the _method attribute, which holds a pure function that requires _n_in_wires input arguments and returns a Tuple of _n_out_wires objects. The object callable is defined as the _method attribute.

Parameters:
  • _label (str) – String to identify MitTask object by.

  • _n_in_wires (int) – Number of input arguments to _method attribute function.

  • _n_out_wires (int) – number of results in Tuple returned by _method attribute function.

  • _method (Optional[Callable]) – Pure function executed when object called.

Returns:

MitTask object for adding to TaskGraph.

__call__(input_wires)[source]

Call self as a function.

Return type:

List[Union[CircuitShots, Circuit, BackendResult, ResultHandle, AnsatzCircuit, ObservableExperiment, int, float, bool, str, QubitPauliOperator, Dict[Qubit, Bit], Dict]]

__init__(_label, _n_in_wires, _n_out_wires, _method=None)[source]
__repr__()[source]

Return repr(self).

__str__()[source]

Return str(self).

__weakref__

list of weak references to the object (if defined)

class qermit.taskgraph.mittask.IOTask(value)[source]

Simple Node type for labelling the Input and Output Nodes to a TaskGraph object.