quantify_scheduler.gettables

Module containing Gettables for use with quantify-scheduler.

Warning

The gettable module is expected to change significantly as the acquisition protocols (#36 and #80) get fully supported by the scheduler. Currently different Gettables are required for different acquisition modes. The intent is to have one generic ScheduleGettable. Expect breaking changes.

Module Contents

Classes

ScheduleGettable

Generic gettable for a quantify schedule using vector (I,Q) acquisition. Can be

Functions

_evaluate_parameter_dict(→ Dict[str, Any])

Loop over the keys and values in a dict and replaces parameters with their current

Attributes

logger

logger[source]
class ScheduleGettable(quantum_device: quantify_scheduler.device_under_test.quantum_device.QuantumDevice, schedule_function: Callable[Ellipsis, quantify_scheduler.Schedule], schedule_kwargs: Dict[str, Any], num_channels: int = 1, data_labels: Optional[List[str]] = None, real_imag: bool = True, batched: bool = False, max_batch_size: int = 1024, always_initialize=True)[source]

Generic gettable for a quantify schedule using vector (I,Q) acquisition. Can be set to return either static (demodulated) I and Q values or magnitude and phase.

The gettable evaluates the parameters passed as schedule_kwargs, then generates the quantify_scheduler.schedules.schedule.Schedule using the schedule_function, this is then compiled and finally executed by the InstrumentCoordinator.

property compiled_schedule: quantify_scheduler.Schedule[source]

Return the schedule used in this class

__call__() Union[Tuple[float, Ellipsis], Tuple[numpy.ndarray, Ellipsis]][source]

Acquire and return data

_compile(sched)[source]

Compile schedule, separated to allow for profiling compilation duration.

initialize()[source]

This generates the schedule and uploads the compiled instructions to the hardware using the instrument coordinator.

get() Union[Tuple[float, Ellipsis], Tuple[numpy.ndarray, Ellipsis]][source]

Start the experimental sequence and retrieve acquisition data.

Returns

The acquired I/Q voltage signal as a complex number, split into a tuple of floats: either real/imaginary parts or magnitude/phase, depending on whether real_imag is True.

process_acquired_data(acquired_data, acq_metadata: quantify_scheduler.helpers.schedule.AcquisitionMetadata, repetitions: int) Union[Tuple[float, Ellipsis], Tuple[numpy.ndarray, Ellipsis]][source]

Reshapes the data as returned from the instrument coordinator into the form accepted by the measurement control.

generate_diagnostics_report(execute_get: bool = False, update: bool = False) str[source]

Create a report that saves all information contained in this ScheduleGettable and save it in the quantify datadir with its own tuid. The information in the report includes the generated schedule, device config, hardware config and snapshot of the instruments.

Parameters
  • execute_get – When True, executes self.get() before generating the report.

  • update – When True, updates all parameters before saving the snapshot.

Returns

The tuid of the generated report.

_evaluate_parameter_dict(parameters: Dict[str, Any]) Dict[str, Any][source]

Loop over the keys and values in a dict and replaces parameters with their current value.

Parameters

parameters – A dictionary containing a mix of Parameters and normal values.

Returns

The parameters dictionary, but with the parameters replaced by their current value.

Raises

TypeError – If a parameter returns None