# How do I change the number of max_shots of Aer qasm_simulator in Qiskit running on my computer?

I want to do a circuit with more than 1 million shots. How do I change the number of max_shots of Aer qasm_simulator in Qiskit? When I run it, it said Number of shots specified: 1000001 exceeds max_shots property of the backend: 1000000.'. Can someone help me? Thanks!

backend._configuration.max_shots= ...

Will do what you want.

• Now I see why you guy put a limit to that. It takes all my RAM lol. – Kim Dong May 13 at 3:15

I don't think that this parameter can be altered, I can't see a situation where you should need this many shots. You can pass more than one circuit to the execute function, so if you do execute([qc, qc], shots=100) each circuit will be run for 100 shots, giving you a total of 200 shots. You could use a method like this to get up to a larger number of shots if you needed.

• This workaround will do, but I hope some developer here can point me out on how to customize this. – Kim Dong May 12 at 13:26
• I am a developer, you can probably update this parameter by locating this file (github.com/Qiskit/qiskit-aer/blob/…) on your system and updating max_shots. However, as I previously said, you should not need to run things for this many shots to get an accurate idea of the probability distribution. – met927 May 12 at 13:30
• Oh damn, I don't mean to disrespect. Thank you, guess I'll just do the workaround, in case I break something. – Kim Dong May 12 at 13:32

This limit is set in the configuration of the device. There is no way to edit this property as far as I know.

• No I mean the Aer.qasm_simulator on my computer. – Kim Dong May 12 at 13:21