Skip to content

Commit

Permalink
Fix lint, backend estimator test
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Nov 28, 2023
1 parent b4c4e24 commit 9f06c82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions qiskit/providers/fake_provider/fake_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __init__(
control_flow (bool): Flag to enable control flow directives on the backend
(defaults to False).
calibrate_gates (list[str] | None): List of gate names which should contain
default calibration entries. These must be a subset of ``basis_gates``.
calibrate_gates (list[str] | None): List of gate names (subset of basis_gates)
to add default calibration entries to.
rng (np.random.Generator): Optional fixed-seed generator for default random values.
"""
Expand Down Expand Up @@ -122,7 +122,7 @@ def __init__(
if name not in self.supported_operations:
raise QiskitError(
f"Provided base gate {name} is not a supported "
f"operation ({self.supported_operations})."
f"operation ({self.supported_operations.keys()})."
)
gate = self.supported_operations[name]
noise_params = self.noise_defaults[name]
Expand Down Expand Up @@ -229,7 +229,7 @@ def add_calibrations_from_instruction_schedule_map(
"""Add calibration entries from provided pulse defaults to target.
Args:
defaults (PulseDefaults): pulse defaults with instruction schedule map
inst_map (InstructionScheduleMap): pulse defaults with instruction schedule map
Returns:
None
Expand Down Expand Up @@ -391,9 +391,8 @@ def __init__(
control_flow (bool): Flag to enable control flow directives on the backend
(defaults to False).
calibrate_gates (list[str] | None): List of gate names which should contain
default calibration entries (overriden if an ``instruction_schedule_map`` is
provided). These must be a subset of ``basis_gates``.
calibrate_gates (list[str] | None): List of gate names (subset of basis_gates)
to add default calibration entries to.
seed (int): Optional seed for generation of default values.
"""
Expand Down
2 changes: 1 addition & 1 deletion test/python/primitives/test_backend_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def test_layout(self, backend):
value = estimator.run(qc, op, shots=10000).result().values[0]

if optionals.HAS_AER and not isinstance(backend, FakeBackendSimple):
self.assertEqual(value, -0.8908)
self.assertEqual(value, -0.8902)
else:
self.assertEqual(value, -1)

Expand Down

0 comments on commit 9f06c82

Please sign in to comment.