FunctionTime

class nexus.FunctionTime(id)

Abstract class for FunctionTime. Do not use this class directly. A FunctionTime implementation must be derived from this class in Python the following way.

New in version 1.0.4.

# definition of the derived class
class FunctionTimeDefinedInPython(nx.FunctionTime):
    def __init__(self, id = "my function of time implementation", ...):
        super().__init__(id)
        ...

    # implementation of the actual function of time
    def FunctionTimeFunction(self, time):
        ...
        dependent_variable = f(time)
        return dependent_variable
Parameters:

id (string) – User identifier.

id

User identifier.

Type:

string

fit_variables

List of nx.Var objects.

Type:

list

CreateDetuning(max_detuning, num_points)

Compute a detuning grid needed for energy based calculations. The detuning grid is created almost symmetrically in the range

\[-max\_detuning, -max\_detuning + step, ..., max\_detuning - step\]

where \(step = 2 \frac{max\_detuning}{num\_points}\).

Parameters:
  • float – maximum detuning in units of \(\Gamma\).

  • int – number of points, must be even.

Returns:

The detuning grid in units of \(\Gamma\).

Return type:

ndarray

Function(time)

Call the function implementation from python.

Parameters:

float – time in nanoseconds.

Returns:

Dependent variable.

Return type:

float

Examples can be found in the Tutorial section.