Tuning
Matching to Observable Physics
Given the form of the Hamiltonian we are trying to construct, how do we pick the parameters it contains? This is a particularly pressing question as the Hamiltonian knows about UV things like the discretization and unphysical IR things like the finite volume. One way is to try to match some observable to a fixed continuum value / experimental observation.
We chose to try to match two-particle scattering data, in the form of the Effective Range Expansion. Adjusting Hamiltonian parameters to match the desired physics is called tuning the Hamiltonian [coefficients, or parameters].
tdg.EffectiveRangeExpansion
- class tdg.ere.EffectiveRangeExpansion(parameters)[source]
Bases:
H5ableThe effective range expansion is an expansion of \(\cot\delta\) as a function of momentum. In 2D the \(\ell=0\) partial wave scattering amplitude can be expanded
\[\cot \delta_0(p) = \frac{2}{\pi}\log pa + r_e^2 p^2 + \cdots\]in the convention of Ref. [1], rather than the hard-disk geometric convention of [3, 4, 5, 6].
Because we are in 2D and there is an inescapable log, it is profitable to convert the momentum dependence into dependence on dimensionless \(x=(pL/2\pi)^2 = \tilde{E} / (2\pi)^2\). Then the effective range expansion is
\[\begin{align} \cot \delta(p) = \frac{2}{\pi} \log\frac{2\pi a}{L} \sqrt{x} + \left(\frac{2\pi r_e }{L}\right)^2 x + \cdots \end{align}\]where the dimensionful parameters are normalized by appropriate powers of 2π/L.
- Parameters
parameters (iterable) –
[a, *analytic], wherea > 0is the dimensionless scattering length 2πa/L*analyticis a sequence of coefficients in the dimensionless expansionanalytic[0] = (2πre/L)^2since the effective range multiplies the \(x^{(0+1)}\) term. These coefficients may be of either sign.Having not found a convention for the pure numbers on higher order terms, all higher-order terms analytic in x have coefficients of 1 for simplicity.
Presumably we will tune to scattering amplitudes constant in x anyway.
- a
The dimensionless scattering length.
- coefficients
The dimensionless shape parameters. We assume that in the expansion in \(x\) every term gets a numerical coefficient of 1 × (the dimensionless shape parameter).
- powers
The powers of \(x\) that go with the
coefficients.
- analytic(x)[source]
Includes the constant piece = 2/π log(a)
- Parameters
x (float or torch.tensor) –
- Returns
\(\texttt{analytic(x)} = 2/π \log(a) + \texttt{coefficients} * x^\texttt{powers}\)
- Return type
torch.tensor
- __call__(x)[source]
Evaluates \(\cot\delta\) for the given \(x\).
- Parameters
x (float or torch.tensor) –
- Returns
\(2/\pi \log \sqrt{x} + \texttt{analytic}(x)\)
- Return type
torch.tensor
- target_energies(levels, zeta=<tdg.Luescher.Zeta2D object>, lr=0.001, epochs=10000)[source]
Given the ERE, we can use the Lüscher quantization condition to find the values of \(x\) that correspond to that ERE. Then, those \(x\) can be transformed into dimensionless energies. Those energies will be eigenvalues of the two-body \(A_1\)-projected Hamiltonian.
- Parameters
levels (int) – how many energies to find
zeta (callable) – the Lüscher zeta function
lr (float) – the learning rate of the minimizer that solves the inverse problem for \(x\).
epochs (int) – the number of minimization steps
Tuning More Than One LegoSphere
We first describe the generic method for tuning a potential.
If the effective range is entirely parameterized by the scattering length, and you are happy tuning the on-site interaction [a LegoSphere with radius (0,0)] then you should use the AnalyticTuning and need not know the generic story.
tdg.Luescher
The EffectiveRangeExpansion gives information about continuum, infinite-volume two-particle scattering.
Even the continuum limit of our Hamiltonian represents a finite-volume.
The Lüscher quantization condition bridges the gap between infinite-volume scattering and finite-volume energy levels.
- class tdg.Luescher.Zeta2D(N=200)[source]
Bases:
H5ableIn the continuum finite-volume energy levels may be translated into scattering data via Lüscher’s quantization condition.
In two dimensions, in the \(A_1\) sector the energies can be converted into information about the s-wave phase shift,
\[\begin{align} \cot \delta(p) - \frac{2}{\pi} \log \frac{pL}{2\pi} &= \frac{1}{\pi^2} S_2\left(\left(\frac{pL}{2\pi}\right)^2\right) & S_2(x) &= \lim_{N\rightarrow\infty} \sum_{n^2 \leq \left(\frac{N}{2}\right)^2} \frac{1}{n^2-x} - 2\pi \log \frac{N}{2} \end{align}\]where \(L\) is the physical size of the lattice and \(p\) is the physical momentum. In dimensionless units,
\[\begin{align} \cot \delta(p) &= \frac{2}{\pi} \log \sqrt{x} + \frac{1}{\pi^2} S_2(x) & x &= \left(\frac{pL}{2\pi}\right)^2 \end{align}\]- Parameters
N – the cutoff in the sum that defines \(S_2\).
- __call__(x)[source]
Apply the finite-volume S to x.
- Parameters
x (torch.tensor) – \(x = (pL/2\pi)^2\).
- Returns
\(S(x)\). \(x = E / (2\pi)^2\) where \(E\) is the dimensionless energy of the dimensionless two-body Schrödinger equation \(S(x)\) goes into the Lüscher quantization condition.
- Return type
torch.tensor
- plot(ax, x, asymptote_color='gray', asymptote_alpha=0.5, asymptote_linestyle='dashed', xlabel='$x$', ylabel='$\\cot\\delta - \\frac{2}{\\pi} \\log\\sqrt{x}$', **kwargs)[source]
Plots the zeta function for values of
xon the matplotlib axisax.Takes care not to plot the sharp jumps at the poles of the zeta function.
- Parameters
ax (matplotlib.pyplot.axis) – The axis on which to draw
x (torch.tensor) – The values to plot along the x-axis
asymptote_color – A matplotlib color do draw vertical asymptotes at the poles of the zeta.
asymptote_linestyle (str) – A matplotlib linestyle for the asymptotes
xlabel (str) – A label for the x-axis
ylabel (str) – A label for the y-axis
kwargs – get forwarded to
ax.plot
tdg.a1.ReducedTwoBodyHamiltonian
Luckily, the two-body sector of our Hamiltonian is small enough that it does not require stochastic methods to analyze. In fact, we can construct the two-body Hamiltonian in the \(A_1\) sector explicitly; restricting to \(A_1\) saves between a factor of 4 and 8 in the number of states. By finding eigenvalues of the Hamiltonian we get the finite-volume information we need to use the Lüscher quantization condition to get at the infinite-volume scattering.
- class tdg.a1.ReducedTwoBodyA1Hamiltonian(lattice, legoSpheres)[source]
Bases:
H5ableWe can project our Hamiltonian to the two-body sector. If we project to total momentum 0 we need only track the relative coordinate \(r\),
\[\begin{align} H \left|0,r\right\rangle &= \sum_{r'} 2 \kappa_{rr'} \left|0,r\right\rangle + V_{0,r} \left|0,r\right\rangle \end{align}\]and the potential \(V = N_x^2 \sum_{\vec{R}} C_{\vec{R}}\mathcal{S}^{\vec{R}}\) is a sum of LegoSpheres.
The primary purpose of studying this two-body sector is to tune the Wilson coefficients \(C_{\vec{R}}\) to produce a spectrum with desired features. If we match the two-body sector to the desired two-body scattering amplitudes (via the effective range expansion), we can take the resulting Wilson coefficients and use them in the many-body sector.
We construct H in momentum space. This allows us to make a straightforward projection to the \(A_1\) sector of the \(D_4\) lattice symmetry (or, more precisely, the little group of \(D_4\) for zero total-momentum, which is \(D_4\) itself).
In momentum space the kinetic piece is diagonal and straightforward, while the LegoSphere \(\mathcal{S}^{\vec{R}}\) is
\[\begin{align} \left\langle A_1, n' \middle| \mathcal{S}^{\vec{R}} \middle| A_1, n \right\rangle &= \frac{1}{\mathcal{N}_{n'}\mathcal{N}_{n}} \frac{1}{\mathcal{V}} \sum_{g'g \in D_4} e^{2\pi i (gn-g'n') \vec{R} / N_x} & \left|A_1, \vec{n} \right\rangle &= \frac{1}{\mathcal{N}_n} \sum_{g\in D_4} \left| g\vec{n} \right\rangle \end{align}\]where \(\vec{n}\) is a vector of lattice momentum and the normalization depends on the size of the orbit of \(\vec{n}\) under \(D_4\).
Note
A user should only very rarely need to directly construct a
ReducedTwoBodyA1Hamiltonian; but it is integral to theTuning.- Parameters
lattice (
Lattice) – The spatial lattice on which the Hamiltonian describes dynamics.legoSpheres (list of
LegoSphere) – The spheres in the interaction.
- spherical_operators
A list of matrix representations of the LegoSpheres themselves, with no Wilson coefficients.
- property states
A complete basis of \(A_1\)-projected momentum states for the
lattice. This basis is much smaller than the number of lattice sites; for each orbit there is only one state.
- property shells
A list of tensors, each tensor contains all the lattice momenta in a single \(D_4\) orbit. The sum of the lengths of all the tensors equals the number of lattice sites.
- property shellSizes
A tensor of integers which give the size of the orbits.
- property kinetic
A diagonal matrix which implements the kinetic energy in the \(A_1\)-projected momentum basis
states.
- potential(C)[source]
- Parameters
C (torch.tensor) – Wilson coefficients, one for each LegoSphere.
- Returns
A dense matrix, the sum of \(N_x^2 \sum_{\vec{R}} C_{\vec{R}} \mathcal{S}^{\vec{R}}\)
- Return type
torch.tensor
- operator(C)[source]
- Parameters
C (torch.tensor) – Wilson coefficients, one for each LegoSphere.
- Returns
kinetic + potential(C)- Return type
torch.tensor
- eigenenergies(C)[source]
- Parameters
C (torch.tensor) – Wilson coefficients, one for each LegoSphere.
- Returns
A list of the eigenvalues of the \(A_1\)-projected two-body sector of the Hamiltonian constructed with Wilson coefficients C.
- Return type
torch.tensor
- tuning(target_energies, start=None, epochs=10000, lr=0.001)[source]
Tuning the Hamiltonian solves the inverse problem: which Wilson coefficients do we need to produce some energy eigenvalues and a set of LegoSphere operators?
- Parameters
target_energies (torch.tensor) – A list of finite-volume energies.
start (torch.tensor) – Starting guesses for the Wilson coefficients.
epochs (int) – How many minimization steps to take.
lr (float) – The learning rate for the minimizer.
- Returns
A list of Wilson coefficients that produce the target energies for the lowest states.
- Return type
torch.tensor
tdg.Tuning
Finally, with the known targeted two-body physics (in the form of the EffectiveRangeExpansion), all the information except the Wilson coefficients needed to construct the ReducedTwoBodyHamiltonian, and the Lüscher Zeta2D implementing the quantization condition, we can attempt to tune the Hamiltonian.
- class tdg.tuning.Tuning(ere, lattice, radii, zeta=<tdg.Luescher.Zeta2D object>, starting_guess=None, C=None)[source]
Bases:
H5ableA
Tuningis a set of Wilson coefficients \(C\) that reproduce chosen physics. In our case the physics being held fixed is the effective range expansion, or ERE.The tuning should fix all the free parameters in the Hamiltonian, so we should expect to tune as many coefficients as we have ERE parameters. Our interaction is built from
LegoSpheres, each described by a radius and a Wilson coefficient. The purpose of tuning is to discover the Wilson coefficients, but we must provide the radii, a free choice. Different radii give different Wilson coefficients, of course.If you have a ballpark estimate (from tuning to a similar ERE, or tuning on a similar lattice, for example), you can pass these as the
starting_guess. If you know the actual results of the tuning you are describing you can save a lot of computational time by passing them at construction asC; you can still calculate their derivative with respect to the ERE parameters.Note
If you want to tune an on-site interaction to the analytic result of the bubble sum, you can skip all of the numerical steps involved in tuning by using
AnalyticTuninginstead!- Parameters
ere (
EffectiveRangeExpansion) –lattice (
Lattice) –radii (list) – Should be one radius for each sphere and each parameter in
ereformatted as[[x1, y1], [x2, y2], ...].zeta (
Zeta2D) – Used in the finite-volume quantization condition.starting_guess (torch.tensor or None) – One starting guess for each
Cin the order that of theradii.C (torch.tensor or None) – If not None, the tuning computation will be skipped, though the other properties can be computed. Provide one for each
ereparameter, in the order of theradii.
- property C
The Wilson coefficients \(C\) of
LegoSpheres with the givenradii.Note
Can be time-consuming to compute if unknown!
- property Potential
A potential constructed from LegoSpheres with the given
radiiand the tuned Wilson coefficientsC.
- Action(nt, beta, mu=tensor(0., dtype=torch.float32), h=tensor([0., 0., 0.], dtype=torch.float32), fermionMatrix=<class 'tdg.fermionMatrix.FermionMatrix'>)[source]
An action with a
Spacetimegiven by the providedntand the tuning’s Lattice, a potential given byPotential, and otherActionparameters.
Tuning The On-Site Interaction
In the case of an on-site interaction (with radius (0,0)), we can evaluate the \(T\) matrix as a geometric series given by a bubble sum. Then, using the two-dimensional quantum-mechanical expression for the \(T\) matrix in terms of \(\cot \delta\), we can match and solve for \(C_{(0,0)}\).
The result is almost the standard two-dimensional result. It is slightly modified by taking the square lattice of the Hamiltonian seriously. Typically the cutoff is applied to the momentum squared; instead we should cut off each component independently. The result is given by eg. Ref. [7]; see (C19).
tdg.AnalyticTuning
- class tdg.tuning.AnalyticTuning(ere, lattice)[source]
Bases:
H5ableIn the case where the
EffectiveRangeExpansionof interest is described entirely by a scattering length, we can construct a tuning with analytic methods rather than by the brute force leveraged inTuning, so long as we are satisfied with tuning a singleLegoSpherewith radius (0,0) only.In fact, because the Hamiltonian converges to the continuum like \(N_x^{-2}\) and there is magic, the brute force method almost exactly reproduces the analytic determination.
- Parameters
ere (
EffectiveRangeExpansion) – Describes the two-body physics of interest, and only contains a scattering length. Further momentum dependence raises a ValueException.lattice (
Lattice) – Describe the lattice on which we wish to tune the interaction.
- property C
We use the result from summing bubble diagrams,
\[\tilde{C}_0 = - \frac{2\pi}{\log(\tilde{a} N_x) - \frac{2}{\pi}G}\]where \(G=0.9159655941772190\cdots\) is Catalan’s constant.
- property Potential
A potential constructed from the LegoSphere with radius \((0,0)\) the tuned Wilson coefficients
C().
- Action(nt, beta, mu=tensor(0., dtype=torch.float32), h=tensor([0., 0., 0.], dtype=torch.float32), fermionMatrix=<class 'tdg.fermionMatrix.FermionMatrix'>)[source]
An action with a
Spacetimegiven by the providedntand the tuning’s Lattice, a potential given byPotential, and otherActionparameters.