qermit.mittask¶
- class qermit.taskgraph.mittask.MitTask(_label: str, _n_in_wires: int, _n_out_wires: int, _method: Callable)¶
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[Union[qermit.taskgraph.mittask.CircuitShots, pytket._tket.circuit.Circuit, pytket.backends.backendresult.BackendResult, pytket.backends.resulthandle.ResultHandle, qermit.taskgraph.mittask.AnsatzCircuit, qermit.taskgraph.mittask.ObservableExperiment, int, float, bool, str, pytket.utils.operators.QubitPauliOperator, Dict[pytket._tket.circuit.Qubit, pytket._tket.circuit.Bit], Dict]]) → List[Union[qermit.taskgraph.mittask.CircuitShots, pytket._tket.circuit.Circuit, pytket.backends.backendresult.BackendResult, pytket.backends.resulthandle.ResultHandle, qermit.taskgraph.mittask.AnsatzCircuit, qermit.taskgraph.mittask.ObservableExperiment, int, float, bool, str, pytket.utils.operators.QubitPauliOperator, Dict[pytket._tket.circuit.Qubit, pytket._tket.circuit.Bit], Dict]]¶
Call self as a function.
- __init__(_label: str, _n_in_wires: int, _n_out_wires: int, _method: Callable)¶
Initialize self. See help(type(self)) for accurate signature.
- __repr__()¶
Return repr(self).
- __str__()¶
Return str(self).
- __weakref__¶
list of weak references to the object (if defined)
- class qermit.taskgraph.mittask.IOTask(value)¶
Simple Node type for labelling the Input and Output Nodes to a TaskGraph object.