qubic.results.tools
herald_shots(shot_dict, herald_read_ind=0, remove_herald=True)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shot_dict
|
Dict[ndarray]
|
dictionary of classified shots, indexed by qubit values have shape (n_shots, reads_per_shot) |
required |
herald_read_ind
|
int
|
index of herald read, defaults to 0 |
0
|
remove_herald
|
bool
|
if True (default), remove herald read from the data, so returned data will have shape (n_shots, reads_per_shot-1) |
True
|
Returns:
| Type | Description |
|---|---|
Dict[str, ndarray]
|
heralded shots |
Source code in qubic/results/tools.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
pack_s11_results(s11)
Convert the list of dictionaries containing downconverted/accumulated data (S11 results) from:
[{'ch': np.ndarray((n_shots, reads_per_shot))...}, {'ch': np.ndarray((n_shots, reads_per_shot))}]
to the older format:
s11 = {'ch': np.ndarray((n_circuits, n_shots, n_reads_per_shot))...}
Gaps in data (e.g. due to differing number of reads_per_shot across different circuits) are
filled with np.nan.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s11
|
List[Dict[str, S11]]
|
raw data returned by the board |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, S11]
|
|
Source code in qubic/results/tools.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |