@@ -1037,9 +1037,11 @@ def calculate_cumulant_function(
1037
1037
1038
1038
if second_order :
1039
1039
if frequency_shifts is None :
1040
+ if memory_parsimonious :
1041
+ warn ('Memory parsimonious calculation not implemented for frequency shifts.' )
1042
+
1040
1043
frequency_shifts = calculate_frequency_shifts (pulse , spectrum , omega ,
1041
- n_oper_identifiers , show_progressbar ,
1042
- memory_parsimonious )
1044
+ n_oper_identifiers , show_progressbar )
1043
1045
1044
1046
if frequency_shifts .shape != decay_amplitudes .shape :
1045
1047
raise ValueError ('Frequency shifts not same shape as decay amplitudes' )
@@ -1236,8 +1238,7 @@ def calculate_frequency_shifts(
1236
1238
spectrum : ndarray ,
1237
1239
omega : Coefficients ,
1238
1240
n_oper_identifiers : Optional [Sequence [str ]] = None ,
1239
- show_progressbar : bool = False ,
1240
- memory_parsimonious : bool = False
1241
+ show_progressbar : bool = False
1241
1242
) -> ndarray :
1242
1243
r"""
1243
1244
Get the frequency shifts :math:`\Delta_{\alpha\beta, kl}` for noise
@@ -1262,18 +1263,6 @@ def calculate_frequency_shifts(
1262
1263
the frequency shifts. The default is all.
1263
1264
show_progressbar: bool, optional
1264
1265
Show a progress bar for the calculation.
1265
- memory_parsimonious: bool, optional
1266
- For large dimensions, the integrand
1267
-
1268
- .. math::
1269
-
1270
- F_{\alpha\beta, kl}^{(2)}(\omega)S_{\alpha\beta}(\omega)
1271
-
1272
- can consume quite a large amount of memory if set up for all
1273
- :math:`\alpha,\beta,k,l` at once. If ``True``, it is only set up
1274
- and integrated for a single :math:`k` at a time and looped over.
1275
- This is slower but requires much less memory. The default is
1276
- ``False``.
1277
1266
1278
1267
Raises
1279
1268
------
@@ -1309,15 +1298,12 @@ def calculate_frequency_shifts(
1309
1298
calculate_pulse_correlation_filter_function
1310
1299
"""
1311
1300
idx = util .get_indices_from_identifiers (pulse , n_oper_identifiers , 'noise' )
1312
- if not memory_parsimonious :
1313
- filter_function_2 = pulse .get_filter_function (omega , order = 2 ,
1314
- show_progressbar = show_progressbar )
1315
- integrand = _get_integrand (spectrum , omega , idx , which_pulse = 'total' ,
1316
- which_FF = 'generalized' , filter_function = filter_function_2 )
1317
- frequency_shifts = util .integrate (integrand , omega )/ (2 * np .pi )
1318
- return frequency_shifts
1319
-
1320
- raise NotImplementedError
1301
+ filter_function_2 = pulse .get_filter_function (omega , order = 2 ,
1302
+ show_progressbar = show_progressbar )
1303
+ integrand = _get_integrand (spectrum , omega , idx , which_pulse = 'total' , which_FF = 'generalized' ,
1304
+ filter_function = filter_function_2 )
1305
+ frequency_shifts = util .integrate (integrand , omega )/ (2 * np .pi )
1306
+ return frequency_shifts
1321
1307
1322
1308
1323
1309
@util .parse_which_FF_parameter
@@ -1387,7 +1373,6 @@ def calculate_second_order_filter_function(
1387
1373
n_coeffs : Sequence [Coefficients ],
1388
1374
dt : Coefficients ,
1389
1375
intermediates : Optional [Dict [str , ndarray ]] = None ,
1390
- memory_parsimonious : bool = False ,
1391
1376
show_progressbar : bool = False
1392
1377
) -> ndarray :
1393
1378
r"""Calculate the second order filter function for frequency shifts.
@@ -1423,21 +1408,6 @@ def calculate_second_order_filter_function(
1423
1408
Intermediate terms of the calculation of the control matrix that
1424
1409
can be reused here. If None (default), they are computed from
1425
1410
scratch.
1426
- memory_parsimonious: bool, optional
1427
-
1428
- .. warning:: Not implemented.
1429
-
1430
- For large dimensions, the integrand
1431
-
1432
- .. math::
1433
-
1434
- F_{\alpha\beta, kl}^{(2)}(\omega)S_{\alpha\beta}(\omega)
1435
-
1436
- can consume quite a large amount of memory if set up for all
1437
- :math:`\alpha,\beta,k,l` at once. If ``True``, it is only set up
1438
- and integrated for a single :math:`k` at a time and looped over.
1439
- This is slower but requires much less memory. The default is
1440
- ``False``.
1441
1411
show_progressbar: bool, optional
1442
1412
Show a progress bar for the calculation.
1443
1413
0 commit comments