quantax.utils.DataTracer#

class quantax.utils.DataTracer#

The structure used to keep track of the data updates

__init__()#
property data: ndarray#

The data stored in the DataTracer

property time: ndarray#

The time stored in the DataTracer

append(data: Number, time: float | None = None)#

Append new data

Parameters:
  • data – The data to be appended

  • time – The time of the data, default to be incremental by 1 in each append

mean() Number#

Mean value of the data

uncertainty() Number | None#

Uncertainty of the data

save(file: str)#

Save data to file

save_time(file: str)#

Save time to file

plot(start: int | None = None, end: int | None = None, batch: int = 1, logx: bool = False, logy: bool = False, baseline: Number | None = None) None#

Plot the data

Parameters:
  • start – Starting index

  • end – Ending index

  • batch – Batch size. The mean value in a whole batch is one data point in the plot

  • logx – Whether to use log scale in x-axis

  • logy – Whether to use log scale in y-axis

  • baseline – Show a dashed line y=baseline