@@ -161,7 +161,9 @@ def __init__(
161
161
None by default.
162
162
163
163
seed: Optional seed for generation of default values.
164
+
164
165
pulse_channels: If true, sets default pulse channel information on the backend.
166
+
165
167
noise_info: If true, associates gates and qubits with default noise information.
166
168
"""
167
169
@@ -179,7 +181,7 @@ def __init__(
179
181
self ._control_flow = control_flow
180
182
self ._calibrate_instructions = calibrate_instructions
181
183
self ._supported_gates = get_standard_gate_name_mapping ()
182
- self ._include_errors = noise_info
184
+ self ._noise_info = noise_info
183
185
184
186
if calibrate_instructions and not noise_info :
185
187
raise QiskitError ("Must set parameter noise_info when calibrating instructions." )
@@ -208,6 +210,8 @@ def __init__(
208
210
self ._build_generic_target ()
209
211
if pulse_channels :
210
212
self ._build_default_channels ()
213
+ else :
214
+ self .channels_map = {}
211
215
212
216
@property
213
217
def target (self ):
@@ -349,7 +353,7 @@ def _build_generic_target(self):
349
353
"""
350
354
# the qubit properties are sampled from default ranges
351
355
properties = _QUBIT_PROPERTIES
352
- if not self ._include_errors :
356
+ if not self ._noise_info :
353
357
self ._target = Target (
354
358
description = f"Generic Target with { self ._num_qubits } qubits" ,
355
359
num_qubits = self ._num_qubits ,
@@ -398,7 +402,7 @@ def _build_generic_target(self):
398
402
f"Provided basis gate { name } needs more qubits than { self .num_qubits } , "
399
403
f"which is the size of the backend."
400
404
)
401
- if self ._include_errors :
405
+ if self ._noise_info :
402
406
noise_params = self ._get_noise_defaults (name , gate .num_qubits )
403
407
self ._add_noisy_instruction_to_target (gate , noise_params , calibration_inst_map )
404
408
else :
0 commit comments