Germ Selection

The purpose of this tutorial is to illustrate "germ selection". Germ selection is the process by which a complete set of germ gate sequences is constructed. The defining property which makes a set of gate sequences a "complete germ set" is the amplification of all possible gate errors. More precisely, the repetition of a complete set of germs, sandwiched between preparation and measurement fiducial sequences, will yield a sensitivity to all gate errors that scales with the number of times each germ is repeated. This completeness is relative to the set of gates under consideration, typically a set of desired or "target" gates.

In this tutorial, we find a complete germ set for the standard $X(\pi/2)$, $Y(\pi/2)$, $I$ gate set.

Before proceeding, however, we note the following: This tutorial notebook is slightly different from others. At present, germ selection is a bit of a "dark art". While we have a simple function (pygsti.algorithms.germselection.test_germ_list_infl) for determining whether or not a germ set is "amplificationally complete" (AC), we do not at present have a method for optimally selecting such a set (in particular, selecting a set that is as small as possible). This is in part because the germ list scoring function does a good job of distinguishing between AC and non-AC sets, it does less well distinguishing between sets that are both AC.

This notebook demonstrates how to generate an AC germ set, as well as demonstrating the functionality of several auxiliary functions we've developed to assist in the process. However, it should not be taken as optimal; in particular, one may find better (smaller) AC germ sets by repeatedly running the germ selection function, seeded with an AC germ set plus a collection of further candidate germs, as demonstrated below.

For more details on the theory of germ selection, please see arXiv:1605.07674.

In [1]:
from __future__ import print_function
In [2]:
import pygsti
from pygsti.construction import std1Q_XYI as std
import time
%matplotlib inline
from matplotlib import pyplot as plt
import numpy as _np
In [3]:
#A germ set is AC if and only if there are a number of non-zero eigenvalues (to machine precision) of J^\dagger J equal
#to the number of non-SPAM non-gauge parameters in a gate set, where J is the "twirled derivative" of the germ set with
#respect to the gate set.

#The gate set(s) we wish to test should have random unitary noise added to it, in order to break any accidental degeneracies.
#Additionally, even though experimental gate sets will have stochastic error,
#the gate set used for testing MUST have only unitary error, otherwise the selection procedure will fail.
#When actually running germ selection, the germ selection function can add random unitary noise; however,
#this does not automatically happen when calling test_germ_list_infl to test if a particular germ set is AC for a particular
#gate set.  Hence we manually randomize:

gs_real = std.gs_target.randomize_with_unitary(.1,seed=0)

#Let's see if a couple different germ sets are AC:

print("Is the standard germ set AC?", pygsti.algorithms.germselection.test_germ_list_infl(gs_real,std.germs))
print("Is the germ set {Gx, Gy, Gi} AC?", pygsti.algorithms.germselection.test_germ_list_infl(gs_real,pygsti.construction.gatestring_list([('Gx',),('Gy',),('Gi',)])))
Is the standard germ set AC? True
Is the germ set {Gx, Gy, Gi} AC? False
In [4]:
#Let's plot the sorted* eigenvalues of AC and non-AC germ sets.
#The horizontal line delineates gauge from non-gauge parameters.  We can never be sensitive to gauge parameters,
#but to be AC, we must be sensitive to all other parameters.

#*Due to numerical stability issues, some of the vanishingly small eigenvalues are negative;
#we plot their absolute values here.

plt.semilogy(sorted(_np.abs(pygsti.algorithms.germselection.test_germ_list_infl(gs_real,std.germs,returnSpectrum=True)[1])),'o',label='Std. XYI germs')
plt.semilogy(sorted(_np.abs(pygsti.algorithms.germselection.test_germ_list_infl(gs_real,pygsti.construction.gatestring_list([('Gx',),('Gy',),('Gi',)]),returnSpectrum=True)[1])),'o',label='{Gx,Gy,Gi}')
plt.axvline(pygsti.algorithms.germselection.num_non_spam_gauge_params(gs_real))
plt.legend(loc='best')
Out[4]:
<matplotlib.legend.Legend at 0x109fa3d68>

Let's now try to actually pick out a gate set. The germ selection output will strongly depend on several different inputs to the function optimize_integer_germs_slack (argument name given in parenthesis):

  1. The gate set(s) to be optimized for. (gatesetList)
  2. How strong the unitary randomization added is. (randomizationStrength; default is 1e-3. Can be turned off by setting to 0 or by setting randomize=False; this should only be done if the input gate set(s) have already been subjected to some random unitary errors.
  3. How many different randomized instances of the input gate set to be tested (numCopies; only to be used if only one gate set is passed in. The larger this number (or the larger the size of gatesetList), the more robust the output germ list will be in general, but the slower the runtime.
  4. How much adding a germ to the germ set "costs". (l1Penalty; default is 1e-2. Increasing this may nudge the optimizer towards picking a smaller germ set.)
  5. How much making an individual germ longer "costs". (gatePenalty; default is 0. Increasing this may nudge the optimizer towards picking a germ set with shorter germs.
  6. Whether the entire non-gauge portion of the spectrum to contributes to the germ score, or only the smallest eigenvalue. (scoreFunc = 'all' or 'worst', respectively.)
  7. The relaxation scheme used to reduce the germ list size:

    7a. The absolute score a germ set is allowed to achieve (fixedSlack) OR

    7b. The relative score a germ set is allowed to achieve (slackFrac)

  8. Whether or not the germ set must contain each bare gate as a germ (forceSingletons)

The output should depend much more weakly (but not necessarily not at all) on the tolerance value (tol) passed to the optimizer.

Here we demonstrate particular choices for the above inputs. However, we make no claims of optimality for these choices. End users are encouraged to experiment themselves with these inputs. They are also welcome to email [email protected]; the pyGSTi development team will try to assist.

The germ selection algorithm works by throwing unnecessary germs away from an initial (large) list that is assumed to be complete. In this example, our initial list includes all gatestrings up to length six that are distinct up to powers and cycles. Since germ sequences are repeated and sandwiched between fiducial sequences, a germ that is a power of another germ (i.e. the other germ repeated some number of times) or that is a cyclic permutation of another germ is effectively the same as the other germ. (I.e., if Gx is included as a germ, then GxGx will not be. Similarly, if GxGyGi is included as a germ, then GxiGxGy will not be.) The list_all_gatestrings_without_powers_and_cycles function provides a convenient way to list sequences gate sequences that are distinct up to such powers and cycles.

In [5]:
max_length = 6
gates = std.gs_target.gates.keys()

testGermList = pygsti.construction.list_all_gatestrings_without_powers_and_cycles(gates,max_length)
In [6]:
print("testGermList has", len(testGermList), "germs in it.")
print("testGermList is", "not "*(1-pygsti.algorithms.germselection.test_germ_list_infl(gs_real,testGermList))+"AC.")
testGermList has 196 germs in it.
testGermList is AC.
In [7]:
#Can we reduce the number of germs and still be AC?
#Let's start with:
#All 196 germs (germsList=testGermList, initialWeights=None),
#slackFrac=0.1, forceSingletons=True.
#Let's also try to score against 5 randomized gate sets (numCopies=5)

start = time.time()
germList1 = pygsti.algorithms.germselection.optimize_integer_germs_slack(std.gs_target,testGermList,numCopies=5,
                                                                         initialWeights=None,slackFrac=0.1,
                                                                         force="singletons",
                                                                         maxIter=300,
                                                                         verbosity=2)
end = time.time()
print()
print("Germ selection completed in", end-start, "seconds.")
print("germList1 is", "not "*(1-pygsti.algorithms.germselection.test_germ_list_infl(gs_real,germList1))+"AC.")
Complete initial germ set succeeds on all input gatesets.
Now searching for best germ set.
Starting germ set optimization. Lower score is better.
Gateset has 14 gauge params.
Progress: Iter 001 of 300 score=11.3492, nGerms=196: 
  Found better neighbor: nGerms = 195 score = 11.3463
  Found better neighbor: nGerms = 195 score = 11.3455
  Found better neighbor: nGerms = 195 score = 11.3452
Moving to better neighbor
Progress: Iter 002 of 300 score=11.3452, nGerms=195: 
  Found better neighbor: nGerms = 194 score = 11.3424
  Found better neighbor: nGerms = 194 score = 11.3415
Moving to better neighbor
Progress: Iter 003 of 300 score=11.3415, nGerms=194: 
  Found better neighbor: nGerms = 193 score = 11.3387
Moving to better neighbor
Progress: Iter 004 of 300 score=11.3387, nGerms=193: 
  Found better neighbor: nGerms = 192 score = 11.3384
  Found better neighbor: nGerms = 192 score = 11.3382
  Found better neighbor: nGerms = 192 score = 11.3381
  Found better neighbor: nGerms = 192 score = 11.3375
Moving to better neighbor
Progress: Iter 005 of 300 score=11.3375, nGerms=192: 
  Found better neighbor: nGerms = 191 score = 11.3372
  Found better neighbor: nGerms = 191 score = 11.337
  Found better neighbor: nGerms = 191 score = 11.3369
  Found better neighbor: nGerms = 191 score = 11.3365
Moving to better neighbor
Progress: Iter 006 of 300 score=11.3365, nGerms=191: 
  Found better neighbor: nGerms = 190 score = 11.3362
  Found better neighbor: nGerms = 190 score = 11.336
  Found better neighbor: nGerms = 190 score = 11.3358
  Found better neighbor: nGerms = 190 score = 11.3355
Moving to better neighbor
Progress: Iter 007 of 300 score=11.3355, nGerms=190: 
  Found better neighbor: nGerms = 189 score = 11.3353
  Found better neighbor: nGerms = 189 score = 11.3352
  Found better neighbor: nGerms = 189 score = 11.335
  Found better neighbor: nGerms = 189 score = 11.3349
Moving to better neighbor
Progress: Iter 008 of 300 score=11.3349, nGerms=189: 
  Found better neighbor: nGerms = 188 score = 11.3347
  Found better neighbor: nGerms = 188 score = 11.3345
  Found better neighbor: nGerms = 188 score = 11.3344
  Found better neighbor: nGerms = 188 score = 11.3343
Moving to better neighbor
Progress: Iter 009 of 300 score=11.3343, nGerms=188: 
  Found better neighbor: nGerms = 187 score = 11.3342
  Found better neighbor: nGerms = 187 score = 11.334
Moving to better neighbor
Progress: Iter 010 of 300 score=11.334, nGerms=187: 
  Found better neighbor: nGerms = 186 score = 11.3339
  Found better neighbor: nGerms = 186 score = 11.3337
  Found better neighbor: nGerms = 186 score = 11.3337
Moving to better neighbor
Progress: Iter 011 of 300 score=11.3337, nGerms=186: 
  Found better neighbor: nGerms = 185 score = 11.3336
  Found better neighbor: nGerms = 185 score = 11.3336
Moving to better neighbor
Progress: Iter 012 of 300 score=11.3336, nGerms=185: 
  Found better neighbor: nGerms = 184 score = 11.3335
Moving to better neighbor
Progress: Iter 013 of 300 score=11.3335, nGerms=184: 
  No better neighbor. Relaxing score w/slack: 11.3335 => 12.4668
  Found better neighbor: nGerms = 183 score = 11.3396
Moving to better neighbor
Progress: Iter 014 of 300 score=11.3396, nGerms=183: 
  No better neighbor. Relaxing score w/slack: 11.3396 => 12.4736
  Found better neighbor: nGerms = 182 score = 11.3453
Moving to better neighbor
Progress: Iter 015 of 300 score=11.3453, nGerms=182: 
  No better neighbor. Relaxing score w/slack: 11.3453 => 12.4798
  Found better neighbor: nGerms = 181 score = 11.4208
Moving to better neighbor
Progress: Iter 016 of 300 score=11.4208, nGerms=181: 
  No better neighbor. Relaxing score w/slack: 11.4208 => 12.5629
  Found better neighbor: nGerms = 180 score = 11.4577
Moving to better neighbor
Progress: Iter 017 of 300 score=11.4577, nGerms=180: 
  No better neighbor. Relaxing score w/slack: 11.4577 => 12.6035
  Found better neighbor: nGerms = 179 score = 11.492
Moving to better neighbor
Progress: Iter 018 of 300 score=11.492, nGerms=179: 
  No better neighbor. Relaxing score w/slack: 11.492 => 12.6412
  Found better neighbor: nGerms = 178 score = 11.5109
Moving to better neighbor
Progress: Iter 019 of 300 score=11.5109, nGerms=178: 
  No better neighbor. Relaxing score w/slack: 11.5109 => 12.662
  Found better neighbor: nGerms = 177 score = 11.5314
Moving to better neighbor
Progress: Iter 020 of 300 score=11.5314, nGerms=177: 
  No better neighbor. Relaxing score w/slack: 11.5314 => 12.6845
  Found better neighbor: nGerms = 176 score = 11.5494
Moving to better neighbor
Progress: Iter 021 of 300 score=11.5494, nGerms=176: 
  No better neighbor. Relaxing score w/slack: 11.5494 => 12.7043
  Found better neighbor: nGerms = 175 score = 11.5681
Moving to better neighbor
Progress: Iter 022 of 300 score=11.5681, nGerms=175: 
  No better neighbor. Relaxing score w/slack: 11.5681 => 12.7249
  Found better neighbor: nGerms = 174 score = 11.6282
Moving to better neighbor
Progress: Iter 023 of 300 score=11.6282, nGerms=174: 
  No better neighbor. Relaxing score w/slack: 11.6282 => 12.791
  Found better neighbor: nGerms = 173 score = 11.6852
Moving to better neighbor
Progress: Iter 024 of 300 score=11.6852, nGerms=173: 
  No better neighbor. Relaxing score w/slack: 11.6852 => 12.8537
  Found better neighbor: nGerms = 172 score = 11.7657
Moving to better neighbor
Progress: Iter 025 of 300 score=11.7657, nGerms=172: 
  No better neighbor. Relaxing score w/slack: 11.7657 => 12.9422
  Found better neighbor: nGerms = 171 score = 11.8409
Moving to better neighbor
Progress: Iter 026 of 300 score=11.8409, nGerms=171: 
  No better neighbor. Relaxing score w/slack: 11.8409 => 13.025
  Found better neighbor: nGerms = 170 score = 11.8542
Moving to better neighbor
Progress: Iter 027 of 300 score=11.8542, nGerms=170: 
  No better neighbor. Relaxing score w/slack: 11.8542 => 13.0396
  Found better neighbor: nGerms = 169 score = 11.8863
Moving to better neighbor
Progress: Iter 028 of 300 score=11.8863, nGerms=169: 
  No better neighbor. Relaxing score w/slack: 11.8863 => 13.0749
  Found better neighbor: nGerms = 168 score = 11.9233
Moving to better neighbor
Progress: Iter 029 of 300 score=11.9233, nGerms=168: 
  No better neighbor. Relaxing score w/slack: 11.9233 => 13.1156
  Found better neighbor: nGerms = 167 score = 11.9356
Moving to better neighbor
Progress: Iter 030 of 300 score=11.9356, nGerms=167: 
  No better neighbor. Relaxing score w/slack: 11.9356 => 13.1292
  Found better neighbor: nGerms = 166 score = 11.9839
Moving to better neighbor
Progress: Iter 031 of 300 score=11.9839, nGerms=166: 
  No better neighbor. Relaxing score w/slack: 11.9839 => 13.1823
  Found better neighbor: nGerms = 165 score = 12.0229
Moving to better neighbor
Progress: Iter 032 of 300 score=12.0229, nGerms=165: 
  No better neighbor. Relaxing score w/slack: 12.0229 => 13.2252
  Found better neighbor: nGerms = 164 score = 12.0398
Moving to better neighbor
Progress: Iter 033 of 300 score=12.0398, nGerms=164: 
  No better neighbor. Relaxing score w/slack: 12.0398 => 13.2438
  Found better neighbor: nGerms = 163 score = 12.0796
Moving to better neighbor
Progress: Iter 034 of 300 score=12.0796, nGerms=163: 
  No better neighbor. Relaxing score w/slack: 12.0796 => 13.2875
  Found better neighbor: nGerms = 162 score = 12.1171
Moving to better neighbor
Progress: Iter 035 of 300 score=12.1171, nGerms=162: 
  No better neighbor. Relaxing score w/slack: 12.1171 => 13.3288
  Found better neighbor: nGerms = 161 score = 12.1338
Moving to better neighbor
Progress: Iter 036 of 300 score=12.1338, nGerms=161: 
  No better neighbor. Relaxing score w/slack: 12.1338 => 13.3472
  Found better neighbor: nGerms = 160 score = 12.1698
Moving to better neighbor
Progress: Iter 037 of 300 score=12.1698, nGerms=160: 
  No better neighbor. Relaxing score w/slack: 12.1698 => 13.3867
  Found better neighbor: nGerms = 159 score = 12.2194
Moving to better neighbor
Progress: Iter 038 of 300 score=12.2194, nGerms=159: 
  No better neighbor. Relaxing score w/slack: 12.2194 => 13.4413
  Found better neighbor: nGerms = 158 score = 12.2644
Moving to better neighbor
Progress: Iter 039 of 300 score=12.2644, nGerms=158: 
  No better neighbor. Relaxing score w/slack: 12.2644 => 13.4909
  Found better neighbor: nGerms = 157 score = 12.293
Moving to better neighbor
Progress: Iter 040 of 300 score=12.293, nGerms=157: 
  No better neighbor. Relaxing score w/slack: 12.293 => 13.5223
  Found better neighbor: nGerms = 156 score = 12.337
Moving to better neighbor
Progress: Iter 041 of 300 score=12.337, nGerms=156: 
  No better neighbor. Relaxing score w/slack: 12.337 => 13.5707
  Found better neighbor: nGerms = 155 score = 12.4856
Moving to better neighbor
Progress: Iter 042 of 300 score=12.4856, nGerms=155: 
  No better neighbor. Relaxing score w/slack: 12.4856 => 13.7342
  Found better neighbor: nGerms = 154 score = 12.624
Moving to better neighbor
Progress: Iter 043 of 300 score=12.624, nGerms=154: 
  No better neighbor. Relaxing score w/slack: 12.624 => 13.8863
  Found better neighbor: nGerms = 153 score = 12.6754
Moving to better neighbor
Progress: Iter 044 of 300 score=12.6754, nGerms=153: 
  No better neighbor. Relaxing score w/slack: 12.6754 => 13.9429
  Found better neighbor: nGerms = 152 score = 12.7422
Moving to better neighbor
Progress: Iter 045 of 300 score=12.7422, nGerms=152: 
  No better neighbor. Relaxing score w/slack: 12.7422 => 14.0164
  Found better neighbor: nGerms = 151 score = 12.8284
Moving to better neighbor
Progress: Iter 046 of 300 score=12.8284, nGerms=151: 
  No better neighbor. Relaxing score w/slack: 12.8284 => 14.1113
  Found better neighbor: nGerms = 150 score = 12.8761
Moving to better neighbor
Progress: Iter 047 of 300 score=12.8761, nGerms=150: 
  No better neighbor. Relaxing score w/slack: 12.8761 => 14.1637
  Found better neighbor: nGerms = 149 score = 12.9373
Moving to better neighbor
Progress: Iter 048 of 300 score=12.9373, nGerms=149: 
  No better neighbor. Relaxing score w/slack: 12.9373 => 14.231
  Found better neighbor: nGerms = 148 score = 12.9569
Moving to better neighbor
Progress: Iter 049 of 300 score=12.9569, nGerms=148: 
  No better neighbor. Relaxing score w/slack: 12.9569 => 14.2525
  Found better neighbor: nGerms = 147 score = 12.9811
Moving to better neighbor
Progress: Iter 050 of 300 score=12.9811, nGerms=147: 
  No better neighbor. Relaxing score w/slack: 12.9811 => 14.2792
  Found better neighbor: nGerms = 146 score = 13.0605
Moving to better neighbor
Progress: Iter 051 of 300 score=13.0605, nGerms=146: 
  No better neighbor. Relaxing score w/slack: 13.0605 => 14.3666
  Found better neighbor: nGerms = 145 score = 13.0793
Moving to better neighbor
Progress: Iter 052 of 300 score=13.0793, nGerms=145: 
  No better neighbor. Relaxing score w/slack: 13.0793 => 14.3872
  Found better neighbor: nGerms = 144 score = 13.1623
Moving to better neighbor
Progress: Iter 053 of 300 score=13.1623, nGerms=144: 
  No better neighbor. Relaxing score w/slack: 13.1623 => 14.4785
  Found better neighbor: nGerms = 143 score = 13.1907
Moving to better neighbor
Progress: Iter 054 of 300 score=13.1907, nGerms=143: 
  No better neighbor. Relaxing score w/slack: 13.1907 => 14.5098
  Found better neighbor: nGerms = 142 score = 13.2487
Moving to better neighbor
Progress: Iter 055 of 300 score=13.2487, nGerms=142: 
  No better neighbor. Relaxing score w/slack: 13.2487 => 14.5736
  Found better neighbor: nGerms = 141 score = 13.3277
Moving to better neighbor
Progress: Iter 056 of 300 score=13.3277, nGerms=141: 
  No better neighbor. Relaxing score w/slack: 13.3277 => 14.6605
  Found better neighbor: nGerms = 140 score = 13.3522
Moving to better neighbor
Progress: Iter 057 of 300 score=13.3522, nGerms=140: 
  No better neighbor. Relaxing score w/slack: 13.3522 => 14.6874
  Found better neighbor: nGerms = 139 score = 13.433
Moving to better neighbor
Progress: Iter 058 of 300 score=13.433, nGerms=139: 
  No better neighbor. Relaxing score w/slack: 13.433 => 14.7763
  Found better neighbor: nGerms = 138 score = 13.4574
Moving to better neighbor
Progress: Iter 059 of 300 score=13.4574, nGerms=138: 
  No better neighbor. Relaxing score w/slack: 13.4574 => 14.8032
  Found better neighbor: nGerms = 137 score = 13.4867
Moving to better neighbor
Progress: Iter 060 of 300 score=13.4867, nGerms=137: 
  No better neighbor. Relaxing score w/slack: 13.4867 => 14.8354
  Found better neighbor: nGerms = 136 score = 13.5122
Moving to better neighbor
Progress: Iter 061 of 300 score=13.5122, nGerms=136: 
  No better neighbor. Relaxing score w/slack: 13.5122 => 14.8634
  Found better neighbor: nGerms = 135 score = 13.5398
Moving to better neighbor
Progress: Iter 062 of 300 score=13.5398, nGerms=135: 
  No better neighbor. Relaxing score w/slack: 13.5398 => 14.8937
  Found better neighbor: nGerms = 134 score = 13.6221
Moving to better neighbor
Progress: Iter 063 of 300 score=13.6221, nGerms=134: 
  No better neighbor. Relaxing score w/slack: 13.6221 => 14.9843
  Found better neighbor: nGerms = 133 score = 13.6716
Moving to better neighbor
Progress: Iter 064 of 300 score=13.6716, nGerms=133: 
  No better neighbor. Relaxing score w/slack: 13.6716 => 15.0387
  Found better neighbor: nGerms = 132 score = 13.7159
Moving to better neighbor
Progress: Iter 065 of 300 score=13.7159, nGerms=132: 
  No better neighbor. Relaxing score w/slack: 13.7159 => 15.0875
  Found better neighbor: nGerms = 131 score = 13.7546
Moving to better neighbor
Progress: Iter 066 of 300 score=13.7546, nGerms=131: 
  No better neighbor. Relaxing score w/slack: 13.7546 => 15.1301
  Found better neighbor: nGerms = 130 score = 13.7828
Moving to better neighbor
Progress: Iter 067 of 300 score=13.7828, nGerms=130: 
  No better neighbor. Relaxing score w/slack: 13.7828 => 15.1611
  Found better neighbor: nGerms = 129 score = 13.833
Moving to better neighbor
Progress: Iter 068 of 300 score=13.833, nGerms=129: 
  No better neighbor. Relaxing score w/slack: 13.833 => 15.2163
  Found better neighbor: nGerms = 128 score = 13.9334
Moving to better neighbor
Progress: Iter 069 of 300 score=13.9334, nGerms=128: 
  No better neighbor. Relaxing score w/slack: 13.9334 => 15.3268
  Found better neighbor: nGerms = 127 score = 13.9788
Moving to better neighbor
Progress: Iter 070 of 300 score=13.9788, nGerms=127: 
  No better neighbor. Relaxing score w/slack: 13.9788 => 15.3767
  Found better neighbor: nGerms = 126 score = 14.0385
Moving to better neighbor
Progress: Iter 071 of 300 score=14.0385, nGerms=126: 
  No better neighbor. Relaxing score w/slack: 14.0385 => 15.4423
  Found better neighbor: nGerms = 125 score = 14.0681
Moving to better neighbor
Progress: Iter 072 of 300 score=14.0681, nGerms=125: 
  No better neighbor. Relaxing score w/slack: 14.0681 => 15.4749
  Found better neighbor: nGerms = 124 score = 14.0991
Moving to better neighbor
Progress: Iter 073 of 300 score=14.0991, nGerms=124: 
  No better neighbor. Relaxing score w/slack: 14.0991 => 15.5091
  Found better neighbor: nGerms = 123 score = 14.154
Moving to better neighbor
Progress: Iter 074 of 300 score=14.154, nGerms=123: 
  No better neighbor. Relaxing score w/slack: 14.154 => 15.5694
  Found better neighbor: nGerms = 122 score = 14.2017
Moving to better neighbor
Progress: Iter 075 of 300 score=14.2017, nGerms=122: 
  No better neighbor. Relaxing score w/slack: 14.2017 => 15.6219
  Found better neighbor: nGerms = 121 score = 14.3076
Moving to better neighbor
Progress: Iter 076 of 300 score=14.3076, nGerms=121: 
  No better neighbor. Relaxing score w/slack: 14.3076 => 15.7384
  Found better neighbor: nGerms = 120 score = 14.3604
Moving to better neighbor
Progress: Iter 077 of 300 score=14.3604, nGerms=120: 
  No better neighbor. Relaxing score w/slack: 14.3604 => 15.7964
  Found better neighbor: nGerms = 119 score = 14.4009
Moving to better neighbor
Progress: Iter 078 of 300 score=14.4009, nGerms=119: 
  No better neighbor. Relaxing score w/slack: 14.4009 => 15.8409
  Found better neighbor: nGerms = 118 score = 14.4586
Moving to better neighbor
Progress: Iter 079 of 300 score=14.4586, nGerms=118: 
  No better neighbor. Relaxing score w/slack: 14.4586 => 15.9044
  Found better neighbor: nGerms = 117 score = 14.5195
Moving to better neighbor
Progress: Iter 080 of 300 score=14.5195, nGerms=117: 
  No better neighbor. Relaxing score w/slack: 14.5195 => 15.9714
  Found better neighbor: nGerms = 116 score = 14.6239
Moving to better neighbor
Progress: Iter 081 of 300 score=14.6239, nGerms=116: 
  No better neighbor. Relaxing score w/slack: 14.6239 => 16.0863
  Found better neighbor: nGerms = 115 score = 14.6536
Moving to better neighbor
Progress: Iter 082 of 300 score=14.6536, nGerms=115: 
  No better neighbor. Relaxing score w/slack: 14.6536 => 16.119
  Found better neighbor: nGerms = 114 score = 14.7145
Moving to better neighbor
Progress: Iter 083 of 300 score=14.7145, nGerms=114: 
  No better neighbor. Relaxing score w/slack: 14.7145 => 16.186
  Found better neighbor: nGerms = 113 score = 14.7667
Moving to better neighbor
Progress: Iter 084 of 300 score=14.7667, nGerms=113: 
  No better neighbor. Relaxing score w/slack: 14.7667 => 16.2434
  Found better neighbor: nGerms = 112 score = 14.8264
Moving to better neighbor
Progress: Iter 085 of 300 score=14.8264, nGerms=112: 
  No better neighbor. Relaxing score w/slack: 14.8264 => 16.3091
  Found better neighbor: nGerms = 111 score = 14.88
Moving to better neighbor
Progress: Iter 086 of 300 score=14.88, nGerms=111: 
  No better neighbor. Relaxing score w/slack: 14.88 => 16.368
  Found better neighbor: nGerms = 110 score = 14.9159
Moving to better neighbor
Progress: Iter 087 of 300 score=14.9159, nGerms=110: 
  No better neighbor. Relaxing score w/slack: 14.9159 => 16.4075
  Found better neighbor: nGerms = 109 score = 15.3234
Moving to better neighbor
Progress: Iter 088 of 300 score=15.3234, nGerms=109: 
  No better neighbor. Relaxing score w/slack: 15.3234 => 16.8557
  Found better neighbor: nGerms = 108 score = 15.6977
Moving to better neighbor
Progress: Iter 089 of 300 score=15.6977, nGerms=108: 
  No better neighbor. Relaxing score w/slack: 15.6977 => 17.2674
  Found better neighbor: nGerms = 107 score = 15.9624
Moving to better neighbor
Progress: Iter 090 of 300 score=15.9624, nGerms=107: 
  No better neighbor. Relaxing score w/slack: 15.9624 => 17.5586
  Found better neighbor: nGerms = 106 score = 16.1616
Moving to better neighbor
Progress: Iter 091 of 300 score=16.1616, nGerms=106: 
  No better neighbor. Relaxing score w/slack: 16.1616 => 17.7778
  Found better neighbor: nGerms = 105 score = 16.4501
Moving to better neighbor
Progress: Iter 092 of 300 score=16.4501, nGerms=105: 
  No better neighbor. Relaxing score w/slack: 16.4501 => 18.0951
  Found better neighbor: nGerms = 104 score = 16.6941
Moving to better neighbor
Progress: Iter 093 of 300 score=16.6941, nGerms=104: 
  No better neighbor. Relaxing score w/slack: 16.6941 => 18.3636
  Found better neighbor: nGerms = 103 score = 17.0848
Moving to better neighbor
Progress: Iter 094 of 300 score=17.0848, nGerms=103: 
  No better neighbor. Relaxing score w/slack: 17.0848 => 18.7933
  Found better neighbor: nGerms = 102 score = 17.2119
Moving to better neighbor
Progress: Iter 095 of 300 score=17.2119, nGerms=102: 
  No better neighbor. Relaxing score w/slack: 17.2119 => 18.9331
  Found better neighbor: nGerms = 101 score = 17.3988
Moving to better neighbor
Progress: Iter 096 of 300 score=17.3988, nGerms=101: 
  No better neighbor. Relaxing score w/slack: 17.3988 => 19.1386
  Found better neighbor: nGerms = 100 score = 17.7383
Moving to better neighbor
Progress: Iter 097 of 300 score=17.7383, nGerms=100: 
  No better neighbor. Relaxing score w/slack: 17.7383 => 19.5121
  Found better neighbor: nGerms = 99 score = 17.8199
Moving to better neighbor
Progress: Iter 098 of 300 score=17.8199, nGerms=99: 
  No better neighbor. Relaxing score w/slack: 17.8199 => 19.6018
  Found better neighbor: nGerms = 98 score = 18.1677
Moving to better neighbor
Progress: Iter 099 of 300 score=18.1677, nGerms=98: 
  No better neighbor. Relaxing score w/slack: 18.1677 => 19.9844
  Found better neighbor: nGerms = 97 score = 18.391
Moving to better neighbor
Progress: Iter 100 of 300 score=18.391, nGerms=97: 
  No better neighbor. Relaxing score w/slack: 18.391 => 20.2301
  Found better neighbor: nGerms = 96 score = 18.7934
Moving to better neighbor
Progress: Iter 101 of 300 score=18.7934, nGerms=96: 
  No better neighbor. Relaxing score w/slack: 18.7934 => 20.6727
  Found better neighbor: nGerms = 95 score = 19.2049
Moving to better neighbor
Progress: Iter 102 of 300 score=19.2049, nGerms=95: 
  No better neighbor. Relaxing score w/slack: 19.2049 => 21.1254
  Found better neighbor: nGerms = 94 score = 19.3664
Moving to better neighbor
Progress: Iter 103 of 300 score=19.3664, nGerms=94: 
  No better neighbor. Relaxing score w/slack: 19.3664 => 21.3031
  Found better neighbor: nGerms = 93 score = 19.7834
Moving to better neighbor
Progress: Iter 104 of 300 score=19.7834, nGerms=93: 
  No better neighbor. Relaxing score w/slack: 19.7834 => 21.7618
  Found better neighbor: nGerms = 92 score = 19.9919
Moving to better neighbor
Progress: Iter 105 of 300 score=19.9919, nGerms=92: 
  No better neighbor. Relaxing score w/slack: 19.9919 => 21.9911
  Found better neighbor: nGerms = 91 score = 20.2937
Moving to better neighbor
Progress: Iter 106 of 300 score=20.2937, nGerms=91: 
  No better neighbor. Relaxing score w/slack: 20.2937 => 22.3231
  Found better neighbor: nGerms = 90 score = 20.6508
Moving to better neighbor
Progress: Iter 107 of 300 score=20.6508, nGerms=90: 
  No better neighbor. Relaxing score w/slack: 20.6508 => 22.7159
  Found better neighbor: nGerms = 89 score = 20.9049
Moving to better neighbor
Progress: Iter 108 of 300 score=20.9049, nGerms=89: 
  No better neighbor. Relaxing score w/slack: 20.9049 => 22.9954
  Found better neighbor: nGerms = 88 score = 21.1631
Moving to better neighbor
Progress: Iter 109 of 300 score=21.1631, nGerms=88: 
  No better neighbor. Relaxing score w/slack: 21.1631 => 23.2794
  Found better neighbor: nGerms = 87 score = 21.3744
Moving to better neighbor
Progress: Iter 110 of 300 score=21.3744, nGerms=87: 
  No better neighbor. Relaxing score w/slack: 21.3744 => 23.5118
  Found better neighbor: nGerms = 86 score = 21.975
Moving to better neighbor
Progress: Iter 111 of 300 score=21.975, nGerms=86: 
  No better neighbor. Relaxing score w/slack: 21.975 => 24.1725
  Found better neighbor: nGerms = 85 score = 22.2654
Moving to better neighbor
Progress: Iter 112 of 300 score=22.2654, nGerms=85: 
  No better neighbor. Relaxing score w/slack: 22.2654 => 24.492
  Found better neighbor: nGerms = 84 score = 22.5543
Moving to better neighbor
Progress: Iter 113 of 300 score=22.5543, nGerms=84: 
  No better neighbor. Relaxing score w/slack: 22.5543 => 24.8098
  Found better neighbor: nGerms = 83 score = 22.9896
Moving to better neighbor
Progress: Iter 114 of 300 score=22.9896, nGerms=83: 
  No better neighbor. Relaxing score w/slack: 22.9896 => 25.2885
  Found better neighbor: nGerms = 82 score = 23.3538
Moving to better neighbor
Progress: Iter 115 of 300 score=23.3538, nGerms=82: 
  No better neighbor. Relaxing score w/slack: 23.3538 => 25.6892
  Found better neighbor: nGerms = 81 score = 23.5247
Moving to better neighbor
Progress: Iter 116 of 300 score=23.5247, nGerms=81: 
  No better neighbor. Relaxing score w/slack: 23.5247 => 25.8772
  Found better neighbor: nGerms = 80 score = 24.0524
Moving to better neighbor
Progress: Iter 117 of 300 score=24.0524, nGerms=80: 
  No better neighbor. Relaxing score w/slack: 24.0524 => 26.4576
  Found better neighbor: nGerms = 79 score = 24.501
Moving to better neighbor
Progress: Iter 118 of 300 score=24.501, nGerms=79: 
  No better neighbor. Relaxing score w/slack: 24.501 => 26.9511
  Found better neighbor: nGerms = 78 score = 24.8828
Moving to better neighbor
Progress: Iter 119 of 300 score=24.8828, nGerms=78: 
  No better neighbor. Relaxing score w/slack: 24.8828 => 27.3711
  Found better neighbor: nGerms = 77 score = 25.3037
Moving to better neighbor
Progress: Iter 120 of 300 score=25.3037, nGerms=77: 
  No better neighbor. Relaxing score w/slack: 25.3037 => 27.8341
  Found better neighbor: nGerms = 76 score = 25.7762
Moving to better neighbor
Progress: Iter 121 of 300 score=25.7762, nGerms=76: 
  No better neighbor. Relaxing score w/slack: 25.7762 => 28.3539
  Found better neighbor: nGerms = 75 score = 26.6372
Moving to better neighbor
Progress: Iter 122 of 300 score=26.6372, nGerms=75: 
  No better neighbor. Relaxing score w/slack: 26.6372 => 29.301
  Found better neighbor: nGerms = 74 score = 27.0938
Moving to better neighbor
Progress: Iter 123 of 300 score=27.0938, nGerms=74: 
  No better neighbor. Relaxing score w/slack: 27.0938 => 29.8031
  Found better neighbor: nGerms = 73 score = 27.7327
Moving to better neighbor
Progress: Iter 124 of 300 score=27.7327, nGerms=73: 
  No better neighbor. Relaxing score w/slack: 27.7327 => 30.506
  Found better neighbor: nGerms = 72 score = 28.1142
Moving to better neighbor
Progress: Iter 125 of 300 score=28.1142, nGerms=72: 
  No better neighbor. Relaxing score w/slack: 28.1142 => 30.9256
  Found better neighbor: nGerms = 71 score = 29.0001
Moving to better neighbor
Progress: Iter 126 of 300 score=29.0001, nGerms=71: 
  No better neighbor. Relaxing score w/slack: 29.0001 => 31.9001
  Found better neighbor: nGerms = 70 score = 29.7588
Moving to better neighbor
Progress: Iter 127 of 300 score=29.7588, nGerms=70: 
  No better neighbor. Relaxing score w/slack: 29.7588 => 32.7346
  Found better neighbor: nGerms = 69 score = 30.6467
Moving to better neighbor
Progress: Iter 128 of 300 score=30.6467, nGerms=69: 
  No better neighbor. Relaxing score w/slack: 30.6467 => 33.7114
  Found better neighbor: nGerms = 68 score = 31.8267
Moving to better neighbor
Progress: Iter 129 of 300 score=31.8267, nGerms=68: 
  No better neighbor. Relaxing score w/slack: 31.8267 => 35.0094
  Found better neighbor: nGerms = 67 score = 32.9384
Moving to better neighbor
Progress: Iter 130 of 300 score=32.9384, nGerms=67: 
  No better neighbor. Relaxing score w/slack: 32.9384 => 36.2322
  Found better neighbor: nGerms = 66 score = 33.6263
Moving to better neighbor
Progress: Iter 131 of 300 score=33.6263, nGerms=66: 
  No better neighbor. Relaxing score w/slack: 33.6263 => 36.9889
  Found better neighbor: nGerms = 65 score = 35.2724
Moving to better neighbor
Progress: Iter 132 of 300 score=35.2724, nGerms=65: 
  No better neighbor. Relaxing score w/slack: 35.2724 => 38.7996
  Found better neighbor: nGerms = 64 score = 35.6932
Moving to better neighbor
Progress: Iter 133 of 300 score=35.6932, nGerms=64: 
  No better neighbor. Relaxing score w/slack: 35.6932 => 39.2625
  Found better neighbor: nGerms = 63 score = 38.6285
Moving to better neighbor
Progress: Iter 134 of 300 score=38.6285, nGerms=63: 
  No better neighbor. Relaxing score w/slack: 38.6285 => 42.4914
  Found better neighbor: nGerms = 62 score = 39.1288
Moving to better neighbor
Progress: Iter 135 of 300 score=39.1288, nGerms=62: 
  No better neighbor. Relaxing score w/slack: 39.1288 => 43.0417
  Found better neighbor: nGerms = 61 score = 40.8754
Moving to better neighbor
Progress: Iter 136 of 300 score=40.8754, nGerms=61: 
  No better neighbor. Relaxing score w/slack: 40.8754 => 44.963
  Found better neighbor: nGerms = 60 score = 42.5476
Moving to better neighbor
Progress: Iter 137 of 300 score=42.5476, nGerms=60: 
  No better neighbor. Relaxing score w/slack: 42.5476 => 46.8024
  Found better neighbor: nGerms = 59 score = 43.7306
Moving to better neighbor
Progress: Iter 138 of 300 score=43.7306, nGerms=59: 
  No better neighbor. Relaxing score w/slack: 43.7306 => 48.1037
  Found better neighbor: nGerms = 58 score = 45.014
Moving to better neighbor
Progress: Iter 139 of 300 score=45.014, nGerms=58: 
  No better neighbor. Relaxing score w/slack: 45.014 => 49.5154
  Found better neighbor: nGerms = 57 score = 46.231
Moving to better neighbor
Progress: Iter 140 of 300 score=46.231, nGerms=57: 
  No better neighbor. Relaxing score w/slack: 46.231 => 50.8541
  Found better neighbor: nGerms = 56 score = 48.3127
Moving to better neighbor
Progress: Iter 141 of 300 score=48.3127, nGerms=56: 
  No better neighbor. Relaxing score w/slack: 48.3127 => 53.1439
  Found better neighbor: nGerms = 55 score = 49.1455
Moving to better neighbor
Progress: Iter 142 of 300 score=49.1455, nGerms=55: 
  No better neighbor. Relaxing score w/slack: 49.1455 => 54.0601
  Found better neighbor: nGerms = 54 score = 50.4693
Moving to better neighbor
Progress: Iter 143 of 300 score=50.4693, nGerms=54: 
  No better neighbor. Relaxing score w/slack: 50.4693 => 55.5162
  Found better neighbor: nGerms = 53 score = 51.5241
Moving to better neighbor
Progress: Iter 144 of 300 score=51.5241, nGerms=53: 
  No better neighbor. Relaxing score w/slack: 51.5241 => 56.6765
  Found better neighbor: nGerms = 52 score = 52.5701
Moving to better neighbor
Progress: Iter 145 of 300 score=52.5701, nGerms=52: 
  No better neighbor. Relaxing score w/slack: 52.5701 => 57.8271
  Found better neighbor: nGerms = 51 score = 56.5001
Moving to better neighbor
Progress: Iter 146 of 300 score=56.5001, nGerms=51: 
  No better neighbor. Relaxing score w/slack: 56.5001 => 62.1501
  Found better neighbor: nGerms = 50 score = 57.978
Moving to better neighbor
Progress: Iter 147 of 300 score=57.978, nGerms=50: 
  No better neighbor. Relaxing score w/slack: 57.978 => 63.7758
  Found better neighbor: nGerms = 49 score = 59.5596
Moving to better neighbor
Progress: Iter 148 of 300 score=59.5596, nGerms=49: 
  No better neighbor. Relaxing score w/slack: 59.5596 => 65.5155
  Found better neighbor: nGerms = 48 score = 60.1267
Moving to better neighbor
Progress: Iter 149 of 300 score=60.1267, nGerms=48: 
  No better neighbor. Relaxing score w/slack: 60.1267 => 66.1394
  Found better neighbor: nGerms = 47 score = 64.5931
Moving to better neighbor
Progress: Iter 150 of 300 score=64.5931, nGerms=47: 
  No better neighbor. Relaxing score w/slack: 64.5931 => 71.0525
  Found better neighbor: nGerms = 46 score = 66.46
Moving to better neighbor
Progress: Iter 151 of 300 score=66.46, nGerms=46: 
  No better neighbor. Relaxing score w/slack: 66.46 => 73.106
  Found better neighbor: nGerms = 45 score = 67.6399
Moving to better neighbor
Progress: Iter 152 of 300 score=67.6399, nGerms=45: 
  No better neighbor. Relaxing score w/slack: 67.6399 => 74.4039
  Found better neighbor: nGerms = 44 score = 67.9172
Moving to better neighbor
Progress: Iter 153 of 300 score=67.9172, nGerms=44: 
  No better neighbor. Relaxing score w/slack: 67.9172 => 74.7089
  Found better neighbor: nGerms = 43 score = 69.3683
Moving to better neighbor
Progress: Iter 154 of 300 score=69.3683, nGerms=43: 
  No better neighbor. Relaxing score w/slack: 69.3683 => 76.3051
  Found better neighbor: nGerms = 42 score = 71.3768
Moving to better neighbor
Progress: Iter 155 of 300 score=71.3768, nGerms=42: 
  No better neighbor. Relaxing score w/slack: 71.3768 => 78.5145
  Found better neighbor: nGerms = 41 score = 73.8704
Moving to better neighbor
Progress: Iter 156 of 300 score=73.8704, nGerms=41: 
  No better neighbor. Relaxing score w/slack: 73.8704 => 81.2574
  Found better neighbor: nGerms = 40 score = 74.3672
Moving to better neighbor
Progress: Iter 157 of 300 score=74.3672, nGerms=40: 
  No better neighbor. Relaxing score w/slack: 74.3672 => 81.8039
  Found better neighbor: nGerms = 39 score = 76.678
Moving to better neighbor
Progress: Iter 158 of 300 score=76.678, nGerms=39: 
  No better neighbor. Relaxing score w/slack: 76.678 => 84.3458
  Found better neighbor: nGerms = 38 score = 79.3627
Moving to better neighbor
Progress: Iter 159 of 300 score=79.3627, nGerms=38: 
  No better neighbor. Relaxing score w/slack: 79.3627 => 87.299
  Found better neighbor: nGerms = 37 score = 81.2294
Moving to better neighbor
Progress: Iter 160 of 300 score=81.2294, nGerms=37: 
  No better neighbor. Relaxing score w/slack: 81.2294 => 89.3523
  Found better neighbor: nGerms = 36 score = 85.5126
Moving to better neighbor
Progress: Iter 161 of 300 score=85.5126, nGerms=36: 
  No better neighbor. Relaxing score w/slack: 85.5126 => 94.0638
  Found better neighbor: nGerms = 35 score = 91.7223
Moving to better neighbor
Progress: Iter 162 of 300 score=91.7223, nGerms=35: 
  No better neighbor. Relaxing score w/slack: 91.7223 => 100.894
  Found better neighbor: nGerms = 34 score = 92.0657
Moving to better neighbor
Progress: Iter 163 of 300 score=92.0657, nGerms=34: 
  No better neighbor. Relaxing score w/slack: 92.0657 => 101.272
  Found better neighbor: nGerms = 33 score = 96.62
Moving to better neighbor
Progress: Iter 164 of 300 score=96.62, nGerms=33: 
  No better neighbor. Relaxing score w/slack: 96.62 => 106.282
  Found better neighbor: nGerms = 32 score = 99.6037
Moving to better neighbor
Progress: Iter 165 of 300 score=99.6037, nGerms=32: 
  No better neighbor. Relaxing score w/slack: 99.6037 => 109.564
  Found better neighbor: nGerms = 31 score = 103.453
Moving to better neighbor
Progress: Iter 166 of 300 score=103.453, nGerms=31: 
  No better neighbor. Relaxing score w/slack: 103.453 => 113.798
  Found better neighbor: nGerms = 30 score = 109.497
Moving to better neighbor
Progress: Iter 167 of 300 score=109.497, nGerms=30: 
  No better neighbor. Relaxing score w/slack: 109.497 => 120.447
  Found better neighbor: nGerms = 29 score = 115.956
Moving to better neighbor
Progress: Iter 168 of 300 score=115.956, nGerms=29: 
  No better neighbor. Relaxing score w/slack: 115.956 => 127.552
  Found better neighbor: nGerms = 28 score = 124.145
Moving to better neighbor
Progress: Iter 169 of 300 score=124.145, nGerms=28: 
  No better neighbor. Relaxing score w/slack: 124.145 => 136.56
  Found better neighbor: nGerms = 27 score = 131.878
Moving to better neighbor
Progress: Iter 170 of 300 score=131.878, nGerms=27: 
  No better neighbor. Relaxing score w/slack: 131.878 => 145.066
  Found better neighbor: nGerms = 26 score = 141.839
Moving to better neighbor
Progress: Iter 171 of 300 score=141.839, nGerms=26: 
  No better neighbor. Relaxing score w/slack: 141.839 => 156.023
  Found better neighbor: nGerms = 25 score = 143.558
Moving to better neighbor
Progress: Iter 172 of 300 score=143.558, nGerms=25: 
  No better neighbor. Relaxing score w/slack: 143.558 => 157.914
  Found better neighbor: nGerms = 24 score = 147.169
Moving to better neighbor
Progress: Iter 173 of 300 score=147.169, nGerms=24: 
  No better neighbor. Relaxing score w/slack: 147.169 => 161.886
  Found better neighbor: nGerms = 23 score = 153.03
Moving to better neighbor
Progress: Iter 174 of 300 score=153.03, nGerms=23: 
  No better neighbor. Relaxing score w/slack: 153.03 => 168.333
  Found better neighbor: nGerms = 22 score = 163.703
Moving to better neighbor
Progress: Iter 175 of 300 score=163.703, nGerms=22: 
  No better neighbor. Relaxing score w/slack: 163.703 => 180.073
  Found better neighbor: nGerms = 21 score = 177.36
Moving to better neighbor
Progress: Iter 176 of 300 score=177.36, nGerms=21: 
  No better neighbor. Relaxing score w/slack: 177.36 => 195.096
  Found better neighbor: nGerms = 20 score = 190.053
Moving to better neighbor
Progress: Iter 177 of 300 score=190.053, nGerms=20: 
  No better neighbor. Relaxing score w/slack: 190.053 => 209.058
  Found better neighbor: nGerms = 19 score = 193.461
Moving to better neighbor
Progress: Iter 178 of 300 score=193.461, nGerms=19: 
  No better neighbor. Relaxing score w/slack: 193.461 => 212.807
  Found better neighbor: nGerms = 18 score = 194.579
Moving to better neighbor
Progress: Iter 179 of 300 score=194.579, nGerms=18: 
  No better neighbor. Relaxing score w/slack: 194.579 => 214.037
  Found better neighbor: nGerms = 17 score = 196.325
Moving to better neighbor
Progress: Iter 180 of 300 score=196.325, nGerms=17: 
  No better neighbor. Relaxing score w/slack: 196.325 => 215.958
  Found better neighbor: nGerms = 16 score = 199.369
Moving to better neighbor
Progress: Iter 181 of 300 score=199.369, nGerms=16: 
  No better neighbor. Relaxing score w/slack: 199.369 => 219.306
  Found better neighbor: nGerms = 15 score = 212.154
Moving to better neighbor
Progress: Iter 182 of 300 score=212.154, nGerms=15: 
  No better neighbor. Relaxing score w/slack: 212.154 => 233.369
  Found better neighbor: nGerms = 14 score = 213.519
Moving to better neighbor
Progress: Iter 183 of 300 score=213.519, nGerms=14: 
  No better neighbor. Relaxing score w/slack: 213.519 => 234.871
  Found better neighbor: nGerms = 13 score = 227.376
Moving to better neighbor
Progress: Iter 184 of 300 score=227.376, nGerms=13: 
  No better neighbor. Relaxing score w/slack: 227.376 => 250.114
Stationary point found!
score = 250.114088818
weights = [1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1
 0 0 0 0 0 0 0 1 0 0 1]
L1(weights) = 13

Germ selection completed in 586.3810129165649 seconds.
germList1 is AC.
In [8]:
#We have a germ set now!  Let's see what it looks like:
for germ in germList1:
    print(germ)
Gi
Gx
Gy
GiGxGyGyGiGy
GiGxGyGyGyGx
GiGyGiGyGxGy
GiGyGiGyGyGx
GiGyGxGyGxGy
GiGyGyGxGxGy
GiGyGyGyGxGx
GiGyGyGyGxGy
GxGxGyGyGxGy
GxGyGyGyGyGy
In [9]:
#Can we reduce this set in size and make some of the germs shorter by:
#1.  Adding extra random germs of varying lengths
#2.  Turning up the gatePenalty parameter
#3.  Relaxing slackFrac to 0.25?

testGermList1 = germList1 +\
                            pygsti.construction.list_random_gatestrings_onelen(std.gates,2,10,0)+\
                            pygsti.construction.list_random_gatestrings_onelen(std.gates,3,10,0)+\
                            pygsti.construction.list_random_gatestrings_onelen(std.gates,4,10,1)+\
                            pygsti.construction.list_random_gatestrings_onelen(std.gates,5,10,2)

testGermList1 = pygsti.listtools.remove_duplicates(testGermList1)

start = time.time()
germList2 = pygsti.algorithms.germselection.optimize_integer_germs_slack(std.gs_target,testGermList1,numCopies=5,
                                                                         initialWeights=None,slackFrac=0.25,
                                                                         gatePenalty = 1e0,
                                                                         force="singletons",
                                                                         maxIter=300,
                                                                         verbosity=2)
end = time.time()
print()
print("Germ selection completed in", end-start, "seconds.")
print("germList2 is", "not "*(1-pygsti.algorithms.germselection.test_germ_list_infl(gs_real,germList1))+"AC.")
Complete initial germ set succeeds on all input gatesets.
Now searching for best germ set.
Starting germ set optimization. Lower score is better.
Gateset has 14 gauge params.
Progress: Iter 001 of 300 score=233.247, nGerms=46: 
  Found better neighbor: nGerms = 45 score = 227.666
  Found better neighbor: nGerms = 45 score = 227.478
  Found better neighbor: nGerms = 45 score = 227.328
Moving to better neighbor
Progress: Iter 002 of 300 score=227.328, nGerms=45: 
  Found better neighbor: nGerms = 44 score = 221.748
  Found better neighbor: nGerms = 44 score = 221.561
  Found better neighbor: nGerms = 44 score = 221.413
Moving to better neighbor
Progress: Iter 003 of 300 score=221.413, nGerms=44: 
  Found better neighbor: nGerms = 43 score = 215.833
  Found better neighbor: nGerms = 43 score = 215.647
Moving to better neighbor
Progress: Iter 004 of 300 score=215.647, nGerms=43: 
  Found better neighbor: nGerms = 42 score = 210.072
Moving to better neighbor
Progress: Iter 005 of 300 score=210.072, nGerms=42: 
  Found better neighbor: nGerms = 41 score = 209.755
  Found better neighbor: nGerms = 41 score = 205.29
  Found better neighbor: nGerms = 41 score = 205.191
  Found better neighbor: nGerms = 41 score = 205.164
Moving to better neighbor
Progress: Iter 006 of 300 score=205.164, nGerms=41: 
  Found better neighbor: nGerms = 40 score = 204.851
  Found better neighbor: nGerms = 40 score = 200.381
  Found better neighbor: nGerms = 40 score = 200.282
  Found better neighbor: nGerms = 40 score = 200.268
Moving to better neighbor
Progress: Iter 007 of 300 score=200.268, nGerms=40: 
  Found better neighbor: nGerms = 39 score = 199.961
  Found better neighbor: nGerms = 39 score = 195.485
  Found better neighbor: nGerms = 39 score = 195.387
Moving to better neighbor
Progress: Iter 008 of 300 score=195.387, nGerms=39: 
  Found better neighbor: nGerms = 38 score = 195.08
  Found better neighbor: nGerms = 38 score = 190.604
Moving to better neighbor
Progress: Iter 009 of 300 score=190.604, nGerms=38: 
  Found better neighbor: nGerms = 37 score = 190.478
  Found better neighbor: nGerms = 37 score = 189.023
  Found better neighbor: nGerms = 37 score = 189.023
  Found better neighbor: nGerms = 37 score = 187.997
  Found better neighbor: nGerms = 37 score = 187.982
  Found better neighbor: nGerms = 37 score = 187.147
  Found better neighbor: nGerms = 37 score = 186.928
  Found better neighbor: nGerms = 37 score = 186.793
  Found better neighbor: nGerms = 37 score = 186.755
  Found better neighbor: nGerms = 37 score = 185.882
Moving to better neighbor
Progress: Iter 010 of 300 score=185.882, nGerms=37: 
  Found better neighbor: nGerms = 36 score = 185.771
  Found better neighbor: nGerms = 36 score = 184.304
  Found better neighbor: nGerms = 36 score = 184.304
  Found better neighbor: nGerms = 36 score = 183.279
  Found better neighbor: nGerms = 36 score = 183.259
  Found better neighbor: nGerms = 36 score = 182.423
  Found better neighbor: nGerms = 36 score = 182.213
  Found better neighbor: nGerms = 36 score = 182.077
  Found better neighbor: nGerms = 36 score = 182.035
  Found better neighbor: nGerms = 36 score = 181.552
  Found better neighbor: nGerms = 36 score = 181.165
Moving to better neighbor
Progress: Iter 011 of 300 score=181.165, nGerms=36: 
  Found better neighbor: nGerms = 35 score = 181.062
  Found better neighbor: nGerms = 35 score = 179.588
  Found better neighbor: nGerms = 35 score = 178.562
  Found better neighbor: nGerms = 35 score = 178.562
  Found better neighbor: nGerms = 35 score = 177.879
  Found better neighbor: nGerms = 35 score = 177.497
  Found better neighbor: nGerms = 35 score = 177.429
  Found better neighbor: nGerms = 35 score = 177.318
  Found better neighbor: nGerms = 35 score = 177.043
  Found better neighbor: nGerms = 35 score = 176.552
Moving to better neighbor
Progress: Iter 012 of 300 score=176.552, nGerms=35: 
  Found better neighbor: nGerms = 34 score = 176.461
  Found better neighbor: nGerms = 34 score = 174.977
  Found better neighbor: nGerms = 34 score = 174.977
  Found better neighbor: nGerms = 34 score = 173.949
  Found better neighbor: nGerms = 34 score = 173.555
  Found better neighbor: nGerms = 34 score = 172.884
  Found better neighbor: nGerms = 34 score = 172.705
Moving to better neighbor
Progress: Iter 013 of 300 score=172.705, nGerms=34: 
  Found better neighbor: nGerms = 33 score = 172.639
  Found better neighbor: nGerms = 33 score = 171.13
  Found better neighbor: nGerms = 33 score = 171.13
  Found better neighbor: nGerms = 33 score = 170.107
  Found better neighbor: nGerms = 33 score = 170.107
  Found better neighbor: nGerms = 33 score = 169.708
  Found better neighbor: nGerms = 33 score = 169.042
  Found better neighbor: nGerms = 33 score = 168.996
  Found better neighbor: nGerms = 33 score = 168.934
Moving to better neighbor
Progress: Iter 014 of 300 score=168.934, nGerms=33: 
  Found better neighbor: nGerms = 32 score = 167.366
  Found better neighbor: nGerms = 32 score = 166.344
  Found better neighbor: nGerms = 32 score = 165.276
  Found better neighbor: nGerms = 32 score = 165.237
Moving to better neighbor
Progress: Iter 015 of 300 score=165.237, nGerms=32: 
  Found better neighbor: nGerms = 31 score = 163.686
  Found better neighbor: nGerms = 31 score = 163.686
  Found better neighbor: nGerms = 31 score = 162.662
  Found better neighbor: nGerms = 31 score = 161.595
Moving to better neighbor
Progress: Iter 016 of 300 score=161.595, nGerms=31: 
  Found better neighbor: nGerms = 30 score = 160.065
  Found better neighbor: nGerms = 30 score = 159.135
  Found better neighbor: nGerms = 30 score = 159.135
  Found better neighbor: nGerms = 30 score = 158.3
Moving to better neighbor
Progress: Iter 017 of 300 score=158.3, nGerms=30: 
  Found better neighbor: nGerms = 29 score = 156.778
  Found better neighbor: nGerms = 29 score = 155.84
  Found better neighbor: nGerms = 29 score = 155.84
  Found better neighbor: nGerms = 29 score = 155.076
Moving to better neighbor
Progress: Iter 018 of 300 score=155.076, nGerms=29: 
  Found better neighbor: nGerms = 28 score = 153.558
  Found better neighbor: nGerms = 28 score = 153.558
  Found better neighbor: nGerms = 28 score = 152.616
  Found better neighbor: nGerms = 28 score = 152.151
Moving to better neighbor
Progress: Iter 019 of 300 score=152.151, nGerms=28: 
  Found better neighbor: nGerms = 27 score = 150.647
  Found better neighbor: nGerms = 27 score = 150.647
  Found better neighbor: nGerms = 27 score = 149.692
  Found better neighbor: nGerms = 27 score = 149.692
  Found better neighbor: nGerms = 27 score = 149.35
  Found better neighbor: nGerms = 27 score = 149.329
Moving to better neighbor
Progress: Iter 020 of 300 score=149.329, nGerms=27: 
  Found better neighbor: nGerms = 26 score = 147.824
  Found better neighbor: nGerms = 26 score = 146.925
Moving to better neighbor
Progress: Iter 021 of 300 score=146.925, nGerms=26: 
  Found better neighbor: nGerms = 25 score = 145.526
  Found better neighbor: nGerms = 25 score = 144.727
Moving to better neighbor
Progress: Iter 022 of 300 score=144.727, nGerms=25: 
  Found better neighbor: nGerms = 24 score = 143.332
  Found better neighbor: nGerms = 24 score = 143.332
  Found better neighbor: nGerms = 24 score = 142.559
  Found better neighbor: nGerms = 24 score = 142.559
Moving to better neighbor
Progress: Iter 023 of 300 score=142.559, nGerms=24: 
  Found better neighbor: nGerms = 23 score = 141.296
  Found better neighbor: nGerms = 23 score = 141.296
  Found better neighbor: nGerms = 23 score = 141.236
  Found better neighbor: nGerms = 23 score = 140.482
Moving to better neighbor
Progress: Iter 024 of 300 score=140.482, nGerms=23: 
  Found better neighbor: nGerms = 22 score = 139.228
  Found better neighbor: nGerms = 22 score = 139.18
  Found better neighbor: nGerms = 22 score = 138.972
Moving to better neighbor
Progress: Iter 025 of 300 score=138.972, nGerms=22: 
  Found better neighbor: nGerms = 21 score = 137.956
  Found better neighbor: nGerms = 21 score = 137.956
Moving to better neighbor
Progress: Iter 026 of 300 score=137.956, nGerms=21: 
  Found better neighbor: nGerms = 20 score = 137.427
Moving to better neighbor
Progress: Iter 027 of 300 score=137.427, nGerms=20: 
  Found better neighbor: nGerms = 19 score = 137.076
Moving to better neighbor
Progress: Iter 028 of 300 score=137.076, nGerms=19: 
  No better neighbor. Relaxing score w/slack: 137.076 => 171.346
  Found better neighbor: nGerms = 18 score = 148.089
Moving to better neighbor
Progress: Iter 029 of 300 score=148.089, nGerms=18: 
  No better neighbor. Relaxing score w/slack: 148.089 => 185.111
  Found better neighbor: nGerms = 17 score = 183.271
Moving to better neighbor
Progress: Iter 030 of 300 score=183.271, nGerms=17: 
  No better neighbor. Relaxing score w/slack: 183.271 => 229.089
  Found better neighbor: nGerms = 16 score = 186.65
Moving to better neighbor
Progress: Iter 031 of 300 score=186.65, nGerms=16: 
  No better neighbor. Relaxing score w/slack: 186.65 => 233.312
  Found better neighbor: nGerms = 15 score = 187.688
Moving to better neighbor
Progress: Iter 032 of 300 score=187.688, nGerms=15: 
  No better neighbor. Relaxing score w/slack: 187.688 => 234.61
  Found better neighbor: nGerms = 14 score = 189.09
Moving to better neighbor
Progress: Iter 033 of 300 score=189.09, nGerms=14: 
  No better neighbor. Relaxing score w/slack: 189.09 => 236.362
  Found better neighbor: nGerms = 13 score = 190.07
Moving to better neighbor
Progress: Iter 034 of 300 score=190.07, nGerms=13: 
  No better neighbor. Relaxing score w/slack: 190.07 => 237.587
  Found better neighbor: nGerms = 12 score = 197.23
Moving to better neighbor
Progress: Iter 035 of 300 score=197.23, nGerms=12: 
  No better neighbor. Relaxing score w/slack: 197.23 => 246.537
  Found better neighbor: nGerms = 11 score = 198.403
Moving to better neighbor
Progress: Iter 036 of 300 score=198.403, nGerms=11: 
  No better neighbor. Relaxing score w/slack: 198.403 => 248.004
Stationary point found!
score = 248.004162285
weights = [1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0
 0 0 0 0 0 0 0 0 0]
L1(weights) = 11

Germ selection completed in 5.898771047592163 seconds.
germList2 is AC.
In [10]:
for germ in germList2:
    print(germ)
Gi
Gx
Gy
GiGyGyGxGxGy
GiGyGyGyGxGx
GxGxGyGyGxGy
GxGyGy
GiGiGy
GxGyGiGi
GiGiGiGx
GiGyGiGx
In [11]:
#Success!  Let's see if this germ set is AC for a bunch of random gate sets:

num_fails = 0
for i in range(100):
    if not pygsti.alg.germselection.test_germ_list_infl(std.gs_target.randomize_with_unitary(0.01,i),germList2):
        num_fails += 1
print('Germ set fails on', num_fails, 'gate sets out of 100.')
Germ set fails on 0 gate sets out of 100.
In [12]:
#Success!  We've selected a single-qubit germ set that has only 11 germs and is robust against noise.
#Further testing is possible by simulating GST data on a unitarily noisy gate set using these germs, and
#examinining whether or not 1/L scaling is achieved.

#Also, you can write your newfound germs to file:  
#pygsti.io.write_gatestring_list("mygerms.lst",germList2,"List of germs from tutorial")
In [ ]: