Skip to content

Commit

Permalink
sync with eprint
Browse files Browse the repository at this point in the history
20200914:220328 (posted 14-Sep-2020 22:03:28 UTC)
  • Loading branch information
malb committed Sep 29, 2020
1 parent 36f2e94 commit 09d72d2
Show file tree
Hide file tree
Showing 9 changed files with 853 additions and 876 deletions.
9 changes: 6 additions & 3 deletions cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
METRICS
"""

ClassicalMetrics = {"classical", "naive_classical"}
ClassicalMetrics = {
"classical", # gate count
"naive_classical", # query cost
}

QuantumMetrics = {
"g", # gate count
Expand Down Expand Up @@ -777,8 +780,8 @@ def cost(pr, T1):
N = 2 / ((1 - eta) * C(d, mp.pi / 3))
W0 = W(d, T1, T2, mp.pi / 3)
filters = 1.0 / W0
insert_cost = filters * C(d, T2) * ip_cost
query_cost = filters * C(d, T1) * ip_cost
insert_cost = filters * C(d, T2) * ip_cost * log2(d) # Alg 4, Line 5
query_cost = filters * C(d, T1) * ip_cost * log2(d) # Alg 4, Line 8
bucket_size = (filters * C(d, T1)) * (N * C(d, T2))

if metric in ClassicalMetrics:
Expand Down
242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-classical.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-dw.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-g.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-ge19.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-naive_classical.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-naive_quantum.csv

Large diffs are not rendered by default.

242 changes: 121 additions & 121 deletions data/cost-estimate-list_decoding-t_count.csv

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions texconstsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ def load_csv(f, metric):
return D

def main():
data_allpair_g = load_csv("all_pairs", "g")
data_allpair_dw = load_csv("all_pairs", "dw")
data_allpair_ge19 = load_csv("all_pairs", "ge19")
data_allpair_classical= load_csv("all_pairs", "classical")

data_bgj1_g = load_csv("random_buckets", "g")
data_bgj1_dw = load_csv("random_buckets", "dw")
data_bgj1_ge19 = load_csv("random_buckets", "ge19")
Expand All @@ -48,27 +43,6 @@ def main():
#p("classical784", float(list_decoding(784, metric="classical").log_cost))
#p("classical1024", float(list_decoding(1024, metric="classical").log_cost))

for d in sorted(data_allpair_g):
if float(data_allpair_classical[d]['log_cost']) - float(data_allpair_g[d]['log_cost']) > 0:
p("allpair/g/crossover", d)
p("allpair/g/crossover/cost", float(data_allpair_g[d]['log_cost']))
p("allpair/g/crossover/size", float(data_size_bits[d]['log2_size']))
break

for d in sorted(data_allpair_dw):
if float(data_allpair_classical[d]['log_cost']) - float(data_allpair_dw[d]['log_cost']) > 0:
p("allpair/dw/crossover", d)
p("allpair/dw/crossover/cost", float(data_allpair_dw[d]['log_cost']))
p("allpair/dw/crossover/size", float(data_size_bits[d]['log2_size']))
break

for d in sorted(data_allpair_ge19):
if float(data_allpair_classical[d]['log_cost']) - float(data_allpair_ge19[d]['log_cost']) > 0:
p("allpair/ge19/crossover", d)
p("allpair/ge19/crossover/cost", float(data_allpair_ge19[d]['log_cost']))
p("allpair/ge19/crossover/size", float(data_size_bits[d]['log2_size']))
break

for d in sorted(data_bgj1_g):
if float(data_bgj1_classical[d]['log_cost']) - float(data_bgj1_g[d]['log_cost']) > 0:
p("bgj1/g/crossover", d)
Expand Down

0 comments on commit 09d72d2

Please sign in to comment.