SRI-International / QC-App-Oriented-Benchmarks

QED-C: The Quantum Economic Development Consortium provides these computer programs and software for use in the fields of quantum science and engineering.
Apache License 2.0
143 stars 79 forks source link

Braket: able to get volumetric positioning plots #603

Closed GIRISHBELANI closed 3 months ago

GIRISHBELANI commented 3 months ago

In Braket's execute.py, functions were added to obtain circuit metrics such as qc_depth, qc_size, and qc_count_ops. The same values were used for the transpiled metrics as those calculated for the circuit metrics. Screenshots from the benchmarks are attached for reference. Quantum-Fourier-Transform-(1)-vplot Quantum-Fourier-Transform-(1)-metrics Phase-Estimation-vplot Phase-Estimation-metrics Hidden-Shift-vplot Hidden-Shift-metrics Hamiltonian-Simulation-vplot Hamiltonian-Simulation-metrics Deutsch-Jozsa-vplot Grover's-Search-vplot Grover's-Search-metrics Deutsch-Jozsa-metrics Bernstein-Vazirani-vplot Bernstein-Vazirani-metrics

GIRISHBELANI commented 3 months ago

In these Braket examples, the Algorithmic depth and Normalized depth are identical. Of course, this is better than not having any depth metrics. However, the plots will not be comparable to plots in other APIs. It appears you are using the StateVector simulator ... this may be the problem as there will be no transpilation done. The default setting in the original notebook just used "simulator" ... is it possible to do transpilation to a normalized basis set of gates so that we get correct Normalized Depth info?

I haven't changed the simulator; it's still set to the default, just like in the original notebook. Specifically, for backend_id == 'simulator', the device is LocalSimulator(), which corresponds to the StateVectorSimulator. Since the StateVectorSimulator in Braket doesn't perform transpilation, the Algorithmic Depth and Normalized Depth will remain identical.

rtvuser1 commented 3 months ago

OK, we can merge this PR given this explanation.

However, could you create an Issue about the fact that there is no transpilation done in Braket for computing Normalized depth? The consequence of this is that the volumetric plots and depth bar charts will not align with other APIs.