sparse-ir 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sparse_ir/__init__.py CHANGED
@@ -12,7 +12,7 @@ intermediate representation of correlation functions. It provides:
12
12
  """
13
13
  __copyright__ = "2020-2024 Markus Wallerberger, Hiroshi Shinaoka, and others"
14
14
  __license__ = "MIT"
15
- __version__ = "1.1.0"
15
+ __version__ = "1.1.1"
16
16
 
17
17
  from .kernel import RegularizedBoseKernel, LogisticKernel
18
18
  from .sve import compute as compute_sve, SVEResult
sparse_ir/abstract.py CHANGED
@@ -150,14 +150,26 @@ class AbstractBasis:
150
150
  """Real frequency cutoff or `None` if not present"""
151
151
  raise NotImplementedError()
152
152
 
153
- def default_tau_sampling_points(self):
154
- """Default sampling points on the imaginary time axis"""
153
+ def default_tau_sampling_points(self, *, npoints=None):
154
+ """Default sampling points on the imaginary time axis
155
+
156
+ Arguments:
157
+ npoints (int):
158
+ Minimum number of sampling points to return.
159
+
160
+ .. versionadded: 1.1
161
+ """
155
162
  raise NotImplementedError()
156
163
 
157
- def default_matsubara_sampling_points(self, *, positive_only=False):
164
+ def default_matsubara_sampling_points(self, *, npoints=None,
165
+ positive_only=False):
158
166
  """Default sampling points on the imaginary frequency axis
159
167
 
160
168
  Arguments:
169
+ npoints (int):
170
+ Minimum number of sampling points to return.
171
+
172
+ .. versionadded: 1.1
161
173
  positive_only (bool):
162
174
  Only return non-negative frequencies. This is useful if the
163
175
  object to be fitted is symmetric in Matsubura frequency,
sparse_ir/augment.py CHANGED
@@ -106,13 +106,21 @@ class AugmentedBasis(abstract.AbstractBasis):
106
106
  def wmax(self):
107
107
  return self._basis.wmax
108
108
 
109
- def default_tau_sampling_points(self):
110
- x = basis._default_sampling_points(self._basis.sve_result.u, self.size)
111
- return self.beta/2 * (x + 1)
112
-
113
- def default_matsubara_sampling_points(self, *, positive_only=False):
114
- return basis._default_matsubara_sampling_points(
115
- self._basis._uhat_full, self.size, positive_only=positive_only)
109
+ def default_tau_sampling_points(self, *, npoints=None):
110
+ if npoints is None:
111
+ npoints = self.size
112
+
113
+ # Return the sampling points of the underlying basis, but since we
114
+ # use the size of self, we add two further points. One then has to
115
+ # hope that these give good sampling points.
116
+ return self._basis.default_tau_sampling_points(npoints=npoints)
117
+
118
+ def default_matsubara_sampling_points(self, *, npoints=None,
119
+ positive_only=False):
120
+ if npoints is None:
121
+ npoints = self.size
122
+ return self._basis.default_matsubara_sampling_points(
123
+ npoints=npoints, positive_only=positive_only)
116
124
 
117
125
  @property
118
126
  def is_well_conditioned(self):
sparse_ir/basis.py CHANGED
@@ -169,16 +169,31 @@ class FiniteTempBasis(abstract.AbstractBasis):
169
169
  def sve_result(self):
170
170
  return self._sve_result
171
171
 
172
- def default_tau_sampling_points(self):
173
- x = _default_sampling_points(self._sve_result.u, self.size)
172
+ def default_tau_sampling_points(self, *, npoints=None):
173
+ if npoints is None:
174
+ npoints = self.size
175
+ x = _default_sampling_points(self._sve_result.u, npoints)
174
176
  return self._beta/2 * (x + 1)
175
177
 
176
- def default_matsubara_sampling_points(self, *, positive_only=False):
177
- return _default_matsubara_sampling_points(self._uhat_full, self.size,
178
+ def default_matsubara_sampling_points(self, *, npoints=None,
179
+ positive_only=False):
180
+ if npoints is None:
181
+ npoints = self.size
182
+ return _default_matsubara_sampling_points(self._uhat_full, npoints,
178
183
  positive_only=positive_only)
179
184
 
180
- def default_omega_sampling_points(self):
181
- y = _default_sampling_points(self._sve_result.v, self.size)
185
+ def default_omega_sampling_points(self, *, npoints=None):
186
+ """Return default sampling points in imaginary time.
187
+
188
+ Arguments:
189
+ npoints (int):
190
+ Minimum number of sampling points to return.
191
+
192
+ .. versionadded: 1.1
193
+ """
194
+ if npoints is None:
195
+ npoints = self.size
196
+ y = _default_sampling_points(self._sve_result.v, npoints)
182
197
  return self._wmax * y
183
198
 
184
199
  def rescale(self, new_beta):
sparse_ir/poly.py CHANGED
@@ -208,7 +208,7 @@ class PiecewiseLegendreFT:
208
208
  ``n`` must be odd.
209
209
  """
210
210
  _DEFAULT_GRID = np.hstack([np.arange(2**6),
211
- (2**np.linspace(6, 25, 16*(25-6)+1)).astype(int)])
211
+ (2**np.linspace(6, 35, 16*(35-6)+1)).astype(int)])
212
212
 
213
213
  def __init__(self, poly, freq='even', n_asymp=None, power_model=None):
214
214
  if poly.xmin != -1 or poly.xmax != 1:
sparse_ir/sampling.py CHANGED
@@ -35,6 +35,8 @@ class AbstractSampling:
35
35
  to the sampling points for which the sampling objects was
36
36
  created.
37
37
 
38
+ .. versionadded:: 1.1
39
+
38
40
  Return:
39
41
  Array where the `n`-th item along `axis` corresponds to the
40
42
  value on the `n`-th sampling point (or value on `point[n]`, if
@@ -66,6 +68,8 @@ class AbstractSampling:
66
68
  Points on which the `ax` is given. Defaults to the sampling
67
69
  points for which the sampling objects was created.
68
70
 
71
+ .. versionadded:: 1.1
72
+
69
73
  Return:
70
74
  Array where the `l`-th item along `axis` corresponds to the
71
75
  `l`-th basis coefficient
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sparse-ir
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: intermediate representation (IR) basis for electronic propagator
5
5
  Home-page: https://github.com/SpM-lab/sparse-ir
6
6
  Author: ['Markus Wallerberger', 'Hiroshi Shinaoka', 'Kazuyoshi Yoshimi', 'Junya Otsuki', 'Chikano Naoya']
@@ -0,0 +1,20 @@
1
+ sparse_ir/__init__.py,sha256=dDgJtNgKRy0D9q6rONu50lowMCnrdmvB4L9e-8eG5pc,816
2
+ sparse_ir/_gauss.py,sha256=9Ou38SfucUjY83o8Tz62s-gXfWDC8QEHBjiUzcbWaY4,9621
3
+ sparse_ir/_roots.py,sha256=ARpyYhhI5gR1AT1zDgezVgCxnHEaJwGF38jEv6ebarA,4351
4
+ sparse_ir/_util.py,sha256=93s7tGcXxz3mwHsBQmAh-6EQ26xLbUeFHVtlnzQxRps,3004
5
+ sparse_ir/abstract.py,sha256=I7RMcHwgPrtn_XBZ4x_XPxaqp32OLFtXQ5bC2mKp7ic,6604
6
+ sparse_ir/adapter.py,sha256=ptiHkTBwZ8aNbtFMnr9k2Rt_v5zwrDyPJ1yx-kiDvew,8351
7
+ sparse_ir/augment.py,sha256=vRPMS0Roa2zqCqZVyFFo-g4lfr2ZGOIhfGGbt42Kj98,9976
8
+ sparse_ir/basis.py,sha256=3mW2XKuLxzHomPCbm3MgxvJhrP3HdP-QkGOgI8W7E2o,13316
9
+ sparse_ir/basis_set.py,sha256=zLD51j9X3iuXfX2nzmn5yRRn7S_GOOyCRFqb05OMDXI,2869
10
+ sparse_ir/dlr.py,sha256=X6orDjvsOAsFrZsCh8vfedu0_SmTvIpSQmGabfI9pi8,5361
11
+ sparse_ir/kernel.py,sha256=2HO77HTOK2WJKizDgr1nmmyhd1mGYT2WvKrFwLiMhjM,18487
12
+ sparse_ir/poly.py,sha256=moPMTxJvd2_g43vcyjHSsyBjcQ1lnuPyIjfce6j_AgI,18359
13
+ sparse_ir/sampling.py,sha256=BoHOHcLAvQjYR8KwK8Ee0LgZz3q3OgMBuLPgG494VEM,13879
14
+ sparse_ir/svd.py,sha256=iQwpBCFSPJeKqhAIlufzz9Ybpm1dq382Km3TU-UvNuc,3375
15
+ sparse_ir/sve.py,sha256=pVUKg_cLphx-lRCfrDJXrpkow97vjIgvvSrxA7lhzzg,15179
16
+ sparse_ir-1.1.1.dist-info/LICENSE.txt,sha256=3tGlA0QNYsfjETaQqJO0Ixne5PQ16PNVJiDcGsgHER0,1079
17
+ sparse_ir-1.1.1.dist-info/METADATA,sha256=85T_HOwLPWOF-ScnCIdhyfZBqRV14Iy7SJEc1G9UcBQ,6458
18
+ sparse_ir-1.1.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
19
+ sparse_ir-1.1.1.dist-info/top_level.txt,sha256=UsscWAzJg7fKo9qmIwW8jnG7CAfhFzWYBOTXVySzuA0,10
20
+ sparse_ir-1.1.1.dist-info/RECORD,,
@@ -1,20 +0,0 @@
1
- sparse_ir/__init__.py,sha256=BzVg_maIuofnQArELnsb3Gdi4LnHa7OPt7prTjdbnnM,816
2
- sparse_ir/_gauss.py,sha256=9Ou38SfucUjY83o8Tz62s-gXfWDC8QEHBjiUzcbWaY4,9621
3
- sparse_ir/_roots.py,sha256=ARpyYhhI5gR1AT1zDgezVgCxnHEaJwGF38jEv6ebarA,4351
4
- sparse_ir/_util.py,sha256=93s7tGcXxz3mwHsBQmAh-6EQ26xLbUeFHVtlnzQxRps,3004
5
- sparse_ir/abstract.py,sha256=bifLMUuDQzWjZZtB2s7-yBTZ9dhbkkox2lWh1fbzaas,6250
6
- sparse_ir/adapter.py,sha256=ptiHkTBwZ8aNbtFMnr9k2Rt_v5zwrDyPJ1yx-kiDvew,8351
7
- sparse_ir/augment.py,sha256=1Gn57-_13968fsgC-I5oE_nGiP4bWvjEbGGsNdM6jvM,9624
8
- sparse_ir/basis.py,sha256=2PSRgJQyPA_d3cUJhNGvklc6cQLe__yMLzDsuj2JgwQ,12833
9
- sparse_ir/basis_set.py,sha256=zLD51j9X3iuXfX2nzmn5yRRn7S_GOOyCRFqb05OMDXI,2869
10
- sparse_ir/dlr.py,sha256=X6orDjvsOAsFrZsCh8vfedu0_SmTvIpSQmGabfI9pi8,5361
11
- sparse_ir/kernel.py,sha256=2HO77HTOK2WJKizDgr1nmmyhd1mGYT2WvKrFwLiMhjM,18487
12
- sparse_ir/poly.py,sha256=XbNjgFaofE9zSvPPPYmsDVLLea2k8CSEopfxx-e48ko,18359
13
- sparse_ir/sampling.py,sha256=AR6ONMwKjQXVvmulwCNk93J-1OmNS8fYutXCLdfReCA,13801
14
- sparse_ir/svd.py,sha256=iQwpBCFSPJeKqhAIlufzz9Ybpm1dq382Km3TU-UvNuc,3375
15
- sparse_ir/sve.py,sha256=pVUKg_cLphx-lRCfrDJXrpkow97vjIgvvSrxA7lhzzg,15179
16
- sparse_ir-1.1.0.dist-info/LICENSE.txt,sha256=3tGlA0QNYsfjETaQqJO0Ixne5PQ16PNVJiDcGsgHER0,1079
17
- sparse_ir-1.1.0.dist-info/METADATA,sha256=MIFpjO8gtK_A2NzU6g4SNYhZ-OKdUaNZqTpSD3V_VIU,6458
18
- sparse_ir-1.1.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
19
- sparse_ir-1.1.0.dist-info/top_level.txt,sha256=UsscWAzJg7fKo9qmIwW8jnG7CAfhFzWYBOTXVySzuA0,10
20
- sparse_ir-1.1.0.dist-info/RECORD,,