Pyslise2D

class pyslise.Pyslise2D
__init__(self: pyslise.Pyslise2D, V: Callable[[float, float], float], xmin: float, xmax: float, ymin: float, ymax: float, symmetric: bool = False, x_count: int = - 1, x_tolerance: float = - 1, y_count: int = - 1, y_tolerance: float = - 1, tolerance: float = - 1, N: int = 12, in_sector_count: int = 2, grid_points: int = 60) → None

In the __init__ function all needed data will be precomputed to effectively solve the given Schrödinger equation on the domain. Because of the precomputation the function V is only evaluated at the moment of initalisation. Calling other methods when the object is created will never evaluate V.

Note: steps along the y-axis are more computational expensive.

Parameters
  • V ((float,float)->float) – the potential of the Schrödinger equation to solve

  • xmin, xmax, ymin, ymax (float) – the domain to work on.

  • x_count, x_tolerance (float) – Use only one of these. This is a guidance on how to pick the number of steps along the x-axis. With x_count pyslise will make uniform_steps. With x_tolerance the steps will be picked to try to keep the error lower than x_tolerance.

  • y_count, y_tolerance (float) – analogous the x_count and y_tolerance.

  • tolerance (float) – if none of x_count, x_tolerance, y_count or y_tolerance. x_tolerance and y_tolerance will be set to tolerance

The next set of parameters are more advanced and can be useful to tweak when the required accuracy isn’t reached.

Parameters
  • N (int) – the number of used basis functions on each sector. Defaults to 12.

  • in_sector_count (int) – the number of steps that will be taken per sector (in de y-direction). Defaults to 2.

  • grid_points (in) – the number of points that will be used to calculate the quadratures. Defaults to 60.

matchingError(self: pyslise.Pyslise2D, E: float) → Tuple[float, float]

Compute the error given a guess for E. This error is the result of the requirement that the found eigenfunctions are continues. The error expresses how ‘discontinues’ the corresponding eigenfunction would be.

Parameters

E (float) – the guessed eigenvalue.

Returns

A tuple with the computed error and the derivative of that error with respect to E.

matchingErrors(self: pyslise.Pyslise2D, E: float) → List[Tuple[float, float]]

Just like Pyslise2D::calculateError(E) computes this function the discontinuity of the eigenfunction. The corresponding eigenfunction will be continuous once any of the N returned values is zero.

Parameters

E (float) – the guessed eigenvalue.

Returns

A list of tuples with each of the computed errors and its derivative with respect to E.