Skip to main content


Leap's hybrid solver, provided by D-Wave, excels at solving optimization problems with numerous variables, utilizing a hybrid algorithm that combines quantum annealing machines and classical computers. Its capability to process Constrained Quadratic Models (CQMs) allows it to tackle a broad spectrum of problems, especially those centered around constrained quadratic optimization. For more details, please refer to this document.


  1. Update the config.toml by adding the [default.thirdparty-setting] section. Include the following two items:

    url = ""
    token = "JIJ_ZEPT_API_KEY"

    leap_url = ""
    leap_token = "D-Wave_API_TOKEN"
  2. Use the two classes provided by the jijzept and run the method sample_model in the JijLeapHybridCQMSampler class:

    • JijLeapHybridCQMSampler: a class to sample using the hybrid CQM solver.
    • JijLeapHybridCQMParameters: a class to set parameters specifically for the hybrid CQM solver.
    from jijzept import JijLeapHybridCQMSampler, JijLeapHybridCQMParameters

    sampler = JijLeapHybridCQMSampler(config="./config.toml")
    parameters = JijLeapHybridCQMParameters(time_limit=1)

    response = sampler.sample_model(



time_limitOptional[Union[int, float]]NoneMaximum run time, in seconds, to allow the solver to work on the problem. For more details, please refer to the description of the time_limit in the API reference.
labelOptional[str]NoneIf you set a value, it will be contained in the returned by the JijLeapHybridCQMSampler. For more details, please refer to this document.


parametersOptional[JijLeapHybridCQMParameters]NoneParameters for JijLeapHybridCQMSampler.
relax_listOptional[list[str]]NoneInteger variables defined using JijModeling are added to a CQM as integer variables. If you want to add specific integer variables to CQM as real (or continuous) variables, add their names to the relax_list.
max_wait_timeOptional[Union[int, float]]NoneThe timeout duration (in seconds) for a post request. If None, 60 (one minute) will be set.
syncboolTrueIf True, synchronous mode is enabled.
queue_nameOptional[str]NoneQueue name