Quantum Computing Asked on July 1, 2021
I am interested to know whether there is a quick and elegant way of increasing the number of shots (more than 8192 shots) on IBM hardware when running variational algorithms like VQE or QAOA.
I know that within Qiskit, I can specify:
backend._configuration.max_shots= shots
to change the number of max_shots but this only works for simulator. I can’t increase the shots
parameter to go over 8192 shots when I set my backend as one of the real hardware. That is, if I specify the following:
hardware_backend = provider.get_backend('ibmq_valencia ')
maxshots = 20000
hardware_backend._configuration.max_shots= maxshots
quantum_instance = QuantumInstance(hardware_backend, shots = maxshots, initial_layout = None,
optimization_level = 3)
then upon executing the circuit, I will have an error message:
Error is : The number of shots in the Qobj (20000) is higher than the number of shots supported by the device (8192).
Is there a quick and elegant way to overcome this issue within Qiskit? Thank you!
According to my knowledge, 8192 is a maximum of shots. I think that the reason is fair timesharing as nowadays there are many users of IBM Q.
To get better results from VQE, I can only recommend to run your task several times and then pick up the best solution, i.e. the one wiht the lowest (highest) value of the optimized function.
Correct answer by Martin Vesely on July 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP