qiskit-aer
qiskit-aer copied to clipboard
Automatically set and save optimal OpenMP and fusion thresholds
Summary
Adds basic profiling code to find suitable threshold values for OpenMP and gate fusion for backend options. This is a revised version of #956.
Details and comments
This PR will add following into to #956.
- [x] Save optimized parameters into
settings.conf
- [x] Optimize
fusion_cost.N
Once https://github.com/Qiskit/qiskit-terra/pull/5943 is merged, optimized parameters will be able to be store in user config around here: https://github.com/Qiskit/qiskit-aer/blob/9f7b832abf8c74ed6d04d62072ff000deae882ab/qiskit/providers/aer/profile.py#L68-L69 https://github.com/Qiskit/qiskit-aer/blob/9f7b832abf8c74ed6d04d62072ff000deae882ab/qiskit/providers/aer/profile.py#L82-L84
Here are performance graphs (time_taken
includes only transpilation + simulation and excludes interface overheads) with default and tuned configurations.
Configurations:
- Left: MacBook (2.6 GHz 6-Core Intel Core i7)
- statevector_parallel_threshold=11
- fusion_threshold=19
- Right: Xeon (Intel Xeon Gold 6140 CPU )
- statevector_parallel_threshold=16
- fusion_threshold=11
QuantumVolume:
IntegerComparator:
WeightedAdder:
QuadraticForm:
QFT:
RealAmplitudes with full entanglements
RealAmplitudes with linear entanglements
Red lines are expected the lowest. Because this profiling function uses QuantumVolume, tuned options do not work for others. However, I believe, these side-effects are acceptables.