Skip to content

Commit

Permalink
Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Dec 18, 2023
1 parent d3d2911 commit 04560c1
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions qiskit/providers/basic_provider/basic_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 04560c1

Please sign in to comment.