qubic.pygsti.job_manager
PyGSTiJobManager
Bases: JobManager
Wrapper around JobManager class for compiling and running PyGSTi circuits
Source code in qubic/pygsti/job_manager.py
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 45 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
build_and_run_circuits(pygsti_circuits, qubit_map, n_total_shots, outputs=['pygsti_results'], compiler_flags=None, gateware_twirl=False, fit_gmm=False, reads_per_shot=1, qchip=None, delay_before_circuit=0.0005, reload_cmd=True, reload_freq=True, reload_env=True, zero_between_reload=True)
Compile and run provided list of circuits. Output data products/analysis are controlled by 'output' parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pygsti_circuits
|
List[Circuit]
|
list of pygsti circuits to run |
required |
qubit_map
|
List[str] | Dict[int, str]
|
Maps pygsti quantum registers to physical qubits. If list of physical qubits, register 0 is assumed to correspond to the first element, etc. If dict, register -> qubit mapping is given directly as key value pairs. |
required |
n_total_shots
|
int
|
number of shots to run for each circuit |
required |
outputs
|
List[str]
|
list of 's11', 'shots', 'pygsti_results', and/or 'counts' |
['pygsti_results']
|
compiler_flags
|
Dict[str, bool] | CompilerFlags
|
see CompilerFlags definition for allowed keys |
None
|
gateware_twirl
|
|
False
|
|
fit_gmm
|
bool
|
|
False
|
qchip
|
QChip
|
if provided, override self.qchip for compilation |
None
|
reads_per_shot
|
int
|
number of reads (measurements) per qubit in each instruction |
1
|
reload_cmd
|
bool
|
|
True
|
reload_freq
|
bool
|
|
True
|
reload_env
|
bool
|
|
True
|
zero_between_reload
|
bool
|
|
True
|
Returns:
| Type | Description |
|---|---|
dict
|
results with keys/types matching the provided 'outputs' |
Source code in qubic/pygsti/job_manager.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
map_results(circuits, batchcounts, label_to_qubit)
Convert native list of CircuitCounts objects to a PyGSTi Dataset object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuits
|
List[Circuit]
|
|
required |
batchcounts
|
List[CircuitCounts]
|
|
required |
label_to_qubit
|
list or dict
|
mapping from pygsti registers (indices) to physical qubits |
required |
Source code in qubic/pygsti/job_manager.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |