From 04560c1e328921d2a62b584ba7272f8cdca2730d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Pe=C3=B1a=20Tapia?= Date: Mon, 18 Dec 2023 18:55:06 +0100 Subject: [PATCH] Update configuration --- .../basic_provider/basic_simulator.py | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/qiskit/providers/basic_provider/basic_simulator.py b/qiskit/providers/basic_provider/basic_simulator.py index 0bc6a27d10cc..928392112ebe 100644 --- a/qiskit/providers/basic_provider/basic_simulator.py +++ b/qiskit/providers/basic_provider/basic_simulator.py @@ -177,31 +177,31 @@ def configuration(self) -> BackendConfiguration: # The ``target`` input argument overrides the ``configuration`` if provided: if self._configuration and not self._target: return copy.copy(self._configuration) - else: - gates = [ - { - "name": name, - "parameters": self.target.operation_from_name(name).params, - } - for name in self.target.operation_names - ] - - self._configuration = BackendConfiguration( - backend_name=self.name, - backend_version=self.backend_version, - n_qubits=self.num_qubits, - basis_gates=self.target.operation_names, - gates=gates, - local=True, - simulator=True, - conditional=True, - open_pulse=False, - memory=True, - max_shots=0, - coupling_map=None, - description="A python simulator for quantum experiments", - ) - return copy.copy(self._configuration) + + gates = [ + { + "name": name, + "parameters": self.target.operation_from_name(name).params, + } + for name in self.target.operation_names + ] + + self._configuration = BackendConfiguration( + backend_name=self.name, + backend_version=self.backend_version, + n_qubits=self.num_qubits, + basis_gates=self.target.operation_names, + gates=gates, + local=True, + simulator=True, + conditional=True, + open_pulse=False, + memory=True, + max_shots=0, + coupling_map=None, + description="A python simulator for quantum experiments", + ) + return copy.copy(self._configuration) def properties(self) -> BackendProperties: """Return the simulator backend properties if set.