From 74435990545621522e9255b88f17e6ed63cbf897 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 9 Nov 2022 01:20:15 +0000 Subject: [PATCH] app: stacked_cores: new 56-xx sim for complementary logic using multiple input cores like 53-xx, but with double the input cores, and a fixed 1:1 coupling. it achieves 0.9x amplification at best. - which is *better* than the 0.8 amplification we see with 53-xx when using 1:1 coupling, but not enough - what if we try this idea with 3:1 winding? we can do that if we sandwhich each output _between_ its associated input. --- .../stacked_cores/scripts/plot_53xx.py | 22 ++- .../stacked_cores/scripts/plot_56xx.py | 32 +++ .../scripts/stacked_cores_52xx.py | 4 +- .../scripts/stacked_cores_52xx_db.py | 187 ++++++++++++++++++ .../scripts/stacked_cores_52xx_plotters.py | 6 +- crates/applications/stacked_cores/src/main.rs | 140 ++++++++++++- 6 files changed, 382 insertions(+), 9 deletions(-) create mode 100755 crates/applications/stacked_cores/scripts/plot_56xx.py diff --git a/crates/applications/stacked_cores/scripts/plot_53xx.py b/crates/applications/stacked_cores/scripts/plot_53xx.py index 5d0ffb2..8d356c3 100755 --- a/crates/applications/stacked_cores/scripts/plot_53xx.py +++ b/crates/applications/stacked_cores/scripts/plot_53xx.py @@ -9,12 +9,24 @@ def extract_53xx_tx(meas_rows: list) -> tuple: """ return (meas_rows[1].m[0], meas_rows[0].m[1], meas_rows[0].m[2], meas_rows[1].m[3]) -sweep_buf_inputs = lambda points=101: [(None, m, -m, None) for m in sweep_1d(points)] +sweep_buf_inputs = lambda offset=0, points=101: [(None, m, -m + offset, None) for m in sweep_1d(points)] +sweep_m1 = lambda m2, points=101: [(None, m, m2, None) for m in sweep_1d(points)] -buf_gates = read_db(lambda name: name.startswith("53-")) +buf_gates = read_db(lambda name: name.startswith("53-buf-no_inp_couple-")) for name, meas in natsorted(buf_gates.items()): print(name) - trace = eval_series(meas, sweep_buf_inputs(), extract_53xx_tx, y_idx=0) - plot(name, "a0", trace) - plot_slope(f"slope {name}", "a0", trace) + # normal M2 = -M1 sweep + # trace = eval_series(meas, sweep_buf_inputs(), extract_53xx_tx, y_idx=0) + # plot(name, "a0", trace) + # plot_slope(f"slope {name}", "a0", trace) + + # M2 = 0.25 - M1 shifted sweep + # trace = eval_series(meas, sweep_buf_inputs(8500), extract_53xx_tx, y_idx=0) + # plot(f"In=0.25-Ip {name}", "a0", trace) + # plot_slope(f"slope In=0.25-Ip {name}", "a0", trace) + + # M2 fixed at 0.0 while M1 sweeps + trace = eval_series(meas, sweep_m1(0.0), extract_53xx_tx, y_idx=0) + plot(f"In=0 {name}", "a0", trace) + plot_slope(f"slope In=0 {name}", "a0", trace) diff --git a/crates/applications/stacked_cores/scripts/plot_56xx.py b/crates/applications/stacked_cores/scripts/plot_56xx.py new file mode 100755 index 0000000..848b42a --- /dev/null +++ b/crates/applications/stacked_cores/scripts/plot_56xx.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +from natsort import natsorted + +from stacked_cores_52xx import * +from stacked_cores_52xx_plotters import * + + +def extract_56xx_tx(meas_rows: list) -> tuple: + """ + extracts a flat tuple of input/output M mappings from a 56xx run + """ + + return ( + meas_rows[0].m[0], # input + meas_rows[0].m[1], # input + meas_rows[1].m[2], # output + meas_rows[1].m[3], # output + meas_rows[0].m[4], # input + meas_rows[0].m[5], # input + ) + + +buf_gates = read_db(lambda name: name.startswith("56-")) + +sweep_buf_inputs = lambda points=101: [(m, m, None, None, -m, -m) for m in sweep_1d(points)] + + +for name, meas in natsorted(buf_gates.items()): + trace = eval_series(meas, sweep_buf_inputs(), extract_56xx_tx, y_idx=2) + plot(f"{name}", "a1", trace) + plot_slope(f"slope {name}", "a1", trace) diff --git a/crates/applications/stacked_cores/scripts/stacked_cores_52xx.py b/crates/applications/stacked_cores/scripts/stacked_cores_52xx.py index 0314e6e..86808b8 100755 --- a/crates/applications/stacked_cores/scripts/stacked_cores_52xx.py +++ b/crates/applications/stacked_cores/scripts/stacked_cores_52xx.py @@ -11,7 +11,7 @@ from stacked_cores_52xx_db import DB ## CONSTANTS/CONFIGURATION # list of sims to extract details for -PREFIXES = { "52", "53", "54", "55" } +PREFIXES = { "52", "53", "54", "55", "56" } def times_of_interest(sim_name: str) -> list: # could be more intelligent, extracting e.g. the clock duration from the name @@ -23,6 +23,8 @@ def times_of_interest(sim_name: str) -> list: return [2e-9, 4e-9, 8e-9] if sim_name.startswith("55-"): return [4e-9, 6e-9, 10e-9] + if sim_name.startswith("56-"): + return [4e-9, 6e-9] ## USER-FACING FUNCTIONS diff --git a/crates/applications/stacked_cores/scripts/stacked_cores_52xx_db.py b/crates/applications/stacked_cores/scripts/stacked_cores_52xx_db.py index 477e029..43c0faf 100644 --- a/crates/applications/stacked_cores/scripts/stacked_cores_52xx_db.py +++ b/crates/applications/stacked_cores/scripts/stacked_cores_52xx_db.py @@ -596,6 +596,10 @@ DB = { MeasRow(2e-09, [-17805, -18017, 16871, -17411]), MeasRow(4e-09, [-16705, -30148, -30148, 11497]), ], + (-0.200, 0.050,): [ + MeasRow(2e-09, [-17851, -18607, 15892, -17570]), + MeasRow(4e-09, [-16711, -30148, -30148, 11095]), + ], (-0.200, 0.200,): [ MeasRow(2e-09, [-17797, -17990, 16857, -17417]), MeasRow(4e-09, [-16705, -30148, -30148, 11499]), @@ -1454,6 +1458,10 @@ DB = { MeasRow(2e-09, [-18765, -19469, 17369, -17262]), MeasRow(4e-09, [-16596, -30880, -30868, 15462]), ], + (-0.250, 0.100,): [ + MeasRow(2e-09, [-17884, -14258, 14850, -17875]), + MeasRow(4e-09, [-15608, -30874, -30868, 12961]), + ], (-0.250, 0.250,): [ MeasRow(2e-09, [-17729, -14278, 16788, -17438]), MeasRow(4e-09, [-15772, -30875, -30868, 14496]), @@ -1462,6 +1470,10 @@ DB = { MeasRow(2e-09, [-17723, -11017, 16708, -17477]), MeasRow(4e-09, [-13600, -30873, -30867, 13408]), ], + (-0.200, 0.050,): [ + MeasRow(2e-09, [-17914, -8811, 13596, -17931]), + MeasRow(4e-09, [-11373, -30874, -30869, 10366]), + ], (-0.200, 0.200,): [ MeasRow(2e-09, [-17732, -8814, 16605, -17522]), MeasRow(4e-09, [-11954, -30874, -30867, 12619]), @@ -1470,6 +1482,10 @@ DB = { MeasRow(2e-09, [-17764, -5503, 16185, -17662]), MeasRow(4e-09, [ -9484, -30874, -30868, 11263]), ], + (-0.150, 0.000,): [ + MeasRow(2e-09, [-17939, -3295, 11897, -17954]), + MeasRow(4e-09, [ -7029, -30872, -30869, 7466]), + ], (-0.150, 0.150,): [ MeasRow(2e-09, [-17796, -3297, 15879, -17754]), MeasRow(4e-09, [ -7871, -30872, -30868, 10348]), @@ -1482,6 +1498,10 @@ DB = { MeasRow(2e-09, [-17936, 2208, -17503, -18375]), MeasRow(4e-09, [ 5069, -30872, -30879, -15146]), ], + (-0.100, -0.050,): [ + MeasRow(2e-09, [-17944, 2186, 7490, -17949]), + MeasRow(4e-09, [ -2293, -30870, -30870, 2749]), + ], (-0.100, 0.100,): [ MeasRow(2e-09, [-17877, 2181, 14861, -17875]), MeasRow(4e-09, [ -4019, -30870, -30867, 8000]), @@ -1494,6 +1514,10 @@ DB = { MeasRow(2e-09, [-17951, 7513, -8871, -17934]), MeasRow(4e-09, [ 6026, -30870, -30874, -9791]), ], + (-0.050, -0.100,): [ + MeasRow(2e-09, [-17950, 7510, 2149, -17942]), + MeasRow(4e-09, [ 2812, -30869, -30871, -2364]), + ], (-0.050, 0.050,): [ MeasRow(2e-09, [-17927, 7496, 13615, -17929]), MeasRow(4e-09, [ -274, -30869, -30868, 5629]), @@ -1502,6 +1526,10 @@ DB = { MeasRow(2e-09, [-17946, 10399, 12757, -17946]), MeasRow(4e-09, [ 1884, -30867, -30869, 4206]), ], + ( 0.000, -0.150,): [ + MeasRow(2e-09, [-17956, 11901, -3348, -17936]), + MeasRow(4e-09, [ 7519, -30869, -30874, -7083]), + ], ( 0.000, -0.100,): [ MeasRow(2e-09, [-17955, 11909, 2145, -17941]), MeasRow(4e-09, [ 5982, -30869, -30872, -3489]), @@ -1530,6 +1558,10 @@ DB = { MeasRow(2e-09, [-17915, 14135, 5381, -17910]), MeasRow(4e-09, [ 6618, -30868, -30870, -1816]), ], + ( 0.100, -0.250,): [ + MeasRow(2e-09, [-17878, 14845, -14336, -17885]), + MeasRow(4e-09, [ 13006, -30867, -30876, -15655]), + ], ( 0.100, -0.200,): [ MeasRow(2e-09, [-17880, 14848, -8878, -17868]), MeasRow(4e-09, [ 11295, -30867, -30875, -11727]), @@ -1562,6 +1594,10 @@ DB = { MeasRow(2e-09, [-17574, 16645, -19097, -18663]), MeasRow(4e-09, [ 15136, -30866, -30882, -16560]), ], + ( 0.200, -0.350,): [ + MeasRow(2e-09, [-17558, 16636, -18764, -18552]), + MeasRow(4e-09, [ 15127, -30866, -30881, -16532]), + ], ( 0.200, -0.200,): [ MeasRow(2e-09, [-17525, 16602, -8882, -17731]), MeasRow(4e-09, [ 12669, -30867, -30874, -12026]), @@ -1795,6 +1831,21 @@ DB = { MeasRow(6e-09, [-12601, -27867, -12603]), MeasRow(1e-08, [-27872, -4175, -27875]), ], + (-0.600,): [ + MeasRow(4e-09, [-18091, -18841, -18092]), + MeasRow(6e-09, [-10683, -27852, -10685]), + MeasRow(1e-08, [-27865, -2458, -27869]), + ], + (-0.500,): [ + MeasRow(4e-09, [-17174, -15115, -17175]), + MeasRow(6e-09, [ -7406, -27858, -7408]), + MeasRow(1e-08, [-27868, 396, -27872]), + ], + (-0.400,): [ + MeasRow(4e-09, [-17145, -8763, -17146]), + MeasRow(6e-09, [ -3634, -27857, -3638]), + MeasRow(1e-08, [-27869, 3711, -27872]), + ], (-0.300,): [ MeasRow(4e-09, [-17149, -2315, -17149]), MeasRow(6e-09, [ -1147, -27856, -1153]), @@ -1893,4 +1944,140 @@ DB = { MeasRow(1e-08, [-29736, 16917, -29737]), ], }), + '56-0.0004rad-2000ctl_cond-20000coupling_cond-2000ps-100ps-6ctl-12coupling-1_1_1_1_winding-1e10-drive-': ParameterizedMeas({ + (-1.000, -1.000,): [ + MeasRow(4e-09, [-17461, -18431, -21373, -21377, -18433, -17464]), + MeasRow(6e-09, [-29712, -29643, -15418, -15396, -29645, -29711]), + ], + (-1.000, 1.000,): [ + MeasRow(4e-09, [-17534, -18602, -20731, -18795, 16565, 16683]), + MeasRow(6e-09, [-29680, -29652, -17196, 8053, -29616, -29637]), + ], + ( 0.000, 0.000,): [ + MeasRow(4e-09, [ 9858, 13886, -19975, -19978, 13883, 9864]), + MeasRow(6e-09, [-29636, -29618, -2655, -2617, -29621, -29637]), + ], + ( 0.050, -0.050,): [ + MeasRow(4e-09, [ 14666, 14736, -19811, -19931, 1816, 1565]), + MeasRow(6e-09, [-29634, -29617, 1272, -9357, -29622, -29637]), + ], + ( 0.100, -0.100,): [ + MeasRow(4e-09, [ 15565, 15340, -19580, -19825, -12511, -12581]), + MeasRow(6e-09, [-29640, -29621, 5401, -16473, -29630, -29662]), + ], + ( 0.150, -0.150,): [ + MeasRow(4e-09, [ 16168, 15911, -19342, -20375, -17995, -17146]), + MeasRow(6e-09, [-29640, -29619, 7082, -17091, -29641, -29668]), + ], + ( 0.200, -0.200,): [ + MeasRow(4e-09, [ 16322, 16069, -19247, -20439, -18211, -17315]), + MeasRow(6e-09, [-29640, -29619, 7302, -17121, -29642, -29670]), + ], + ( 0.250, -0.250,): [ + MeasRow(4e-09, [ 16403, 16163, -19174, -20467, -18268, -17347]), + MeasRow(6e-09, [-29639, -29618, 7432, -17131, -29642, -29671]), + ], + ( 0.300, -0.300,): [ + MeasRow(4e-09, [ 16469, 16233, -19115, -20492, -18313, -17374]), + MeasRow(6e-09, [-29639, -29618, 7532, -17139, -29642, -29672]), + ], + ( 0.500, -0.500,): [ + MeasRow(4e-09, [ 16592, 16397, -18960, -20575, -18430, -17435]), + MeasRow(6e-09, [-29638, -29618, 7775, -17161, -29643, -29673]), + ], + ( 1.000, -1.000,): [ + MeasRow(4e-09, [ 16680, 16570, -18795, -20735, -18603, -17537]), + MeasRow(6e-09, [-29635, -29614, 8026, -17195, -29654, -29680]), + ], + }), + '56-0.0004rad-2000ctl_cond-20000coupling_cond-2000ps-100ps-6ctl-12coupling-1_1_1_1_winding-2e9-drive-': ParameterizedMeas({ + (-1.000, -1.000,): [ + MeasRow(4e-09, [-17234, -17993, -20347, -20350, -17994, -17236]), + MeasRow(6e-09, [-27232, -27200, -16234, -16236, -27203, -27231]), + ], + (-1.000, 1.000,): [ + MeasRow(4e-09, [-17241, -18058, -19739, -18322, 16464, 16593]), + MeasRow(6e-09, [-27228, -27234, -16893, 920, -27189, -27202]), + ], + ( 0.000, 0.000,): [ + MeasRow(4e-09, [ 18, 11, -19201, -19203, 13, 18]), + MeasRow(6e-09, [-27251, -27183, -9222, -9208, -27187, -27253]), + ], + ( 0.050, -0.050,): [ + MeasRow(4e-09, [ 42, 36, -19201, -19203, 6, 9]), + MeasRow(6e-09, [-27251, -27183, -9209, -9216, -27187, -27253]), + ], + ( 0.100, -0.100,): [ + MeasRow(4e-09, [ 97, 425, -19203, -19203, 2, 2]), + MeasRow(6e-09, [-27253, -27183, -9081, -9260, -27187, -27252]), + ], + ( 0.200, -0.200,): [ + MeasRow(4e-09, [ 1204, 3638, -19208, -19203, -37, -42]), + MeasRow(6e-09, [-27262, -27182, -7952, -9608, -27187, -27254]), + ], + ( 0.300, -0.300,): [ + MeasRow(4e-09, [ 5425, 7885, -19215, -19197, -1224, -1344]), + MeasRow(6e-09, [-27247, -27181, -5967, -10682, -27186, -27279]), + ], + ( 1.000, -1.000,): [ + MeasRow(4e-09, [ 16594, 16465, -18322, -19742, -18059, -17243]), + MeasRow(6e-09, [-27199, -27185, 877, -16893, -27237, -27231]), + ], + }), + '56-0.0004rad-2000ctl_cond-20000coupling_cond-2000ps-100ps-6ctl-12coupling-1_1_1_1_winding-5e9-drive-': ParameterizedMeas({ + (-1.000, -1.000,): [ + MeasRow(4e-09, [-17387, -18281, -21019, -21022, -18281, -17390]), + MeasRow(6e-09, [-28788, -28770, -15944, -15929, -28771, -28790]), + ], + (-1.000, 1.000,): [ + MeasRow(4e-09, [-17426, -18396, -20383, -18642, 16532, 16663]), + MeasRow(6e-09, [-28810, -28790, -17019, 5989, -28752, -28815]), + ], + ( 0.000, 0.000,): [ + MeasRow(4e-09, [ 1374, 8491, -19729, -19730, 8498, 1414]), + MeasRow(6e-09, [-28871, -28755, -5830, -5804, -28756, -28869]), + ], + ( 0.050, -0.050,): [ + MeasRow(4e-09, [ 6441, 12513, -19730, -19722, 5040, 378]), + MeasRow(6e-09, [-28909, -28759, -2655, -8250, -28759, -28832]), + ], + ( 0.100, -0.100,): [ + MeasRow(4e-09, [ 11800, 14264, -19621, -19678, 1140, -25]), + MeasRow(6e-09, [-28877, -28757, -276, -10272, -28760, -28786]), + ], + ( 0.150, -0.150,): [ + MeasRow(4e-09, [ 14870, 14955, -19467, -19609, -5414, -5471]), + MeasRow(6e-09, [-28835, -28756, 1917, -13599, -28760, -28777]), + ], + ( 0.200, -0.200,): [ + MeasRow(4e-09, [ 15623, 15412, -19280, -19527, -12509, -12605]), + MeasRow(6e-09, [-28830, -28760, 3757, -16373, -28767, -28778]), + ], + ( 0.250, -0.250,): [ + MeasRow(4e-09, [ 15998, 15785, -19076, -19865, -17190, -16611]), + MeasRow(6e-09, [-28827, -28760, 5042, -16853, -28787, -28787]), + ], + ( 0.300, -0.300,): [ + MeasRow(4e-09, [ 16327, 16103, -18984, -20115, -17939, -17119]), + MeasRow(6e-09, [-28825, -28760, 5393, -16945, -28784, -28784]), + ], + ( 0.500, -0.500,): [ + MeasRow(4e-09, [ 16534, 16344, -18811, -20232, -18224, -17324]), + MeasRow(6e-09, [-28824, -28758, 5713, -16982, -28785, -28783]), + ], + ( 1.000, -1.000,): [ + MeasRow(4e-09, [ 16662, 16533, -18641, -20386, -18396, -17429]), + MeasRow(6e-09, [-28816, -28750, 5961, -17014, -28792, -28812]), + ], + }), + '56-0.0004rad-2000ctl_cond-20000coupling_cond-2000ps-100ps-8ctl-8coupling-1_1_1_1_winding-2e10-drive-': ParameterizedMeas({ + (-1.000, 1.000,): [ + MeasRow(4e-09, [-17332, -18025, -19545, -18377, 16586, 16710]), + MeasRow(6e-09, [-30939, -30928, -16664, 8039, -30917, -30937]), + ], + ( 1.000, -1.000,): [ + MeasRow(4e-09, [ 16710, 16591, -18371, -19549, -18026, -17335]), + MeasRow(6e-09, [-30938, -30916, 7992, -16652, -30929, -30941]), + ], + }), } \ No newline at end of file diff --git a/crates/applications/stacked_cores/scripts/stacked_cores_52xx_plotters.py b/crates/applications/stacked_cores/scripts/stacked_cores_52xx_plotters.py index 61fa0be..4c5cf41 100644 --- a/crates/applications/stacked_cores/scripts/stacked_cores_52xx_plotters.py +++ b/crates/applications/stacked_cores/scripts/stacked_cores_52xx_plotters.py @@ -93,7 +93,11 @@ def interpolate_minl1(at: tuple, runs: list, distances: list) -> tuple: # compute the weight of each run init = [0]*num_runs constraints = [eq_constraint, weights_sum_to_1_constraint] - res = opt.minimize(score, init, method='trust-constr', constraints=constraints, bounds=bounds) + try: + res = opt.minimize(score, init, method='trust-constr', constraints=constraints, bounds=bounds) + except ValueError as e: + print(f"failed to interpolate point {e}") + return [0] * len(at) run_weights = res.x # sum the weighted runs diff --git a/crates/applications/stacked_cores/src/main.rs b/crates/applications/stacked_cores/src/main.rs index 537630e..153f6d0 100644 --- a/crates/applications/stacked_cores/src/main.rs +++ b/crates/applications/stacked_cores/src/main.rs @@ -1399,6 +1399,21 @@ fn drive_map_split_54_2clock_init(amp: f32) -> [[ClockState; 3]; 5] { ] } +#[allow(unused)] +fn drive_map_buf_56(amp0: f32, amp1: f32) -> [[ClockState; 6]; 3] { + use ClockState as C; + // amplitudes are inverted from what you would expect. + // hold(-1) puts the core into a positive M + [ + // init S0/S1 pos, S4/S5 pos; charge S2/S3 neg + [C::hold(-amp0), C::hold(-amp0), C::hold_high(), C::hold_high(), C::hold(-amp1), C::hold(-amp1), ], + // let settle + [C::release(-amp0), C::release(-amp0), C::release_high(), C::release_high(), C::release(-amp1), C::release(-amp1),], + // clear S0/S1 -> S2, S4/S5 -> S3 + [C::hold_high(), C::hold_high(), C::float(), C::float(), C::hold_high(), C::hold_high(), ], + ] +} + fn asymmetric_inverter_name(p: &Params, sim_id: &str, windings: u32, init_flt: f32) -> String { let init_int = (init_flt.abs() * 100.0 + 0.5) as u32; let init_level = if init_flt > 0.0 { @@ -5967,6 +5982,17 @@ fn main() { ( 0.17, -0.17), ( 0.22, -0.22), ][..], + &[ + // bias M2 to be 0.15 lower what we expect + (-0.20, 0.05), + (-0.10, -0.05), + (-0.25, 0.10), + (-0.05, -0.10), + ( 0.00, -0.15), + (-0.15, 0.00), + ( 0.10, -0.25), + ( 0.20, -0.35), + ], &[ // test some asymmetries -- specifically where A1 is higher than expected ( 0.20, 0.00), @@ -6006,6 +6032,7 @@ fn main() { // slope is 1.01 from x=8500 to x=16999; averages 0.97 outside (false, 2e3, 2e4, ps(2000), ps(100), 8, 1, 1, um(400), 2e10), + // slope is 0.95 from x=-4500 to x=14000 (true, 2e3, 2e4, ps(2000), ps(100), 4, 2, 2, um(400), 1e11), // slope is 1.0 - 1.15 from x=13000 to x=17000; averages 0.8 outside @@ -6095,7 +6122,7 @@ fn main() { } } - if true { + if false { for init_set in [ &[ // establish rough domain/range @@ -6182,7 +6209,6 @@ fn main() { .with_coupling(2, 2, 0, net_slots, CouplingMethod::Control) ; for i in 0..couplings_per_ctl { - // couple output core 0 to core 3 params = params.with_coupling(0, 1, 1+2*i, net_slots, CouplingMethod::Direct); params = params.with_coupling(1, 2, 2+2*i, net_slots, CouplingMethod::Direct); } @@ -6210,6 +6236,116 @@ fn main() { } } } + + if true { + for init_set in [ + // M2, M3 are treated as X and -X, respectively. + // because it's differential, testing (-1, 1) is sort of extraneous with (1, -1). + // generally only need to test the X > 0 region, if X == -X. + // but also test some cases where X != -X, due to error + &[ + // establish rough domain/range + ( 1.00, -1.00), + (-1.00, 1.00), // technically extraneous + ( 0.00, 0.00), + ( 0.20, -0.20), + ( 0.10, -0.10), + (-1.00, -1.00), // uninitialized case + ][..], + &[ + // negative side + // (-0.10, 0.10), + // (-0.20, 0.20), + // (-0.25, 0.25), + // (-0.05, 0.05), + // (-0.15, 0.15), + ][..], + &[ + // more detailed sweep + ( 0.30, -0.30), + ( 0.05, -0.05), + ( 0.15, -0.15), + ( 0.25, -0.25), + ( 0.50, -0.50), + ][..], + &[ + // even more verbosity + // (-0.02, 0.02), + // (-0.07, 0.07), + // (-0.12, 0.12), + // (-0.17, 0.17), + // (-0.22, 0.22), + + ( 0.02, -0.02), + ( 0.07, -0.07), + ( 0.12, -0.12), + ( 0.17, -0.17), + ( 0.22, -0.22), + ][..], + ] { + for (ctl_cond, coupling_cond, clock_duration, clock_decay, coupling_loops, couplings_per_ctl, s_major, cur_flt) in [ + // total slot use is L*(3*A + 1), + // where L is the "coupling loops" and A is couplings_per_ctl + // e.g. L=8, A=1 gives 40 + // e.g. L=6, A=2 gives 42 + // e.g. L=4, A=3 gives 40 + // special case of A=0 is L*(2 + 1) + + // slope (for pos M0): 0.60 - 0.80 + (2e3, 2e4, ps(2000), ps(100), 6, 2, um(400), 5e9), + // slope (for pos M0): 0.40 - 0.90 + (2e3, 2e4, ps(2000), ps(100), 6, 2, um(400), 1e10), + // slope: 0.45 + (2e3, 2e4, ps(2000), ps(100), 6, 2, um(400), 2e9), + // (2e3, 2e4, ps(2000), ps(100), 8, 1, um(400), 2e10), + // (2e3, 2e4, ps(2000), ps(100), 4, 3, um(400), 1e11), + ] { + for &(init_flt_a, init_flt_b) in init_set { + // output M2/M3 are coupled to 3 cores + // input M0/M1, M4/M5 are coupled to just 1 core (their output) + // + control slots + // no asymmetric windings + let net_slots = 3*couplings_per_ctl + 1; + let mut params = params_v2 + .with_clock_phase_duration(clock_duration) + .with_clock_decay(clock_decay) + .with_ctl_conductivity(ctl_cond) + .with_coupling_conductivity(coupling_cond) + .with_s_major(s_major) + .with_coupling_loops(coupling_loops) + .with_input_magnitude(cur_flt) + // control loops + .with_coupling(0, 0, 0, net_slots, CouplingMethod::Control) + .with_coupling(1, 1, 0, net_slots, CouplingMethod::Control) + .with_coupling(2, 2, 0, net_slots, CouplingMethod::Control) + .with_coupling(3, 3, 0, net_slots, CouplingMethod::Control) + .with_coupling(4, 4, 0, net_slots, CouplingMethod::Control) + .with_coupling(5, 5, 0, net_slots, CouplingMethod::Control) + ; + for i in 0..couplings_per_ctl { + // couple output core 2 to core 3 + params = params.with_coupling(2, 3, 1+3*i, net_slots, CouplingMethod::Direct); + // couple M1 input -> M2 output + params = params.with_coupling(1, 2, 2+3*i, net_slots, CouplingMethod::Direct); + // couple M4 input -> M3 output + params = params.with_coupling(4, 3, 2+3*i, net_slots, CouplingMethod::Direct); + // couple M0 input -> M2 output + params = params.with_coupling(0, 2, 3+3*i, net_slots, CouplingMethod::Outside); + // couple M5 input -> M3 output + params = params.with_coupling(5, 3, 3+3*i, net_slots, CouplingMethod::Outside); + } + let name = asymmetric_binary_gate_name_v2( + ¶ms, "56", coupling_loops /* ctl loops */, couplings_per_ctl*coupling_loops, 1 /* asym loops */, 1 /* asym loops */, init_flt_a, init_flt_b + ); + run_sim( + &name, + drive_map_buf_56(init_flt_a, init_flt_b), + params, + ); + } + } + } + } }