Data Handling¶
-
qucumber.utils.data.
extract_refbasis_samples
(train_samples, train_bases)[source]¶ Extract the reference basis samples from the data.
- Parameters
train_samples (torch.Tensor) – The training samples.
train_bases (numpy.ndarray) – The bases of the training samples.
- Returns
The samples in the data that are only in the reference basis.
- Return type
-
qucumber.utils.data.
load_data
(tr_samples_path, tr_psi_path=None, tr_bases_path=None, bases_path=None)[source]¶ Load the data required for training.
- Parameters
- Returns
A list of all input parameters.
- Return type
-
qucumber.utils.data.
load_data_DM
(tr_samples_path, tr_mtx_real_path=None, tr_mtx_imag_path=None, tr_bases_path=None, bases_path=None)[source]¶ Load the data required for training.
- Parameters
tr_samples_path (str) – The path to the training data.
tr_mtx_real_path (str) – The path to the real part of the density matrix
tr_mtx_imag_path (str) – The path to the imaginary part of the density matrix
tr_bases_path (str) – The path to the basis data.
bases_path (str) – The path to a file containing all possible bases used in the tr_bases_path file.
- Returns
A list of all input parameters, with the real and imaginary parts of the target density matrix (if provided) combined into one complex matrix.
- Return type