Skip to content

Commit 5c292c8

Browse files
committed
revert changes
1 parent 1417df6 commit 5c292c8

File tree

6 files changed

+5
-18
lines changed

6 files changed

+5
-18
lines changed

pygsti/data/dataset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,6 @@ def _get_row(self, circuit):
11771177
# needed because name-only Labels don't hash the same as strings
11781178
# so key lookups need to be done at least with tuples of Labels.
11791179
circuit = _cir.Circuit.cast(circuit)
1180-
circuit._static = False
11811180
#Note: cirIndex value is either an int (non-static) or a slice (static)
11821181
cirIndex = self.cirIndex[circuit]
11831182
repData = self.repData[cirIndex] if (self.repData is not None) else None

pygsti/models/gaugegroup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,6 @@ def __init__(self, state_space, evotype='default'):
675675
rtrans = _np.identity(dim, 'd')
676676
baseMx = _np.identity(dim, 'd')
677677
parameterArray = _np.zeros(dim, 'd')
678-
# ^ ... shouldn't that be ones?
679-
# parameterArray = _np.ones(dim, 'd')
680678
parameterToBaseIndicesMap = {i: [(i, i)] for i in range(dim)}
681679
operation = _op.LinearlyParamArbitraryOp(baseMx, parameterArray, parameterToBaseIndicesMap, ltrans, rtrans,
682680
real=True, evotype=evotype, state_space=state_space)
@@ -733,7 +731,6 @@ def __init__(self, state_space, evotype='default'):
733731
rtrans = _np.identity(dim, 'd')
734732
baseMx = _np.identity(dim, 'd')
735733
parameterArray = _np.zeros(dim - 1, 'd')
736-
# parameterArray = _np.ones(dim - 1, 'd')
737734
parameterToBaseIndicesMap = {i: [(i + 1, i + 1)] for i in range(dim - 1)}
738735
operation = _op.LinearlyParamArbitraryOp(baseMx, parameterArray, parameterToBaseIndicesMap, ltrans, rtrans,
739736
real=True, evotype=evotype, state_space=state_space)

pygsti/report/factory.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,8 @@ def construct_standard_report(results, title="auto",
12481248

12491249
advanced_options = advanced_options or {}
12501250
n_leak = advanced_options.get('n_leak', 0)
1251-
# ^ Not sure if this is a good place to pass this parameter.
1252-
# A better implementation would be to store this info in model.basis
1253-
# (for the various models).
1251+
# ^ It would be preferable to store n_leak in a Basis object, or something similar.
1252+
# We're using this for now since it's simple and gets the job done.
12541253
linlogPercentile = advanced_options.get('linlog percentile', 5)
12551254
nmthreshold = advanced_options.get('nmthreshold', DEFAULT_NONMARK_ERRBAR_THRESHOLD)
12561255
embed_figures = advanced_options.get('embed_figures', True)
@@ -1396,9 +1395,6 @@ def construct_standard_report(results, title="auto",
13961395
'show_unmodeled_error': bool('ShowUnmodeledError' in flags),
13971396
'n_leak' : n_leak
13981397
}
1399-
# ^ Not sure if this is a good place to pass n_leak.
1400-
# A better implementation would be to store this info in model.basis
1401-
# (for the various models).
14021398

14031399
templates = dict(
14041400
html='~standard_html_report',

pygsti/tools/basistools.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import numpy as _np
1616

1717
from pygsti.baseobjs.basisconstructors import _basis_constructor_dict
18-
# from ..baseobjs.basis import Basis, BuiltinBasis, DirectSumBasis
1918
from pygsti.baseobjs import basis as _basis
2019

2120

@@ -60,10 +59,9 @@ def leakage_friendly_basis_2plus1(return_subspace_basis=False):
6059
labels=["I", "X", "Y", "Z"]
6160
)
6261
return leakage_basis, subspace_basis
63-
64-
6562

6663

64+
@lru_cache(maxsize=1)
6765
def basis_matrices(name_or_basis, dim, sparse=False):
6866
"""
6967
Get the elements of the specifed basis-type which spans the density-matrix space given by `dim`.

pygsti/tools/optools.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,6 @@ def leading_dxd_submatrix_basis_vectors(d: int, n: int, current_basis, return_la
620620
if, instead of starting with the objective function || (M1 - M2) v ||, we started with
621621
f((M1 - M2) v) and f satisfied the property that f(c v) >= f(v) whenever c is a scalar
622622
greater than or equal to one.
623-
624-
Interesting idea:
625-
Set M2 = 0.
626-
Use || (I - P) M1 P || as a metric for leakage.
627-
Use || P M1 (I - P) || as a metric for seepage
628623
"""
629624
assert d <= n
630625
current_basis = _pgb.Basis.cast(current_basis, dim=n**2)

scripts/api_names.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,6 +3690,8 @@ tools:
36903690
expm_multiply_prep: null
36913691
expop_multiply_prep: null
36923692
find_zero_communtant_connection: null
3693+
frobeniusnorm: null
3694+
frobeniusnorm2: frobeniusnorm_squared
36933695
get_csr_sum_flat_indices: csr_sum_flat_indices
36943696
get_csr_sum_indices: csr_sum_indices
36953697
get_kite: compute_kite # XXX parameter `evals` -> `eigenvalues`

0 commit comments

Comments
 (0)