calc_energy_matrix

static ThomasFermi.calc_energy_matrix(physics, numerics, K_mat, n, islands, approximate_charges)

Calculates the energy matrix for the system.

This is computed by taking the Coulomb potential energy between n(x) on island i and n(x) on island j, and adding the kenetic energy of the island if i==j.

See eq. (15) of arXiv:2509.13298.

Parameters:
  • physics (PhysicsParameters) – The physical device parameters.

  • numerics (NumericsParameters) – Options for numeric calculations.

  • K_mat (ndarray[float]) – A 2D array with shape (len(x), len(x)), where K_mat[i, j] gives the value of the Coulomb interaction (in meV) between two particles at points x[i] and x[j].

  • n (ndarray[float]) – A 1D array containing the particle density (in 1/nm).

  • islands (ndarray[int]) – An array with shape (num_islands, 2) giving the islands, where islands[i] is a length-2 integer array [begin_index, end_index + 1] giving the indeces of physics.x corresponding to the island.

  • approximate_charges (ndarray[float]) – An array with length equal to the number of islands, where each entry of the array is the integral of n(x) over the corresponding island.

Returns:

energy_matrix – The energy matrix (in meV) in the capacitance model (proportional to the inverse capacitance matrix).

Return type:

ndarray[float]