quast_decisiontree.core.backend
quast_decisiontree.core.backend
contains the class representing quantum backends
Backend
Bases: UserDict
class representing a quantum computing backend.
Can be used like a dictionary from the outside, but also be extended with further attributes
Source code in src/quast_decisiontree/core/backend.py
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 | |
DEFAULT_SHOTS
class-attribute
instance-attribute
DEFAULT_SHOTS = 1024
has_submit
property
has_submit
Whether this backend has a submit function attached.
default_shots
property
writable
default_shots
name
property
writable
name
description
property
description
provider_node
property
writable
provider_node
__init__
__init__(submit_func=None, default_shots=None, **kwargs)
Source code in src/quast_decisiontree/core/backend.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
run
run(circuit, shots=None)
Submit a single circuit.
Source code in src/quast_decisiontree/core/backend.py
41 42 43 44 45 46 47 | |
run_batch
run_batch(circuits, shots=None)
Submit multiple circuits.
Source code in src/quast_decisiontree/core/backend.py
49 50 51 | |
__call__
__call__(circuit, shots=None)
Source code in src/quast_decisiontree/core/backend.py
53 54 | |
BackendProvider
Bases: UserList
provides lookup for backends
Source code in src/quast_decisiontree/core/backend.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
default
property
writable
default
names
property
names
has_unique_names
property
has_unique_names
provider_nodes
property
provider_nodes
__getitem__
__getitem__(ind_or_name)
Source code in src/quast_decisiontree/core/backend.py
98 99 100 101 102 | |
get_backend
get_backend(name, filter=None, return_first=False)
searches for a backend of that name, throwing an error if no results are found, or multiple results are found. Optionally filters the backends first. If return_first is True, returns the first backend found with that name.
Source code in src/quast_decisiontree/core/backend.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
filter
filter(filter)
filters the backends. Filter clauses are given either as key:value or key:[value1, value2...]
The former selects all backends with the correct key-value pairs, the latter is interpreted as an or-clause, returning all backends containing one of (key, value1), (key, value2) etc. When the filter dictionary contains multiple entries, they are combined in an and-fashion.
Source code in src/quast_decisiontree/core/backend.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |