storing the distribution values of each iteration of a Grover circuit. if a Grovers circuit has three iterations is there a way to store the distributions of each of the three iterations separately.
the following block of code gives you the final distribution only:
To run on local simulator:
Use the SatetvectorSampler from qiskit.primitives instead
sampler = Sampler(backend=backend)
sampler.options.default_shots = 10_000
result = sampler.run([circuit_isa]).result()
dist = result[0].data.meas.get_counts()
storing the distribution values of each iteration of a Grover circuit. if a Grovers circuit has three iterations is there a way to store the distributions of each of the three iterations separately.
the following block of code gives you the final distribution only:
To run on local simulator: