{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"# Fiducial and Germ Selection\n",
"\n",
"This notebook demonstrates how to generate sets of fiducial and germ sequences which form the building blocks of the gate sequences used by long-sequence GST. As described in previous tutorials, by structuring the GST sequences as\n",
"\n",
"`preparation_fiducial + repeated_germ + measurement_fiducial`\n",
"\n",
"long-sequence GST is highly sensitive to *all possible* (within the space of allowed gate sets). Furthermore, by iteratively increase the number of germ repetitions in `repeated_germ`, pyGSTi's iterative algorithms are able to avoid (usually!) local optima. \n",
"\n",
"Both germ and fiducial sets are determined for a given \"target\" gate set. We currently assume that this gate set contains unitary gates, such that infinitely many gates may be performed without moving away from a pure state. It is almost always the case that the desired \"target\" operations are unitary, so this isn't a burdensome assumption. If this isn't the case, one should find perform fiducial and germ selection on the nearest unitary gate set.\n",
"\n",
"## Fiducial Selection: the theory\n",
"The purpose of the preparation and measurement fiducial sequences, $\\{F_i\\}$ and $\\{H_i\\}$, is to prepare a sufficiently diverse set of input states, and a sufficiently diverse set of measurements, to completely probe an operation of interest - defined as the map that lies *between* the fiducials. This is achieved if (and only if) the input states $\\{\\rho_i\\}\\equiv \\{F_i|\\rho\\rangle\\rangle\\}$ and the measurement effects $\\{E_j\\} \\equiv \\{\\langle\\langle E|H_j\\}$ are both *informationally complete* (IC). A set of matrices is IC if and only if it spans the vector space of density matrices. For a Hilbert space of dimension $d$ this requires at least $d^2$ linearly independent elements.\n",
"\n",
"In general, *any* randomly chosen set of $d^2$ states or effects will be IC. So, for single-qubit GST, we could choose $d^2=4$ random fiducial sequences. However, while the resulting $\\{\\rho_i\\}$ and $\\{E_j\\}$ will almost certainly be linearly independent, they may be *close* to linearly dependent. \n",
"\n",
"To evaluate a set of fiducials we form a matrix $M$, which will allow us to quantify how linearly independent the resulting $\\{\\rho_i\\}$ or $\\{E_j\\}$ will be. If we are evaluating a set of preparation fiducials, then the i^th column of $M$ is $F_i|\\rho\\rangle\\rangle$; if measurement fiducials, the columns are $\\langle\\langle E|H_i$. This notation assumes a single native preparation or measurement effect; in the case when there are more this simply adds more columns $M$.\n",
"\n",
"We then form the square matrix $MM^T$. We either then score the fiducial set as the number of fiducials times the sum of the reciprocals of the eigenvalues of $MM^T$ (`scoreFunc = 'all'`) or by the number of fiducials times the reciprocal of the smallest eigenvalue of $MM^T$ (`scoreFunc = 'worst'`). In both cases, a lower score is better.\n",
"\n",
"In the `'all'` case, we are attempting to make all the fiducials as uniformly informationally complete as possible, that is, we are trying to make our fiducial set as sensitive as possible to all directions in Hilbert-Schmidt space. In the `'worst'` case, we are instead attempting minimize our insensitivity to the direction in Hilbert-Schmidt space that we are least sensitive to.\n",
"\n",
"## Germ Selection: the theory\n",
"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 assumed-IC preparation and measurement fiducial sequences, will yield a sensitivity that scales with the number of times each germ is repeated to *any* direction in the space of `GateSets` (defined by the gate set's parameterization). This completeness is relative a \"target\" gate set, just as in fiducial selection. While the detailed mathematics behind germ selection is beyond the scope of this tutorial, the essence of the algorithm is as follows. The Jacobian $J$ of a potential set of germs relative to the target `GateSet`'s parameters is constructed and the eigenvalues of $J^\\dagger J$ are computed. If the number of large eigenvalues values equals its maximum - the number of non-gauge `GateSet` parameters - then the germ set is deemed \"amplificationally complete\", and will amplify *any* gate error. More specifically, a germ set is scored using a combination of 1) the number of eigenvalues values above some threshold and 2) either the `'all'` or `'worst'` scoring function applied to the eigenvalues of $J^\\dagger J$. Several technical points make this slightly more complicated:\n",
"- only *gate* errors can be amplified, since only gates can be repeated. Thus, when computing the number of non-gauge parameters of the target gate set, we really mean the target gate set without any SPAM operations.\n",
"- typical perfect gates (e.g. $\\pi/2$ rotations) may contain symmetries which decrease the number of non-gauge parameters only at that perfect point in gate-set-space. As such, we add random unitary perturbations to the target `GateSet` before performing the Jacobian analysis to mitigate the possibility of mischaracterizing a direction as being amplified when it isn't for all `GateSet`s except the perfect one.\n",
"- In the Jacobian analysis, each germ is *twirled* to simulate the effect of it echoing out all directions except those that commute with it.\n",
"\n",
"If not all that made perfect sense, do not worry. The remainder of this tutorial focuses on how to do fiducial or germ selection using pyGSTi, and does not rely on a rock solid theoretical understanding of the methods."
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"## Fiducial and Germ selection in practice\n",
"The selection of fiducial and germ sequences in pyGSTi is similar in that each uses a numerical optimization which considers different possible \"candidate\" sets, and tries to find the one which scores the best. The modules `pygsti.algorithms.fiducialselection` and `pygsti.algorithms.germselection` contain the algorithms relevant to each type of sequence selection."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import pygsti\n",
"import pygsti.algorithms.fiducialselection as fidsel\n",
"import pygsti.algorithms.germselection as germsel"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"We'll begin by constructing a 1-qubit $X(\\pi/2)$, $Y(\\pi/2)$, $I$ gateset for which we will find germs and fiducials."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"gs_target = pygsti.construction.build_gateset(\n",
" [2], [('Q0',)], ['Gi', 'Gx', 'Gy'],\n",
" [\"I(Q0)\", \"X(pi/2,Q0)\", \"Y(pi/2,Q0)\"])"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"### Automated \"*laissez-faire*\" approach"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"We begin by demonstrating the most autmoated and hands-off approach to computing fiducials and germs -- by just providing the target gate set and accepting the defaults for all remaining optinal arguments. Note that one may compute these in either order - fiducial selection is usually much faster, since the required computation is significantly less."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Preparation fiducials:\n",
"['{}', 'Gx', 'Gy', 'GxGx']\n",
"Score: 31.999999999999986\n",
"Measurement fiducials:\n",
"['{}', 'Gx', 'Gy']\n",
"Score: 9.999999999999996\n"
]
}
],
"source": [
"prepFiducials, measFiducials = fidsel.generate_fiducials(gs_target)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using greedy algorithm.\n",
"Constructed germ set:\n",
"['Gi', 'Gx', 'Gy', 'GxGy', 'GiGiGiGiGiGx', 'GiGiGiGyGxGx', 'GiGiGiGxGyGx', 'GiGiGiGxGxGy', 'GxGxGyGxGyGy', 'GiGyGxGyGy']\n",
"Score: Score: major=-34.0 minor=184.78943191686915, N: 34\n"
]
}
],
"source": [
"germs = germsel.generate_germs(gs_target)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Now that we have germs and fiducials, we can construct the list of experiments we need to perform in\n",
"order to do GST. The only new things to provide at this point are the sizes for the experiments we want\n",
"to perform (in this case we want to perform between 0 and 256 gates between fiducial pairs, going up\n",
"by a factor of 2 at each stage)."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"maxLengths = [2**n for n in range(8 + 1)]\n",
"listOfExperiments = pygsti.construction.make_lsgst_experiment_list(\n",
" gs_target, prepFiducials, measFiducials, germs, maxLengths)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"### Less-automated, more control: useful optional arguments"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"There are many ways you can assume more control over the experiment design process. We'll only demonstrate\n",
"a few here, but all options are discussed in the documentation for the various functions we've used."
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"#### Different algorithms\n",
"There are a number of different algorithms available for germ selection. You can choose a non-default\n",
"algorithm by specifying the `algorithm` keyword argument. Each of the available algorithms has a set of keyword arguments of its own with which you can more precisely specify how you want it to behave. These keyword arguments can be passed as a dictionary to `generate_germs` through the keyword argument `algorithm_kwargs`."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Constructed germ set:\n",
"['Gi', 'Gx', 'Gy', 'GxGy', 'GiGiGiGiGiGy', 'GiGiGiGiGxGy', 'GiGiGiGiGyGx', 'GiGiGxGxGxGy', 'GiGiGyGyGyGx', 'GxGxGyGyGxGy']\n",
"Score: Score: major=-34.0 minor=82.51221271869544, N: 34\n"
]
}
],
"source": [
"graspGerms = germsel.generate_germs(gs_target, algorithm='grasp', algorithm_kwargs={'iterations': 1})"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Fiducial selection can be controlled in much the same way, using the same algorithms (except for `'greedy'`)."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using slack algorithm.\n",
"Preparation fiducials:\n",
"['{}', 'GxGy', 'GyGx', 'GyGy']\n",
"Score: 32.00000000000001\n",
"Measurement fiducials:\n",
"['{}', 'GxGy', 'GyGx']\n",
"Score: 9.999999999999996\n"
]
}
],
"source": [
"slackPrepFids, slackMeasFids = fidsel.generate_fiducials(gs_target, algorithm='slack',\n",
" algorithm_kwargs={'slackFrac': 0.25})"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"#### Germ and fiducial lengths\n",
"We can also adjust some algorithm-independent parameters for germ and fiducial selection. For instance, all\n",
"of the algorithms currently rely on having a pool of gatestring from which they construct germs and fiducials.\n",
"The size of this pool is set by specifying the longest germ or fiducial to include in this pool.\n",
"\n",
"For germ selection, the default maximum germ length is 6, and we can see that our original construction\n",
"indeed makes use of germs of length 6."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"max([len(germ) for germ in germs])"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"We can try and set the maximum germ length to 5 and see what we get."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using greedy algorithm.\n",
"Constructed germ set:\n",
"['Gi', 'Gx', 'Gy', 'GiGiGiGiGy', 'GxGy', 'GiGxGiGyGx', 'GiGiGiGxGy', 'GiGiGiGyGx', 'GiGxGyGxGx', 'GiGyGyGxGy']\n",
"Score: Score: major=-34.0 minor=55266.3128015056, N: 34\n"
]
}
],
"source": [
"germsMaxLength5 = germsel.generate_germs(gs_target, candidateGermCounts={5: 'all upto'})"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"text/plain": [
"5"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"max([len(germ) for germ in germsMaxLength5])"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Sure enough, we now have a germ set with a shorter longest germ. If we get too ambitious in shortening the maximum\n",
"germ length, germ selection won't be able to find an amplificationally complete germ set. It will send a warning\n",
"message to `stderr` if this happens and return `None`."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using greedy algorithm.\n",
"None\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"WARNING: Complete initial germ set FAILS on gateset 0.\n",
"\n",
"WARNING: Aborting search.\n"
]
}
],
"source": [
"germsMaxLength3 = germsel.generate_germs(gs_target, candidateGermCounts={3: 'all upto'})\n",
"print(germsMaxLength3)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Fiducial selection defaults to a maximum fiducial length of 2. This allows us to construct an informationally\n",
"complete set of states and measurements, but for this gateset we know that there is a uniformly\n",
"informationally complete set of states and measurements that require fiducials of up to length 3. We can find\n",
"that set of fiducials by telling `generate_fiducials` to consider longer fiducials."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Preparation fiducials:\n",
"['{}', 'GxGx', 'Gy', 'Gx']\n",
"Score: 31.999999999999975\n",
"Measurement fiducials:\n",
"['{}', 'Gx', 'Gy']\n",
"Score: 9.999999999999996\n"
]
}
],
"source": [
"uniformPrepFids, uniformMeasFids = fidsel.generate_fiducials(gs_target, maxFidLength=3,\n",
" algorithm='grasp',\n",
" algorithm_kwargs={'iterations': 100})"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"As was the case with germ selection, if you are too aggressive in limiting fiducial length you may\n",
"constrain the algorithm to the extent that it cannot even find a set of fiducials to generate an\n",
"informationally complete set of states and measurements. In that case, it will also send a warning\n",
"message to `stderr` and return `None` for the preparation and measurement fiducial sets."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Measurement fiducials:\n",
"['{}', 'Gx', 'Gy']\n",
"Score: 9.999999999999996\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"WARNING: Complete initial fiducial set FAILS.\n",
"\n",
"WARNING: Aborting search.\n"
]
}
],
"source": [
"incompletePrepFids, incompleteMeasFids = fidsel.generate_fiducials(gs_target, maxFidLength=1)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[GateString({}), GateString(Gx), GateString(Gy)] None\n"
]
}
],
"source": [
"print(incompleteMeasFids, incompletePrepFids)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"#### Set requirements\n",
"There are several natural things to require of the returned germ and fiducial sets. For germ sets, you will usually\n",
"want the individual gates to be included as germs. If for some reason you don't want this, you can set the\n",
"*force* keyword argument to `None`."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Constructed germ set:\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"WARNING: Complete initial germ set FAILS on gateset 2.\n",
"\n",
"WARNING: Aborting search.\n"
]
}
],
"source": [
"nonSingletonGerms = germsel.generate_germs(gs_target, force=None, candidateGermCounts={4: 'all upto'},\n",
" algorithm='grasp', algorithm_kwargs={'iterations': 5})"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"In fiducial selection, it is likewise natural to require the empty gate string to be in the\n",
"fiducial set. This requirement may be disabled by setting *forceEmpty* to `False`. It is also\n",
"often desireable for identity gates to be left out of fiducials, since they add no diversity\n",
"to the set of states and measurements generated. You can allow identity gates in fiducials by\n",
"setting *omitIdentity* to `False`.\n",
"\n",
"A more common modification to the fiducial set requirements is to leave out additional gates from fiducials.\n",
"This might be desireable if you have a multi-qubit system and you expect your 2-qubit gates to be of lower\n",
"fidelity than your single-qubit gates. In this case you might want to construct fiducials from only\n",
"single-qubit gates. A list of gates that you would like to omit from your fiducials can be provided as a\n",
"list of gate labels to the *gatesToOmit* keyword argument.\n",
"\n",
"Our gateset doesn't have multi-qubit gates, but we can demonstrate several pieces of this\n",
"functionality by setting *omitIdentity* to `False` and omitting the identity manually using\n",
"*gatesToOmit*."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Preparation fiducials:\n",
"['{}', 'GxGx', 'Gx', 'Gy']\n",
"Score: 31.999999999999975\n",
"Measurement fiducials:\n",
"['{}', 'Gx', 'Gy']\n",
"Score: 9.999999999999996\n"
]
}
],
"source": [
"omitIdentityPrepFids, omitIdentityMeasFids = fidsel.generate_fiducials(gs_target, omitIdentity=False,\n",
" gatesToOmit=['Gi'])"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"text/plain": [
"[GateString({}), GateString(GxGx), GateString(Gx), GateString(Gy)]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"omitIdentityPrepFids"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"text/plain": [
"[GateString({}), GateString(Gx), GateString(Gy)]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"omitIdentityMeasFids"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"#### Verbosity\n",
"The various algorithms can tell you something of what's going on with them while they're running. By default,\n",
"this output is silenced, but it can be turned on using the *verbosity* keyword argument.\n",
"- A verbosity level of 1 is the default. This prints out what algorithm is being used, the returned set, and the score of that set.\n",
"- A verbosity level of 0 silences all output (other than warnings that things have gone wrong).\n",
"- A verbosity level of $n+1$ where $n\\geq0$ prints the output of verbosity level 1 in addition to the output that the current algorithm displays when its own verbosity is set to $n$."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GRASP algorithm.\n",
"Complete initial fiducial set succeeds.\n",
"Now searching for best fiducial set.\n",
"Starting fiducial list optimization. Lower score is better.\n",
"Starting iteration 1 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGx', 'GyGx', 'GxGy']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy', 'GxGx']\n",
"Finished iteration 1 of 5.\n",
"Starting iteration 2 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGx', 'Gy', 'Gx']\n",
"Local optimum:\n",
"['{}', 'GxGx', 'Gy', 'Gx']\n",
"Finished iteration 2 of 5.\n",
"Starting iteration 3 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGx', 'Gy', 'GxGy']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy', 'GxGx']\n",
"Finished iteration 3 of 5.\n",
"Starting iteration 4 of 5.\n",
"Initial construction:\n",
"['{}', 'GyGy', 'GxGy', 'GyGx']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy', 'GxGx']\n",
"Finished iteration 4 of 5.\n",
"Starting iteration 5 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGx', 'GyGx', 'GxGy']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy', 'GxGx']\n",
"Finished iteration 5 of 5.\n",
"Preparation fiducials:\n",
"['{}', 'GxGx', 'Gy', 'Gx']\n",
"Score: 31.999999999999975\n",
"Complete initial fiducial set succeeds.\n",
"Now searching for best fiducial set.\n",
"Starting fiducial list optimization. Lower score is better.\n",
"Starting iteration 1 of 5.\n",
"Initial construction:\n",
"['{}', 'GyGx', 'GxGy']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy']\n",
"Finished iteration 1 of 5.\n",
"Starting iteration 2 of 5.\n",
"Initial construction:\n",
"['{}', 'Gy', 'Gx']\n",
"Local optimum:\n",
"['{}', 'Gy', 'Gx']\n",
"Finished iteration 2 of 5.\n",
"Starting iteration 3 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGy', 'Gx']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy']\n",
"Finished iteration 3 of 5.\n",
"Starting iteration 4 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGy', 'GyGx']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy']\n",
"Finished iteration 4 of 5.\n",
"Starting iteration 5 of 5.\n",
"Initial construction:\n",
"['{}', 'GxGy', 'GyGx']\n",
"Local optimum:\n",
"['{}', 'Gx', 'Gy']\n",
"Finished iteration 5 of 5.\n",
"Measurement fiducials:\n",
"['{}', 'Gx', 'Gy']\n",
"Score: 9.999999999999996\n"
]
}
],
"source": [
"verbosePrepFids, verboseMeasFids = fidsel.generate_fiducials(gs_target, verbosity=2)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"silentGerms = germsel.generate_germs(gs_target, algorithm='slack', algorithm_kwargs={'maxIter': 5},\n",
" verbosity=0)"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}