Skip to content

Commit

Permalink
Return None if the configuration does not have max_experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
hitomitak committed Jul 21, 2023
1 parent 67232e4 commit 3a8f6f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion qiskit_aer/backends/aerbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ def defaults(self):

@property
def max_circuits(self):
return self.configuration().max_experiments
if hasattr(self.configuration(), "max_experiments"):
return self.configuration().max_experiments
else:
return None

@property
def target(self):
Expand Down
2 changes: 1 addition & 1 deletion qiskit_aer/backends/statevector_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def _validate(self, qobj):
1. Set shots=1.
2. Check number of qubits will fit in local memory.
"""
name = self.name()
name = self.name
if getattr(qobj.config, "noise_model", None) is not None:
raise AerError(f"{name} does not support noise.")

Expand Down
2 changes: 1 addition & 1 deletion qiskit_aer/backends/unitary_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def _validate(self, qobj):
2. No measurements or reset
3. Check number of qubits will fit in local memory.
"""
name = self.name()
name = self.name
if getattr(qobj.config, "noise_model", None) is not None:
raise AerError(f"{name} does not support noise.")

Expand Down

0 comments on commit 3a8f6f1

Please sign in to comment.