mirror of https://github.com/Qiskit/qiskit.git
Fix hpc parameters handling
This commit is contained in:
parent
67490ede64
commit
fd8d06894e
|
@ -127,6 +127,15 @@ The parameters can be specified to ``QuantumProgram.compile()`` and
|
|||
'omp_num_threads': 16
|
||||
})
|
||||
|
||||
If the ``ibmqx_hpc_qasm_simulator`` backend is used and the ``hpc`` parameter
|
||||
is not specified, the following values will be used by default:
|
||||
|
||||
.. code-block:: python
|
||||
hpc={
|
||||
'multi_shot_optimization': True,
|
||||
'omp_num_threads': 16
|
||||
}
|
||||
|
||||
|
||||
Please note that these parameters must only be used for the
|
||||
``ibmqx_hpc_qasm_simulator``, and will be reset to None along with emitting
|
||||
|
|
|
@ -63,7 +63,16 @@ class QeRemote(BaseBackend):
|
|||
hpc = None
|
||||
if (qobj['config']['backend'] == 'ibmqx_hpc_qasm_simulator' and
|
||||
'hpc' in qobj['config']):
|
||||
hpc = qobj['config']['hpc']
|
||||
try:
|
||||
# Use CamelCase when passing the hpc parameters to the API.
|
||||
hpc = {
|
||||
'multiShotOptimization':
|
||||
qobj['config']['hpc']['multi_shot_optimization'],
|
||||
'ompNumThreads':
|
||||
qobj['config']['hpc']['omp_num_threads']
|
||||
}
|
||||
except:
|
||||
hpc = None
|
||||
|
||||
output = self._api.run_job(api_jobs, qobj['config']['backend'],
|
||||
shots=qobj['config']['shots'],
|
||||
|
|
Loading…
Reference in New Issue