Actions, mainly to be executed in measurement Loops.
- class qcodes.actions.BreakIf(condition)
Loop action that breaks out of the loop if a condition is truthy.
condition (Callable) – a callable taking no arguments. Can be a simple function that returns truthy when it’s time to quit
TypeError – if condition is not a callable with no aguments.
>>> BreakIf(lambda: gates.chan1.get() >= 3)
- class qcodes.actions.Task(func, *args, **kwargs)
A predefined task to be executed within a measurement Loop.
The first argument should be a callable, to which any subsequent args and kwargs (which are evaluated before the loop starts) are passed.
The args and kwargs are first evaluated if they are found to be callable.
Keyword Args passed when the Task is called are ignored, but are accepted for compatibility with other things happening in a Loop.
func (Callable) – Function to executed
*args – pass to func, after evaluation if callable
**kwargs – pass to func, after evaluation if callable
- exception qcodes.actions.UnsafeThreadingException
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class qcodes.actions.Wait(delay)
A simple class to tell a Loop to wait <delay> seconds.
This is transformed into a Task within the Loop, such that it can do other things (monitor, check for halt) during the delay.
But for use outside of a Loop, it is also callable (then it just sleeps)
delay – seconds to delay
ValueError – if delay is negative