Skip to content

Commit

Permalink
Merge pull request Qiskit#93 from nonhermitian/coupling_map
Browse files Browse the repository at this point in the history
Add coupling_map to backends
  • Loading branch information
atilag authored Mar 19, 2019
2 parents 66c8b87 + 1312103 commit 6542359
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions qiskit/providers/aer/backends/qasm_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class QasmSimulator(AerBackend):
cores. For systems with a small number of cores it enabling
can reduce performance (Default: False).
* "ch_approximation_error" (double): Set the error in the
* "ch_approximation_error" (double): Set the error in the
approximation for the ch method. A smaller error needs more
memory and computational time. (Default: 0.05)
Expand Down Expand Up @@ -129,7 +129,8 @@ class QasmSimulator(AerBackend):
'open_pulse': False,
'memory': True,
'max_shots': 100000,
'description': 'A C++ simulator with realistic for qobj files',
'description': 'A C++ simulator with realistic noise for qobj files',
'coupling_map': None,
'basis_gates': ['u1', 'u2', 'u3', 'cx', 'cz', 'id', 'x', 'y', 'z',
'h', 's', 'sdg', 't', 'tdg', 'ccx', 'swap',
'snapshot', 'unitary'],
Expand Down Expand Up @@ -217,13 +218,12 @@ def _validate(self, qobj, backend_options, noise_model):
else:
if n_qubits > 63:
raise AerError(err_string + ', and has too many ' +
'qubits to fall back to the ' +
'qubits to fall back to the ' +
'CH simulator.')
if not ch_supported:
raise AerError(err_string + ', and contains ' +
'instructions not supported by ' +
'instructions not supported by ' +
'the CH simulator.')
logger.info('The QasmSimulator will automatically '
'switch to the CH backend, based on '
'the memory requirements.')

1 change: 1 addition & 0 deletions qiskit/providers/aer/backends/statevector_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class StatevectorSimulator(AerBackend):
'memory': True,
'max_shots': 1,
'description': 'A C++ statevector simulator for qobj files',
'coupling_map': None,
'basis_gates': ['u1', 'u2', 'u3', 'cx', 'cz', 'id', 'x', 'y', 'z',
'h', 's', 'sdg', 't', 'tdg', 'ccx', 'swap',
'snapshot', 'unitary'],
Expand Down
7 changes: 4 additions & 3 deletions qiskit/providers/aer/backends/unitary_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ class UnitarySimulator(AerBackend):
(Default: 6).
"""

MAX_QUBITS_MEMORY = int(log2(sqrt(local_hardware_info()['memory'] * (1024 ** 3) / 16)))
MAX_QUBIT_MEMORY = int(log2(sqrt(local_hardware_info()['memory'] * (1024 ** 3) / 16)))

DEFAULT_CONFIGURATION = {
'backend_name': 'unitary_simulator',
'backend_version': __version__,
'n_qubits': MAX_QUBITS_MEMORY,
'n_qubits': MAX_QUBIT_MEMORY,
'url': 'https://github.com/Qiskit/qiskit-aer',
'simulator': True,
'local': True,
Expand All @@ -74,7 +74,8 @@ class UnitarySimulator(AerBackend):
'memory': False,
'max_shots': 1,
'description': 'A Python simulator for computing the unitary' +
'matrix for experiments in qobj files',
'matrix for experiments in qobj files',
'coupling_map': None,
'basis_gates': ['u1', 'u2', 'u3', 'cx', 'cz', 'id', 'x', 'y', 'z',
'h', 's', 'sdg', 't', 'tdg', 'ccx', 'swap',
'snapshot', 'unitary'],
Expand Down

0 comments on commit 6542359

Please sign in to comment.