qermit.mittask#
- class qermit.taskgraph.mittask.MitTask(_label: str, _n_in_wires: int, _n_out_wires: int, _method: Callable | None = 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 (Callable) – Pure function executed when object called.
- Returns:
MitTask object for adding to TaskGraph.
- Return type:
- __call__(input_wires: List[CircuitShots | Circuit | BackendResult | ResultHandle | AnsatzCircuit | ObservableExperiment | int | float | bool | str | QubitPauliOperator | Dict[Qubit, Bit] | Dict]) List[CircuitShots | Circuit | BackendResult | ResultHandle | AnsatzCircuit | ObservableExperiment | int | float | bool | str | QubitPauliOperator | Dict[Qubit, Bit] | Dict] [source]#
Call self as a function.
- __init__(_label: str, _n_in_wires: int, _n_out_wires: int, _method: Callable | None = None)[source]#
- __weakref__#
list of weak references to the object (if defined)