Monte-Carlo-quantum-state-classifier / qiskit-quantum-state-classifier

Pilote project testing a quantum state classifier based on distance matrix computation on a set of twenty highly entangled separable states. A Monte Carlo simulation is performed to determine the minimal state copies allowing to maintain the error below a given threshold.
Apache License 2.0
0 stars 1 forks source link

add the new optimizer #12

Closed cnktysz closed 3 years ago

cnktysz commented 3 years ago

This commit adds a new optimizer to ora.py and compares it with the old optimizer in a new notebook called 2_3_qiskit-quantum-state-classifier-new-optimizer.ipynb.

pdc-quantum commented 3 years ago

Hi @cnktysz

I was looking first at your notebook. Calculation time is effectively reduced. However the solutions found don't seems to match the stop criterion and can be very different than with the original classifier. When looking at your code in ora.py, I see that your termination criterion is:

if flag==0 and error_rate < epsilon:

while for assuring error < epsilon for any studied state, I defined safe_rate as the max error rate across all states (see from line 55), with termination criterion:

if safe_rate <= epsilon: break

IMO, that's probably why the results are divergent

It would also be better to adapt the y scale of the graphic.

cnktysz commented 3 years ago

I updated the safe_rate constraints. Now it is very similar to yours. There are still discrepancies but that might be due to low statistics as well.

pdc-quantum commented 3 years ago

OK. I shall merge the pull request. I don't understand all the details of the modifications, but we can examine that later. Your notebook will then be renamed 2.2... because I deleted 1_2 (now in the GitHub blog in a revised form) and renamed the old 2.2... to 1.2...