Skip to content

Commit 22a1a75

Browse files
authored
Use raw strings for docstrings containing LaTeX (#429)
1 parent 63afb7a commit 22a1a75

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

recirq/kpz/experiment.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _kurtosis_excluding_i(self, i: int) -> float:
166166
)
167167

168168
def jackknife_mean(self) -> float:
169-
"""Compute the statistical uncertainty of the mean using the remove-one jackknife.
169+
r"""Compute the statistical uncertainty of the mean using the remove-one jackknife.
170170
If there is only one initial state (for example if $\mu = \infty$), zero uncertainty
171171
is returned.
172172
"""
@@ -176,7 +176,7 @@ def jackknife_mean(self) -> float:
176176
return np.std(mean_i) * np.sqrt(self.num_initial_states - 1)
177177

178178
def jackknife_variance(self) -> float:
179-
"""Compute the statistical uncertainty of the variance using the remove-one jackknife.
179+
r"""Compute the statistical uncertainty of the variance using the remove-one jackknife.
180180
If there is only one initial state (for example if $\mu = \infty$), zero uncertainty
181181
is returned.
182182
"""
@@ -188,7 +188,7 @@ def jackknife_variance(self) -> float:
188188
return np.std(variance_i) * np.sqrt(self.num_initial_states - 1)
189189

190190
def jackknife_skew(self) -> float:
191-
"""Compute the statistical uncertainty of the skewness using the remove-one jackknife.
191+
r"""Compute the statistical uncertainty of the skewness using the remove-one jackknife.
192192
If there is only one initial state (for example if $\mu = \infty$), zero uncertainty
193193
is returned.
194194
"""
@@ -198,7 +198,7 @@ def jackknife_skew(self) -> float:
198198
return np.std(skew_i) * np.sqrt(self.num_initial_states - 1)
199199

200200
def jackknife_kurtosis(self) -> float:
201-
"""Compute the statistical uncertainty of the kurtosis using the remove-one jackknife.
201+
r"""Compute the statistical uncertainty of the kurtosis using the remove-one jackknife.
202202
If there is only one initial state (for example if $\mu = \infty$), zero uncertainty
203203
is returned.
204204
"""
@@ -234,7 +234,7 @@ def plot_histogram(self, ax: Optional[Union[None, plt.Axes]] = None) -> plt.Axes
234234
edgecolor="k",
235235
)
236236
ax.tick_params(direction="in", top=True, right=True)
237-
ax.set_xlabel("Number of 1s that crossed center, $\mathcal{M}/2$")
237+
ax.set_xlabel(r"Number of 1s that crossed center, $\mathcal{M}/2$")
238238
ax.set_ylabel("Probability")
239239
return ax
240240

@@ -382,13 +382,13 @@ def plot_histogram(self, ax: Optional[Union[None, plt.Axes]] = None) -> plt.Axes
382382
edgecolor="k",
383383
)
384384
ax.tick_params(direction="in", top=True, right=True)
385-
ax.set_xlabel("Number of 1s that crossed center, $\mathcal{M}/2$")
385+
ax.set_xlabel(r"Number of 1s that crossed center, $\mathcal{M}/2$")
386386
ax.set_ylabel("Probability")
387387
return ax
388388

389389

390390
class KPZExperiment:
391-
"""A class for running/simulating the KPZ experiment.
391+
r"""A class for running/simulating the KPZ experiment.
392392
393393
This class implements 1D Floquet XXZ dynamics, realized as alternating layers of fSim
394394
gates. The initial states, parameterized by mu, interpolate between an

0 commit comments

Comments
 (0)