Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding circuit executor classes and shot-branching #1766

Merged
merged 63 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5684f13
adding executor classes for parallel simulations
doichanj Mar 17, 2023
a03bbb1
merge main
doichanj Mar 17, 2023
430ed9f
fix merge conflicts
doichanj Mar 23, 2023
4a0b8ec
Fix tensor_network method enablenment
doichanj Mar 24, 2023
e0ba7e6
simplify sub-classes
doichanj Mar 29, 2023
1cd3c73
fix unformatted code
doichanj Mar 30, 2023
0499009
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Mar 30, 2023
9fcd4e9
fix unformatted code again
doichanj Mar 30, 2023
f4fe17f
Fix MPI code
doichanj Mar 30, 2023
c6c2e6e
Fix shot-branching was not enabled with noise sampling
doichanj Apr 5, 2023
72faca7
Fix clang format
doichanj Apr 5, 2023
8945629
set_num_qubits to virtual function to set correct num qubits on matrix
doichanj Apr 6, 2023
cb0579c
reflecting review comments
doichanj Apr 7, 2023
b0c79a3
reuse of random number generator
doichanj Apr 7, 2023
6a56514
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Apr 7, 2023
6abd5ab
recover save_data_per_shot
doichanj Apr 17, 2023
9a9e3e7
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Apr 17, 2023
a7276f3
add missed omp threads setting in statevector, change class hieralchy
doichanj Apr 19, 2023
d02c782
Fix performance issue of GPU shot-branching
doichanj Apr 21, 2023
7fa4240
move fusion outside of loop for non noise dynamic circuits
doichanj May 19, 2023
846f645
Merge branch 'main' into add_executor
doichanj May 22, 2023
371dd62
fix shot-branching options in aer_compiler.py
doichanj May 22, 2023
16aa8a8
save codes before merge
doichanj Jun 13, 2023
a2ff17c
merge 0.12.1
doichanj Jun 13, 2023
d87af94
Fix format
doichanj Jun 13, 2023
c814b89
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Jun 14, 2023
907ab1b
Fix multi-chunk with cuStateVec
doichanj Jul 4, 2023
2acffce
format
doichanj Jul 4, 2023
2dbe800
format
doichanj Jul 4, 2023
009870a
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Jul 5, 2023
891f110
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Jul 7, 2023
fa9e1fc
add better multi-GPU distribution for shot-branching
doichanj Jul 10, 2023
7f0efee
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Jul 10, 2023
5fb9fbc
fix format
doichanj Jul 10, 2023
b682d9b
Changed option shot_branching_enable=False by default, add shot_branc…
doichanj Jul 11, 2023
2216225
format
doichanj Jul 11, 2023
ffd21d1
format test_shot_branching.py
doichanj Jul 11, 2023
138a1a0
Changed OpenMP threading for shot-branching
doichanj Jul 14, 2023
abbb719
Merge remote-tracking branch 'upstream/main' into add_executor
doichanj Jul 14, 2023
61bb0cb
mutable to matrix and param buffer
doichanj Jul 14, 2023
3353d11
format
doichanj Jul 14, 2023
07bffc2
add target_gpus option
doichanj Jul 28, 2023
c76ed74
Remove Python 3.7 from Github actions (#1819)
tungbq Jul 27, 2023
99c9e26
Fix missing dynamic link path for CUDA runtime and cuQuantum librarie…
doichanj Jul 27, 2023
67e6e8d
Fix OpenMP nested parallel (#1880)
doichanj Jul 27, 2023
8885eae
Support u3 gate application in Aer runtime API (#1876)
ibm-wakizaka Jul 27, 2023
0d553b0
Fix required_memory_mb (#1881)
doichanj Jul 27, 2023
daf3c19
format
doichanj Jul 31, 2023
2235462
format
doichanj Jul 31, 2023
dbe2300
format
doichanj Jul 31, 2023
fabfa63
comment out target_gpu setting for non-GPU
doichanj Jul 31, 2023
e66ab86
comment out target_gpu setting for non-GPU
doichanj Jul 31, 2023
c9c6150
Remove `PulseSimulator` (#1884)
hhorii Aug 2, 2023
e39e458
Fix an issue in `aer_state_initialize()` of C API (#1885)
hhorii Aug 3, 2023
a59e319
fix MPI shot-branching sampling
doichanj Aug 4, 2023
6fe5f04
fix unmerged file
doichanj Aug 7, 2023
8f07e97
remove conflict
doichanj Aug 9, 2023
e63e1e0
rerun tests
doichanj Aug 9, 2023
2170189
remove conflict
doichanj Aug 9, 2023
f566872
recover files
doichanj Aug 9, 2023
12b7d7b
remove conflict
doichanj Aug 9, 2023
36f0ea8
fix non-gpu
doichanj Aug 9, 2023
f1ee98d
update release note
doichanj Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions qiskit_aer/backends/aer_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,19 @@ class AerSimulator(AerBackend):
threads per GPU. This parameter is used to optimize Pauli noise
simulation with multiple-GPUs (Default: 1).

* ``shot_branching_enable`` (bool): This option enables/disables
optimized multi-shots simulation starting from single state and
state will be branched when some operations with randomness
(i.e. measure, reset, noises, etc.) is applied (Default: True).
This option can decrease runs of shots if there will be less branches
than number of shots.
This option is available for ``"statevector"``, ``"density_matrix"``.
For GPU, ``cuStateVec_enable`` is not supported for this option.

* ``runtime_noise_sampling_enable`` (bool): This option enables/disables
runtime noise sampling. This option is only applicable when
``shot_branching_enable`` is also True. (Default: False).

These backend options only apply when using the ``"statevector"``
simulation method:

Expand Down Expand Up @@ -702,6 +715,9 @@ def _default_options(cls):
batched_shots_gpu=False,
batched_shots_gpu_max_qubits=16,
num_threads_per_device=1,
# multi-shot branching
shot_branching_enable=True,
runtime_noise_sampling_enable=False,
# statevector options
statevector_parallel_threshold=14,
statevector_sample_measure_opt=10,
Expand Down
5 changes: 5 additions & 0 deletions qiskit_aer/backends/wrappers/aer_controller_binding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ void bind_aer_controller(MODULE m) {
[](Config &config, uint_t val) {
config.num_threads_per_device.value(val);
});
// # multi-shot branching
aer_config.def_readwrite("shot_branching_enable",
&Config::shot_branching_enable);
aer_config.def_readwrite("runtime_noise_sampling_enable",
&Config::runtime_noise_sampling_enable);
// # statevector options
aer_config.def_readwrite("statevector_parallel_threshold",
&Config::statevector_parallel_threshold);
Expand Down
21 changes: 21 additions & 0 deletions releasenotes/notes/add_executor-ba4870f86ed5d8ec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
features:
- |
This release restructures ``State`` classes.
Adding circuit executor classes that runs a circuit and manages multiple
states for multi-shots simulations or multi-chunk simulations for large
number of qubits.
Previously ``StateChunk`` class manages multiple chunks for multi-shots or
multi-chunk simulations but now ``State`` class only has one state
and all the parallelization codes are moved to ``Executor`` classes.
Now all ``State`` classes are independent from parallelization.
Also some of the functions in ``Aer::Controller`` class are moved to
``CircuitExecutor::Executor`` class.
- |
Shot-branching technique that decreases calculation of multi-shots
simulation is implemented with restructured ``Executor`` classes.
Shot-branching is currently applicable to statevector density matrix
and tensor-network methods.
By default ``shot_branching_enable`` is enabled.
And by setting ``runtime_noise_sampling_enable``, noise sampling is
done on the fly with shot-branching.
Loading