Skip to content

Commit

Permalink
Always set config.local to True (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseclectic authored Mar 18, 2021
1 parent 6b1ea6e commit c8fea99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions qiskit/providers/aer/backends/aerbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(self,
"""
# Init configuration and provider in BaseBackend
configuration.simulator = True
configuration.local = True
super().__init__(configuration, provider=provider)

# Initialize backend properties and pulse defaults.
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/config-local-46d47ae08eeab339.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes bug where creating a simulator from a backend would set the
``local`` attribute of the configuration to the backend value
(typically ``False``) rather than always being set to ``True``.
4 changes: 3 additions & 1 deletion test/terra/backends/test_config_pulse_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def test_from_backend(self):
desc = 'A Pulse-based simulator configured from the backend: fake_athens'
self.assertEqual(sim_dict[key], desc)
elif key == 'simulator':
self.assertTrue(sim_dict[key], True)
self.assertTrue(sim_dict[key])
elif key == 'local':
self.assertTrue(sim_dict[key])
else:
self.assertEqual(sim_dict[key], backend_dict[key])

Expand Down

0 comments on commit c8fea99

Please sign in to comment.