# Summary table for job 4293 from mn_x_dim.json (minorant4293.py output). stdout: markdown table + JSON line. import json, math rows, out = [], {} step = lambda x: math.log(2 ** 0.5) / math.log(x) print('| x | dim | L* | exp_true (h, k) | exp_m (h, k) | m-true (grid steps) | h_F, k (len 2h_F-1, exp) | F gate | g1 worst | g2 worst |') print('|---|---|---|---|---|---|---|---|---|---|') for x in (11, 13, 17, 19): for d in (1, 2): s = json.load(open('mn_x%d_dim%d.json' % (x, d)))['summary'] t, m, F = s['true'], s['m'], s['F'] dm = s['m_minus_true']; nst = None if dm is None else round(dm / step(x), 2) print('| %d | %d | %d | %s (%s, %s) | %s (%s, %s) | %s (%s) | %s, %s (%s, %s) | %s | %.1e | %s |' % ( x, d, s['LSTAR'], t['exp'], t['h_cert'], t['k_at_cert'], m['exp'], m['h_cert'], m['k_at_cert'], dm, nst, F['h_cert'], F['k_at_cert'], F.get('certified_length'), F.get('exp_certified_length'), 'ok' if s['F_gate'] and all(s['F_gate'].values()) else s['F_gate'], s['g1_worst'], '%.1e' % s['g2_worst'] if s['g2_worst'] is not None else 'n/a')) out['%d_%d' % (x, d)] = {'exp_true': t['exp'], 'exp_m': m['exp'], 'm_minus_true': dm, 'grid_steps': nst, 'h_true': t['h_cert'], 'h_m': m['h_cert'], 'h_F': F['h_cert'], 'LSTAR': s['LSTAR'], 'F_gate': s['F_gate'], 'm_up': m['h_up'], 'true_up': t['h_up'], 'm_uncert_above_first': m['uncert_above_first']} print(json.dumps(out, sort_keys=True))