azure-quantum-python
azure-quantum-python copied to clipboard
IonQ simulator max_shots should be set to None
max_shots for the IonQ simulator should be set to None. It is currently set to 1 and causes the following error when using qiskit-aqua:
---------------------------------------------------------------------------
AquaError Traceback (most recent call last)
Input In [42], in <module>
----> 1 quantum_instance = QuantumInstance(backend=ionq_backend,
2 shots=8192)
File ~/anaconda3/envs/azurequantum/lib/python3.9/site-packages/qiskit/aqua/quantum_instance.py:149, in QuantumInstance.__init__(self, backend, shots, seed_simulator, max_credits, basis_gates, coupling_map, initial_layout, pass_manager, seed_transpiler, optimization_level, backend_options, noise_model, timeout, wait, skip_qobj_validation, measurement_error_mitigation_cls, cals_matrix_refresh_period, measurement_error_mitigation_shots, job_callback)
147 max_shots = self._backend.configuration().max_shots
148 if max_shots is not None and shots > max_shots:
--> 149 raise AquaError('The maximum shots supported by the selected backend is {} '
150 'but you specified {}'.format(max_shots, shots))
152 run_config = RunConfig(shots=shots, max_credits=max_credits)
153 if seed_simulator is not None:
AquaError: 'The maximum shots supported by the selected backend is 1 but you specified 8192'
The same goes for the Quantinuum emulator.
This was fixed with #301.