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

add small N labs para #77

Merged
merged 6 commits into from
Oct 16, 2024
Merged

add small N labs para #77

merged 6 commits into from
Oct 16, 2024

Conversation

ZichangHe
Copy link
Contributor

Add small N data to the LABS parameter dataframes.

N in [3,4,5,6] for MF, N in [3,4,5] for overlap, with p up to 5. For most cases, p=2 solves the problem exactly.

@rsln-s
Copy link
Contributor

rsln-s commented Oct 14, 2024

Thanks @ZichangHe! Couple of quick comments.

  1. The parameters should be saved with orient='index' for the diff to look nice and for the tests not to break. I fixed it using:
import pandas as pd
df = pd.read_json("best_LABS_QAOA_parameters_wrt_overlap.json")
df.to_json('best_LABS_QAOA_parameters_wrt_overlap.json', orient='index', indent=4)

You can check the diff like this:

$ git diff main -- best_LABS_QAOA_parameters_wrt_MF.json | grep '^[+-]' | grep -Ev '"[0-9]+":{'
--- a/qokit/assets/best_LABS_QAOA_parameters_wrt_MF.json
+++ b/qokit/assets/best_LABS_QAOA_parameters_wrt_MF.json
+        "N":3,
+        "p":1,
+        "merit factor":4.5,
+        "gamma":[
+            -0.7853981599
+        ],
+        "beta":[
+            0.3926990842
+        ],
+        "AR":1.0,
+        "nseeds":null,
+        "overlap":1.0
+    },
+        "N":3,
+        "p":2,
+        "merit factor":4.5,
+        "gamma":[
+            -0.7857086708,
+            0.0550850251
+        ],
+        "beta":[
+            0.3912955591,
+            0.0014120801
+        ],
+        "AR":1.0,
+        "nseeds":null,
+        "overlap":1.0
+    },
...
  1. For N=5, there are multiple entries that achieve overlap 1. Specifically, p=3 already achieves overlap of 1, but p=4 and p=5 are also included. Is there a reason for that? If not, they should be removed since they are not, in any meaningful sense, "optimized" parameters; smaller p already solves the problem exactly.

@ZichangHe
Copy link
Contributor Author

Thanks, I will remove the unnecessary higher p data. One more change to make, I will update N = 7 data which was contained in the original data frame but not fully optimized.

Copy link
Contributor

@rsln-s rsln-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I also manually checked that the values in the data frame are correct

@rsln-s rsln-s merged commit 8bdb399 into main Oct 16, 2024
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants