propint#

torchspin.propint(H0, H1, t, freq, phase=0.0, n=256)[source]#

Compute propagator by integrating over a cosine-modulated Hamiltonian.

Parameters:
  • H0 (ndarray) – Time-independent Hamiltonian (frequency units, e.g. MHz).

  • H1 (ndarray) – Amplitude of the cosine-modulated part (same units as H0).

  • t (float | list | ndarray) – Pulse duration or time interval [t1, t2]. Scalar t is equivalent to [0, t]. Units complementary to freq (e.g. µs if freq is in MHz).

  • freq (float) – Modulation frequency (must be positive).

  • phase (float) – Modulation phase in radians (default 0).

  • n (int) – Number of integration intervals per period (default 256).

Returns:

U – Propagator matrix, shape (dim, dim).

Return type:

ndarray