{"id":5100,"library":"zfit-interface","title":"zfit-interface","description":"zfit-interface provides an abstraction layer to fit zfit models using external minimizers, currently supporting `iminuit`. It aims to offer a flexible interface for High Energy Physics (HEP) data fitting. This is an early-stage library, currently at version 0.0.3, with an irregular release cadence.","status":"active","version":"0.0.3","language":"en","source_language":"en","source_url":"https://github.com/zfit/zfit-interface","tags":["HEP","physics","fitting","zfit","iminuit","interface"],"install":[{"cmd":"pip install zfit-interface","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"This library provides an interface *to* zfit models; zfit is required for defining models.","package":"zfit","optional":false},{"reason":"This library currently uses iminuit as its primary external minimizer, requiring it for fitting functionality.","package":"iminuit","optional":false}],"imports":[{"symbol":"Iminuit","correct":"from zfit_interface.minimizer import Iminuit"},{"symbol":"ZfitMinuitFitter","correct":"from zfit_interface.fit import ZfitMinuitFitter"}],"quickstart":{"code":"import zfit\nfrom zfit.models import Gauss\nfrom zfit.spaces import Space\nfrom zfit_interface.minimizer import Iminuit\nfrom zfit_interface.fit import ZfitMinuitFitter\n\n# 1. Define a zfit model and data\nobs = Space('x', limits=(-10, 10))\nmu = zfit.Parameter('mu', 0., -1., 1.)\nsigma = zfit.Parameter('sigma', 1., 0.1, 10.)\ngauss = Gauss(mu=mu, sigma=sigma, obs=obs)\ndata = gauss.sample(n=1000)\n\n# 2. Instantiate the iminuit minimizer from zfit-interface\nminimizer = Iminuit()\n\n# 3. Create the zfit-interface fitter\nfitter = ZfitMinuitFitter(minimizer=minimizer)\n\n# 4. Perform the fit\nresult = fitter.fit(model=gauss, data=data)\n\nprint(f\"Fit result: {result.params}\")\nprint(f\"Minimizer status: {result.info['minuit_minos_status']}\")","lang":"python","description":"This quickstart demonstrates how to define a zfit model and data, then use the `zfit-interface` to fit it with `iminuit`. It involves instantiating the `Iminuit` minimizer wrapper and the `ZfitMinuitFitter`."},"warnings":[{"fix":"Refer to the GitHub repository and release notes for updates when upgrading to newer 0.x.x versions. Be prepared for potential API adjustments.","message":"As a 0.x.x version library, the API of `zfit-interface` is still under active development and may introduce breaking changes without strict adherence to semantic versioning until a 1.0.0 release.","severity":"breaking","affected_versions":"All versions < 1.0.0"},{"fix":"Ensure both `zfit` and `iminuit` are installed alongside `zfit-interface` using `pip install zfit iminuit`.","message":"This library is an 'interface' for `zfit` models, not a standalone fitting library. It requires `zfit` for model definition and `iminuit` (or other supported minimizers) for the actual minimization process. Users must install these dependencies separately.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer directly to the official GitHub repository's `examples` directory and source code for the most up-to-date and complete usage information.","message":"The documentation for `zfit-interface` is currently minimal. Users should be prepared to consult the source code and examples on the GitHub repository for detailed usage patterns and functionality.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}