diff --git a/www/reference/openjij/index.html b/www/reference/openjij/index.html index 6fbf5b5..9b31897 100644 --- a/www/reference/openjij/index.html +++ b/www/reference/openjij/index.html @@ -1492,13 +1492,13 @@

Attributes
Parameters
@@ -1518,12 +1518,15 @@

Attributes
-remove_unknown_kwargs(**kwargs) Dict[str, Any]#
+remove_unknown_kwargs(**kwargs) Dict[str, Any]#

Remove with warnings any keyword arguments not accepted by the sampler.

Parameters

**kwargs – Keyword arguments to be validated.

+
Return type
+

Dict[str, Any]

+

Returns: Updated kwargs dict.

Examples

@@ -1542,26 +1545,27 @@

Attributes
-sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
+sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

Sampling from the Ising model

Parameters
  • bqm (openjij.BinaryQuadraticModel) –

  • -
  • beta (float, optional) – inverse tempareture.

  • -
  • gamma (float, optional) – strangth of transverse field. Defaults to None.

  • -
  • num_sweeps (int, optional) – number of sweeps. Defaults to None.

  • -
  • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

  • -
  • trotter (int) – Trotter number.

  • -
  • num_reads (int, optional) – number of sampling. Defaults to 1.

  • -
  • initial_state (list[int], optional) – Initial state. Defaults to None.

  • -
  • updater (str, optional) – update method. Defaults to ‘single spin flip’.

  • -
  • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

  • -
  • seed (int, optional) – Sampling seed. Defaults to None.

  • +
  • beta (float, optional) – inverse tempareture.

  • +
  • gamma (float, optional) – strangth of transverse field. Defaults to None.

  • +
  • num_sweeps (int, optional) – number of sweeps. Defaults to None.

  • +
  • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

  • +
  • trotter (int) – Trotter number.

  • +
  • num_reads (int, optional) – number of sampling. Defaults to 1.

  • +
  • initial_state (list[int], optional) – Initial state. Defaults to None.

  • +
  • updater (str, optional) – update method. Defaults to ‘single spin flip’.

  • +
  • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

  • +
  • seed (int, optional) – Sampling seed. Defaults to None.

  • +
  • sparse (Optional[bool]) –

Raises
-

ValueError

+

ValueError

Returns

results

@@ -1593,17 +1597,17 @@

Attributes
Parameters
Returns
@@ -1635,7 +1639,7 @@

Attributes
Parameters
-

Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

+

Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

Returns

results

@@ -1659,11 +1663,11 @@

Attributes
Parameters
@@ -1779,16 +1783,16 @@

Attributes
Parameters
    -
  • fields (list, optional, default=None) – If specified, only these fields are included in the yielded tuples. +

  • fields (list, optional, default=None) – If specified, only these fields are included in the yielded tuples. The special field name ‘sample’ can be used to view the samples.

  • sorted_by (str/None, optional, default='energy') – Selects the record field used to sort the samples. If None, the samples are yielded in record order.

  • name (str/None, optional, default='Sample') – Name of the yielded namedtuples or None to yield regular tuples.

  • -
  • reverse (bool, optional, default=False) – If True, yield in reverse order.

  • -
  • sample_dict_cast (bool, optional, default=True) – Samples are returned as dicts rather than +

  • reverse (bool, optional, default=False) – If True, yield in reverse order.

  • +
  • sample_dict_cast (bool, optional, default=True) – Samples are returned as dicts rather than SampleView, which requires heavy memory usage. Set to False to reduce load on memory.

  • -
  • index (bool, optional, default=False) – If True, datum.idx gives the corresponding index of the +

  • index (bool, optional, default=False) – If True, datum.idx gives the corresponding index of the SampleSet.record.

@@ -1828,7 +1832,7 @@

AttributesReturn type -

dict

+

dict

Examples

@@ -1853,9 +1857,9 @@

AttributesSampleSet is constructed with SampleSet.from_future().

Examples

-

This example uses a Future object directly. Typically -a Executor sets the result of the future -(see documentation for concurrent.futures).

+

This example uses a Future object directly. Typically +a Executor sets the result of the future +(see documentation for concurrent.futures).

>>> from concurrent.futures import Future
 ...
 >>> future = Future()
@@ -1878,17 +1882,20 @@ 

Attributes
-filter(pred: Callable[[Any], bool]) SampleSet#
+filter(pred: Callable[[Any], bool]) SampleSet#

Return a new sampleset with rows filtered by the given predicate.

Parameters
-

pred – A function that accepts a named tuple as returned by -data() and returns a bool.

+

pred (Callable[[Any], bool]) – A function that accepts a named tuple as returned by +data() and returns a bool.

Returns

A new sample set with only the data rows for which pred returns True.

+
Return type
+

SampleSet

+

Examples

>>> sampleset = dimod.SampleSet.from_samples(
@@ -1912,7 +1919,7 @@ 

Attributes
Raises
-

ValueError – If empty.

+

ValueError – If empty.

Example

@@ -1930,8 +1937,8 @@

Attributes
Parameters
    -
  • future (object) – Object that contains or will contain the information needed to construct a -SampleSet. If future has a done() method, +

  • future (object) – Object that contains or will contain the information needed to construct a +SampleSet. If future has a done() method, this determines the value returned by SampleSet.done().

  • result_hook (callable, optional) –

    A function that is called to resolve the future. Must accept the future and return a SampleSet. If not provided, set to

    @@ -1978,12 +1985,12 @@

    AttributesSampleSet as a whole formatted as a dict.

  • +
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

  • -
  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

  • -
  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

  • **vectors (array_like) – Other per-sample data.

@@ -2016,12 +2023,12 @@

Attributesas_samples().

  • bqm (BinaryQuadraticModel) – A binary quadratic model.

  • -
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • +
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

  • -
  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

  • -
  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

  • **vectors (array_like) – Other per-sample data.

  • @@ -2048,16 +2055,16 @@

    Attributesas_samples().

  • cqm (ConstrainedQuadraticModel) – A constrained quadratic model.

  • -
  • rtol (float, optional, default=1e-6) – Relative tolerance for constraint violation. +

  • rtol (float, optional, default=1e-6) – Relative tolerance for constraint violation. See ConstrainedQuadraticModel.check_feasible() for more information.

  • -
  • atol (float, optional, default=1e-8) – Absolute tolerance for constraint violations. +

  • atol (float, optional, default=1e-8) – Absolute tolerance for constraint violations. See ConstrainedQuadraticModel.check_feasible() for more information.

  • -
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • +
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

  • -
  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

  • -
  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

  • **vectors (array_like) – Other per-sample data.

  • @@ -2082,7 +2089,7 @@

    AttributesSampleSet.

    Parameters
    -

    obj (dict) – A SampleSet serialized by to_serializable().

    +

    obj (dict) – A SampleSet serialized by to_serializable().

    Returns

    SampleSet

    @@ -2136,12 +2143,12 @@

    Attributesnumpy.isclose() for additional details and caveats.

    +

    See numpy.isclose() for additional details and caveats.

    Parameters
      -
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • -
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    • +
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • +
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    Returns
    @@ -2183,7 +2190,7 @@

    Attributes
    property record#
    -

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    +

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    Examples

    >>> sampler = dimod.ExactSolver()
     >>> sampleset = sampler.sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1.0})
    @@ -2205,9 +2212,9 @@ 

    Attributes
    Parameters
    @@ -2245,7 +2252,7 @@

    Attributes
    Parameters
    @@ -2294,9 +2301,9 @@

    Attributes
    Parameters

    Examples

    @@ -2438,7 +2445,7 @@

    Attributes
    Parameters

    @@ -2887,7 +2905,7 @@

    Attributes
    Type
    -

    float

    +

    float

    @@ -2898,7 +2916,7 @@

    Attributes
    Type
    -

    int

    +

    int

    @@ -2909,7 +2927,7 @@

    Attributes
    Type
    -

    list

    +

    list

    @@ -2917,11 +2935,11 @@

    Attributes
    Parameters
    @@ -2989,7 +3007,7 @@

    AttributesReturn type -

    dict

    +

    dict

    diff --git a/www/reference/openjij/model/chimera_model/index.html b/www/reference/openjij/model/chimera_model/index.html index c643c65..48622e0 100644 --- a/www/reference/openjij/model/chimera_model/index.html +++ b/www/reference/openjij/model/chimera_model/index.html @@ -747,20 +747,20 @@

    Attributes
    -openjij.model.chimera_model.ChimeraModel(linear: dict = None, quadratic: dict = None, offset: float = 0.0, vartype=SPIN, unit_num_L: int = None, model=None, gpu: bool = False)[source]#
    +openjij.model.chimera_model.ChimeraModel(linear: dict = None, quadratic: dict = None, offset: float = 0.0, vartype=SPIN, unit_num_L: int = None, model=None, gpu: bool = False)[source]#

    generate ChimeraModel object. This model deal with chimera graph. ChimeraModel provide methods to verify whether a given interaction graph matches a Chimera graph and to convert it to cxxjij.graph.Chimera.

    Parameters
      -
    • linear (dict) – linear biases

    • -
    • quadratic (dict) – quadratic biases

    • -
    • offset (float) – offset

    • +
    • linear (dict) – linear biases

    • +
    • quadratic (dict) – quadratic biases

    • +
    • offset (float) – offset

    • vartype – vartype (‘SPIN’ or ‘BINARY’)

    • -
    • unit_num_L (int) – unit_num_L

    • +
    • unit_num_L (int) – unit_num_L

    • model (BinaryQuadraticModel) – if model is not None, the object is initialized by model.

    • -
    • gpu (bool) – if true, this can be used for gpu samplers.

    • +
    • gpu (bool) – if true, this can be used for gpu samplers.

    Returns
    diff --git a/www/reference/openjij/model/index.html b/www/reference/openjij/model/index.html index eeb4912..0411313 100644 --- a/www/reference/openjij/model/index.html +++ b/www/reference/openjij/model/index.html @@ -845,7 +845,7 @@

    Functions
    Type
    -

    dict

    +

    dict

    @@ -856,7 +856,7 @@

    Functions
    Type
    -

    dict

    +

    dict

    @@ -867,7 +867,7 @@

    Functions
    Type
    -

    float

    +

    float

    @@ -878,7 +878,7 @@

    Functions
    Type
    -

    int

    +

    int

    @@ -889,7 +889,7 @@

    Functions
    Type
    -

    list

    +

    list

    @@ -897,11 +897,11 @@

    Functions
    Parameters
    @@ -926,8 +926,13 @@

    Functions
    -openjij.model.bqm_from_numpy_matrix(mat, variables: list = None, offset=0.0, vartype='BINARY', **kwargs)[source]#
    -
    +openjij.model.bqm_from_numpy_matrix(mat, variables: list = None, offset=0.0, vartype='BINARY', **kwargs)[source]# +
    +
    Parameters
    +

    variables (list) –

    +
    +
    +
    @@ -951,12 +956,18 @@

    Functions
    -openjij.model.make_BinaryQuadraticModel(linear: dict, quadratic: dict, sparse)[source]#
    +openjij.model.make_BinaryQuadraticModel(linear: dict, quadratic: dict, sparse)[source]#

    BinaryQuadraticModel factory.

    Returns

    generated BinaryQuadraticModel class

    +
    Parameters
    +
      +
    • linear (dict) –

    • +
    • quadratic (dict) –

    • +
    +
    diff --git a/www/reference/openjij/model/king_graph/index.html b/www/reference/openjij/model/king_graph/index.html index 6a97d25..569fc60 100644 --- a/www/reference/openjij/model/king_graph/index.html +++ b/www/reference/openjij/model/king_graph/index.html @@ -752,9 +752,9 @@

    Attributes
    Parameters
    Returns
    diff --git a/www/reference/openjij/model/model/index.html b/www/reference/openjij/model/model/index.html index b2ebdd0..d65f56f 100644 --- a/www/reference/openjij/model/model/index.html +++ b/www/reference/openjij/model/model/index.html @@ -1015,7 +1015,7 @@

    Attributes
    Type
    -

    dict

    +

    dict

    @@ -1026,7 +1026,7 @@

    Attributes
    Type
    -

    dict

    +

    dict

    @@ -1037,7 +1037,7 @@

    Attributes
    Type
    -

    float

    +

    float

    @@ -1048,7 +1048,7 @@

    Attributes
    Type
    -

    int

    +

    int

    @@ -1059,7 +1059,7 @@

    Attributes
    Type
    -

    list

    +

    list

    @@ -1067,11 +1067,11 @@

    Attributes
    Parameters
    @@ -1096,8 +1096,13 @@

    Attributes
    -openjij.model.model.bqm_from_numpy_matrix(mat, variables: list = None, offset=0.0, vartype='BINARY', **kwargs)[source]#
    -
    +openjij.model.model.bqm_from_numpy_matrix(mat, variables: list = None, offset=0.0, vartype='BINARY', **kwargs)[source]# +
    +
    Parameters
    +

    variables (list) –

    +
    +
    +
    @@ -1121,23 +1126,32 @@

    Attributes
    -openjij.model.model.make_BinaryQuadraticModel(linear: dict, quadratic: dict, sparse)[source]#
    +openjij.model.model.make_BinaryQuadraticModel(linear: dict, quadratic: dict, sparse)[source]#

    BinaryQuadraticModel factory.

    Returns

    generated BinaryQuadraticModel class

    +
    Parameters
    +
      +
    • linear (dict) –

    • +
    • quadratic (dict) –

    • +
    +
    -openjij.model.model.make_BinaryQuadraticModel_from_JSON(obj: dict)[source]#
    +openjij.model.model.make_BinaryQuadraticModel_from_JSON(obj: dict)[source]#

    make BinaryQuadraticModel from JSON.

    Returns

    corresponding BinaryQuadraticModel type

    +
    Parameters
    +

    obj (dict) –

    +
    diff --git a/www/reference/openjij/sampler/chimera_gpu/base_gpu_chimera/index.html b/www/reference/openjij/sampler/chimera_gpu/base_gpu_chimera/index.html index 8d2b628..3065433 100644 --- a/www/reference/openjij/sampler/chimera_gpu/base_gpu_chimera/index.html +++ b/www/reference/openjij/sampler/chimera_gpu/base_gpu_chimera/index.html @@ -732,6 +732,11 @@

    Classes +
    Return type
    +

    Dict[dimod.typing.Variable, Set]

    +
    +
    @@ -755,8 +760,13 @@

    Classes property structure _Structure#

    Structure of the structured sampler formatted as a -namedtuple() where the 3-tuple values are the +namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

    +
    +
    Return type
    +

    _Structure

    +
    +

    @@ -777,16 +787,19 @@

    Classes
    -valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#
    +valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

    Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

    Parameters
    -

    bqmdimod.BinaryQuadraticModel object to validate.

    +

    bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

    Returns

    Boolean indicating validity of BQM graph compared to sampler graph.

    +
    Return type
    +

    bool

    +

    diff --git a/www/reference/openjij/sampler/chimera_gpu/gpu_sa_sampler/index.html b/www/reference/openjij/sampler/chimera_gpu/gpu_sa_sampler/index.html index 3c70773..e0bd69a 100644 --- a/www/reference/openjij/sampler/chimera_gpu/gpu_sa_sampler/index.html +++ b/www/reference/openjij/sampler/chimera_gpu/gpu_sa_sampler/index.html @@ -793,21 +793,21 @@

    Classes
    Parameters
    Raises
    @@ -822,6 +822,11 @@

    Classes +
    Return type
    +

    Dict[dimod.typing.Variable, Set]

    +
    +
    @@ -846,12 +851,15 @@

    Classes
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -870,21 +878,22 @@

    Classes
    -sample(bqm: Union[openj.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openj.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    sample Ising model.

    Parameters
    • bqm (openjij.model.model.BinaryQuadraticModel) –

    • -
    • beta_min (float) – minimal value of inverse temperature

    • -
    • beta_max (float) – maximum value of inverse temperature

    • -
    • num_sweeps (int) – number of sweeps

    • -
    • num_reads (int) – number of reads

    • -
    • schedule (list) – list of inverse temperature

    • -
    • initial_state (dict) – initial state

    • -
    • updater (str) – updater algorithm

    • -
    • reinitialize_state (bool) – if true reinitialize state for each run

    • -
    • seed (int) – seed for Monte Carlo algorithm

    • +
    • beta_min (float) – minimal value of inverse temperature

    • +
    • beta_max (float) – maximum value of inverse temperature

    • +
    • num_sweeps (int) – number of sweeps

    • +
    • num_reads (int) – number of reads

    • +
    • schedule (list) – list of inverse temperature

    • +
    • initial_state (dict) – initial state

    • +
    • updater (str) – updater algorithm

    • +
    • reinitialize_state (bool) – if true reinitialize state for each run

    • +
    • seed (int) – seed for Monte Carlo algorithm

    • +
    • sparse (Optional[bool]) –

    Returns
    @@ -912,21 +921,23 @@

    Classes
    -sample_hubo(J: Union[dict, openj.model.model.BinaryPolynomialModel, cimod.BinaryPolynomialModel], vartype: Optional[str] = None, beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample_hubo(J: Union[dict, openj.model.model.BinaryPolynomialModel, cimod.BinaryPolynomialModel], vartype: Optional[str] = None, beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    sampling from higher order unconstrainted binary optimization.

    Parameters
      -
    • J (dict) – Interactions.

    • -
    • vartype (str, openjij.VarType) – “SPIN” or “BINARY”.

    • -
    • beta_min (float, optional) – Minimum beta (initial inverse temperature). Defaults to None.

    • -
    • beta_max (float, optional) – Maximum beta (final inverse temperature). Defaults to None.

    • -
    • schedule (list, optional) – schedule list. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • num_reads (int, optional) – number of reads. Defaults to 1.

    • -
    • init_state (list, optional) – initial state. Defaults to None.

    • -
    • reinitialize_state (bool) – if true reinitialize state for each run

    • -
    • seed (int, optional) – seed for Monte Carlo algorithm. Defaults to None.

    • +
    • J (dict) – Interactions.

    • +
    • vartype (str, openjij.VarType) – “SPIN” or “BINARY”.

    • +
    • beta_min (float, optional) – Minimum beta (initial inverse temperature). Defaults to None.

    • +
    • beta_max (float, optional) – Maximum beta (final inverse temperature). Defaults to None.

    • +
    • schedule (list, optional) – schedule list. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • num_reads (int, optional) – number of reads. Defaults to 1.

    • +
    • init_state (list, optional) – initial state. Defaults to None.

    • +
    • reinitialize_state (bool) – if true reinitialize state for each run

    • +
    • seed (int, optional) – seed for Monte Carlo algorithm. Defaults to None.

    • +
    • initial_state (Optional[Union[list, dict]]) –

    • +
    • updater (Optional[str]) –

    Returns
    @@ -962,18 +973,18 @@

    Classes
    Parameters
    Returns
    @@ -998,7 +1009,7 @@

    Classes
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    @@ -1013,8 +1024,13 @@

    Classes property structure _Structure#

    Structure of the structured sampler formatted as a -namedtuple() where the 3-tuple values are the +namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

    +
    +
    Return type
    +

    _Structure

    +
    +

    @@ -1035,16 +1051,19 @@

    Classes
    -valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#
    +valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

    Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

    Parameters
    -

    bqmdimod.BinaryQuadraticModel object to validate.

    +

    bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

    Returns

    Boolean indicating validity of BQM graph compared to sampler graph.

    +
    Return type
    +

    bool

    +

    diff --git a/www/reference/openjij/sampler/chimera_gpu/gpu_sqa_sampler/index.html b/www/reference/openjij/sampler/chimera_gpu/gpu_sqa_sampler/index.html index 503d627..0d37feb 100644 --- a/www/reference/openjij/sampler/chimera_gpu/gpu_sqa_sampler/index.html +++ b/www/reference/openjij/sampler/chimera_gpu/gpu_sqa_sampler/index.html @@ -783,22 +783,22 @@

    Classes
    Parameters
    Raises
      -
    • ValueError – If variables violate as below.

    • +
    • ValueError – If variables violate as below.

    • - trotter number is odd.

    • - no input "unit_num_L" to an argument or this constructor.

    • - given problem graph is incompatible with chimera graph.

    • -
    • AttributeError – If GPU doesn’t work.

    • +
    • AttributeError – If GPU doesn’t work.

    @@ -813,6 +813,11 @@

    Classes +
    Return type
    +

    Dict[dimod.typing.Variable, Set]

    +
    +

    @@ -837,12 +842,15 @@

    Classes
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -861,26 +869,27 @@

    Classes
    -sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    Sampling from the Ising model

    Parameters
    • bqm (openjij.BinaryQuadraticModel) –

    • -
    • beta (float, optional) – inverse tempareture.

    • -
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • -
    • trotter (int) – Trotter number.

    • -
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • -
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • -
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • -
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • -
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • beta (float, optional) – inverse tempareture.

    • +
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • +
    • trotter (int) – Trotter number.

    • +
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • +
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • +
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • +
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • +
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • sparse (Optional[bool]) –

    Raises
    -

    ValueError

    +

    ValueError

    Returns

    results

    @@ -912,17 +921,17 @@

    Classes
    Parameters
    Returns
    @@ -947,7 +956,7 @@

    Classes
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    @@ -962,8 +971,13 @@

    Classes property structure _Structure#

    Structure of the structured sampler formatted as a -namedtuple() where the 3-tuple values are the +namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

    +
    +
    Return type
    +

    _Structure

    +
    +

    @@ -984,16 +998,19 @@

    Classes
    -valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#
    +valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

    Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

    Parameters
    -

    bqmdimod.BinaryQuadraticModel object to validate.

    +

    bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

    Returns

    Boolean indicating validity of BQM graph compared to sampler graph.

    +
    Return type
    +

    bool

    +

    diff --git a/www/reference/openjij/sampler/chimera_gpu/index.html b/www/reference/openjij/sampler/chimera_gpu/index.html index 2dd1f79..b3fe8dc 100644 --- a/www/reference/openjij/sampler/chimera_gpu/index.html +++ b/www/reference/openjij/sampler/chimera_gpu/index.html @@ -950,21 +950,21 @@

    Classes
    Parameters
    Raises
      -
    • ValueError – If variables violate as below.

    • +
    • ValueError – If variables violate as below.

    • - trotter number is odd.

    • - no input "unit_num_L" to an argument or this constructor.

    • - given problem graph is incompatible with chimera graph.

    • -
    • AttributeError – If GPU doesn’t work.

    • +
    • AttributeError – If GPU doesn’t work.

    @@ -979,6 +979,11 @@

    Classes +
    Return type
    +

    Dict[dimod.typing.Variable, Set]

    +
    +
    @@ -1003,12 +1008,15 @@

    Classes
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -1027,21 +1035,22 @@

    Classes
    -sample(bqm: Union[openj.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openj.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    sample Ising model.

    Parameters
    • bqm (openjij.model.model.BinaryQuadraticModel) –

    • -
    • beta_min (float) – minimal value of inverse temperature

    • -
    • beta_max (float) – maximum value of inverse temperature

    • -
    • num_sweeps (int) – number of sweeps

    • -
    • num_reads (int) – number of reads

    • -
    • schedule (list) – list of inverse temperature

    • -
    • initial_state (dict) – initial state

    • -
    • updater (str) – updater algorithm

    • -
    • reinitialize_state (bool) – if true reinitialize state for each run

    • -
    • seed (int) – seed for Monte Carlo algorithm

    • +
    • beta_min (float) – minimal value of inverse temperature

    • +
    • beta_max (float) – maximum value of inverse temperature

    • +
    • num_sweeps (int) – number of sweeps

    • +
    • num_reads (int) – number of reads

    • +
    • schedule (list) – list of inverse temperature

    • +
    • initial_state (dict) – initial state

    • +
    • updater (str) – updater algorithm

    • +
    • reinitialize_state (bool) – if true reinitialize state for each run

    • +
    • seed (int) – seed for Monte Carlo algorithm

    • +
    • sparse (Optional[bool]) –

    Returns
    @@ -1069,21 +1078,23 @@

    Classes
    -sample_hubo(J: Union[dict, openj.model.model.BinaryPolynomialModel, cimod.BinaryPolynomialModel], vartype: Optional[str] = None, beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample_hubo(J: Union[dict, openj.model.model.BinaryPolynomialModel, cimod.BinaryPolynomialModel], vartype: Optional[str] = None, beta_min: Optional[float] = None, beta_max: Optional[float] = None, num_sweeps: Optional[int] = None, num_reads: Optional[int] = None, schedule: Optional[list] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    sampling from higher order unconstrainted binary optimization.

    Parameters
      -
    • J (dict) – Interactions.

    • -
    • vartype (str, openjij.VarType) – “SPIN” or “BINARY”.

    • -
    • beta_min (float, optional) – Minimum beta (initial inverse temperature). Defaults to None.

    • -
    • beta_max (float, optional) – Maximum beta (final inverse temperature). Defaults to None.

    • -
    • schedule (list, optional) – schedule list. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • num_reads (int, optional) – number of reads. Defaults to 1.

    • -
    • init_state (list, optional) – initial state. Defaults to None.

    • -
    • reinitialize_state (bool) – if true reinitialize state for each run

    • -
    • seed (int, optional) – seed for Monte Carlo algorithm. Defaults to None.

    • +
    • J (dict) – Interactions.

    • +
    • vartype (str, openjij.VarType) – “SPIN” or “BINARY”.

    • +
    • beta_min (float, optional) – Minimum beta (initial inverse temperature). Defaults to None.

    • +
    • beta_max (float, optional) – Maximum beta (final inverse temperature). Defaults to None.

    • +
    • schedule (list, optional) – schedule list. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • num_reads (int, optional) – number of reads. Defaults to 1.

    • +
    • init_state (list, optional) – initial state. Defaults to None.

    • +
    • reinitialize_state (bool) – if true reinitialize state for each run

    • +
    • seed (int, optional) – seed for Monte Carlo algorithm. Defaults to None.

    • +
    • initial_state (Optional[Union[list, dict]]) –

    • +
    • updater (Optional[str]) –

    Returns
    @@ -1119,18 +1130,18 @@

    Classes
    Parameters
    Returns
    @@ -1155,7 +1166,7 @@

    Classes
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    @@ -1170,8 +1181,13 @@

    Classes property structure _Structure#

    Structure of the structured sampler formatted as a -namedtuple() where the 3-tuple values are the +namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

    +
    +
    Return type
    +

    _Structure

    +
    +

    @@ -1192,16 +1208,19 @@

    Classes
    -valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#
    +valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

    Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

    Parameters
    -

    bqmdimod.BinaryQuadraticModel object to validate.

    +

    bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

    Returns

    Boolean indicating validity of BQM graph compared to sampler graph.

    +
    Return type
    +

    bool

    +

    @@ -1222,22 +1241,22 @@

    Classes
    Parameters
    Raises
      -
    • ValueError – If variables violate as below.

    • +
    • ValueError – If variables violate as below.

    • - trotter number is odd.

    • - no input "unit_num_L" to an argument or this constructor.

    • - given problem graph is incompatible with chimera graph.

    • -
    • AttributeError – If GPU doesn’t work.

    • +
    • AttributeError – If GPU doesn’t work.

    @@ -1252,6 +1271,11 @@

    Classes +
    Return type
    +

    Dict[dimod.typing.Variable, Set]

    +
    +

    @@ -1276,12 +1300,15 @@

    Classes
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -1300,26 +1327,27 @@

    Classes
    -sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    Sampling from the Ising model

    Parameters
    • bqm (openjij.BinaryQuadraticModel) –

    • -
    • beta (float, optional) – inverse tempareture.

    • -
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • -
    • trotter (int) – Trotter number.

    • -
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • -
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • -
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • -
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • -
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • beta (float, optional) – inverse tempareture.

    • +
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • +
    • trotter (int) – Trotter number.

    • +
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • +
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • +
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • +
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • +
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • sparse (Optional[bool]) –

    Raises
    -

    ValueError

    +

    ValueError

    Returns

    results

    @@ -1351,17 +1379,17 @@

    Classes
    Parameters
    Returns
    @@ -1386,7 +1414,7 @@

    Classes
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    @@ -1401,8 +1429,13 @@

    Classes property structure _Structure#

    Structure of the structured sampler formatted as a -namedtuple() where the 3-tuple values are the +namedtuple() where the 3-tuple values are the nodelist, edgelist and adjacency attributes.

    +
    +
    Return type
    +

    _Structure

    +
    +

    @@ -1423,16 +1456,19 @@

    Classes
    -valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#
    +valid_bqm_graph(bqm: dimod.BinaryQuadraticModel) bool#

    Validate that problem defined by dimod.BinaryQuadraticModel matches the graph provided by the sampler.

    Parameters
    -

    bqmdimod.BinaryQuadraticModel object to validate.

    +

    bqm (dimod.BinaryQuadraticModel) – dimod.BinaryQuadraticModel object to validate.

    Returns

    Boolean indicating validity of BQM graph compared to sampler graph.

    +
    Return type
    +

    bool

    +

    diff --git a/www/reference/openjij/sampler/csqa_sampler/index.html b/www/reference/openjij/sampler/csqa_sampler/index.html index 653ef3b..4fe09e0 100644 --- a/www/reference/openjij/sampler/csqa_sampler/index.html +++ b/www/reference/openjij/sampler/csqa_sampler/index.html @@ -723,13 +723,13 @@

    Classes
    Parameters
    @@ -749,12 +749,15 @@

    Classes
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -773,26 +776,27 @@

    Classes
    -sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    Sampling from the Ising model

    Parameters
    • bqm (openjij.BinaryQuadraticModel) –

    • -
    • beta (float, optional) – inverse tempareture.

    • -
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • -
    • trotter (int) – Trotter number.

    • -
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • -
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • -
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • -
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • -
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • beta (float, optional) – inverse tempareture.

    • +
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • +
    • trotter (int) – Trotter number.

    • +
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • +
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • +
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • +
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • +
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • sparse (Optional[bool]) –

    Raises
    -

    ValueError

    +

    ValueError

    Returns

    results

    @@ -824,17 +828,17 @@

    Classes
    Parameters
    Returns
    @@ -866,7 +870,7 @@

    Classes
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    diff --git a/www/reference/openjij/sampler/index.html b/www/reference/openjij/sampler/index.html index fc46f20..9647735 100644 --- a/www/reference/openjij/sampler/index.html +++ b/www/reference/openjij/sampler/index.html @@ -1283,13 +1283,13 @@

    Functions
    Parameters
    @@ -1309,12 +1309,15 @@

    Functions
    -remove_unknown_kwargs(**kwargs) Dict[str, Any]#
    +remove_unknown_kwargs(**kwargs) Dict[str, Any]#

    Remove with warnings any keyword arguments not accepted by the sampler.

    Parameters

    **kwargs – Keyword arguments to be validated.

    +
    Return type
    +

    Dict[str, Any]

    +

    Returns: Updated kwargs dict.

    Examples

    @@ -1333,26 +1336,27 @@

    Functions
    -sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#
    +sample(bqm: Union[openjij.model.model.BinaryQuadraticModel, dimod.BinaryQuadraticModel], beta: Optional[float] = None, gamma: Optional[float] = None, num_sweeps: Optional[int] = None, schedule: Optional[list] = None, trotter: Optional[int] = None, num_reads: Optional[int] = None, initial_state: Optional[Union[list, dict]] = None, updater: Optional[str] = None, sparse: Optional[bool] = None, reinitialize_state: Optional[bool] = None, seed: Optional[int] = None) openjij.sampler.response.Response#

    Sampling from the Ising model

    Parameters
    • bqm (openjij.BinaryQuadraticModel) –

    • -
    • beta (float, optional) – inverse tempareture.

    • -
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • -
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • -
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • -
    • trotter (int) – Trotter number.

    • -
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • -
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • -
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • -
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • -
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • beta (float, optional) – inverse tempareture.

    • +
    • gamma (float, optional) – strangth of transverse field. Defaults to None.

    • +
    • num_sweeps (int, optional) – number of sweeps. Defaults to None.

    • +
    • schedule (list[list[float, int]], optional) – List of annealing parameter. Defaults to None.

    • +
    • trotter (int) – Trotter number.

    • +
    • num_reads (int, optional) – number of sampling. Defaults to 1.

    • +
    • initial_state (list[int], optional) – Initial state. Defaults to None.

    • +
    • updater (str, optional) – update method. Defaults to ‘single spin flip’.

    • +
    • reinitialize_state (bool, optional) – Re-initilization at each sampling. Defaults to True.

    • +
    • seed (int, optional) – Sampling seed. Defaults to None.

    • +
    • sparse (Optional[bool]) –

    Raises
    -

    ValueError

    +

    ValueError

    Returns

    results

    @@ -1384,17 +1388,17 @@

    Functions
    Parameters
    Returns
    @@ -1426,7 +1430,7 @@

    Functions
    Parameters
    -

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    +

    Q (dict or numpy.ndarray) – Coefficients of a quadratic unconstrained binary optimization

    Returns

    results

    @@ -1450,11 +1454,11 @@

    Functions
    Parameters
    @@ -1570,16 +1574,16 @@

    Functions
    Parameters
      -
    • fields (list, optional, default=None) – If specified, only these fields are included in the yielded tuples. +

    • fields (list, optional, default=None) – If specified, only these fields are included in the yielded tuples. The special field name ‘sample’ can be used to view the samples.

    • sorted_by (str/None, optional, default='energy') – Selects the record field used to sort the samples. If None, the samples are yielded in record order.

    • name (str/None, optional, default='Sample') – Name of the yielded namedtuples or None to yield regular tuples.

    • -
    • reverse (bool, optional, default=False) – If True, yield in reverse order.

    • -
    • sample_dict_cast (bool, optional, default=True) – Samples are returned as dicts rather than +

    • reverse (bool, optional, default=False) – If True, yield in reverse order.

    • +
    • sample_dict_cast (bool, optional, default=True) – Samples are returned as dicts rather than SampleView, which requires heavy memory usage. Set to False to reduce load on memory.

    • -
    • index (bool, optional, default=False) – If True, datum.idx gives the corresponding index of the +

    • index (bool, optional, default=False) – If True, datum.idx gives the corresponding index of the SampleSet.record.

    @@ -1619,7 +1623,7 @@

    FunctionsReturn type -

    dict

    +

    dict

    Examples

    @@ -1644,9 +1648,9 @@

    FunctionsSampleSet is constructed with SampleSet.from_future().

    Examples

    -

    This example uses a Future object directly. Typically -a Executor sets the result of the future -(see documentation for concurrent.futures).

    +

    This example uses a Future object directly. Typically +a Executor sets the result of the future +(see documentation for concurrent.futures).

    >>> from concurrent.futures import Future
     ...
     >>> future = Future()
    @@ -1669,17 +1673,20 @@ 

    Functions
    -filter(pred: Callable[[Any], bool]) SampleSet#
    +filter(pred: Callable[[Any], bool]) SampleSet#

    Return a new sampleset with rows filtered by the given predicate.

    Parameters
    -

    pred – A function that accepts a named tuple as returned by -data() and returns a bool.

    +

    pred (Callable[[Any], bool]) – A function that accepts a named tuple as returned by +data() and returns a bool.

    Returns

    A new sample set with only the data rows for which pred returns True.

    +
    Return type
    +

    SampleSet

    +

    Examples

    >>> sampleset = dimod.SampleSet.from_samples(
    @@ -1703,7 +1710,7 @@ 

    Functions
    Raises
    -

    ValueError – If empty.

    +

    ValueError – If empty.

    Example

    @@ -1721,8 +1728,8 @@

    Functions
    Parameters
      -
    • future (object) – Object that contains or will contain the information needed to construct a -SampleSet. If future has a done() method, +

    • future (object) – Object that contains or will contain the information needed to construct a +SampleSet. If future has a done() method, this determines the value returned by SampleSet.done().

    • result_hook (callable, optional) –

      A function that is called to resolve the future. Must accept the future and return a SampleSet. If not provided, set to

      @@ -1769,12 +1776,12 @@

      FunctionsSampleSet as a whole formatted as a dict.

    • +
    • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

    • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

    • -
    • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

    • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

    • -
    • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

    • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

    • **vectors (array_like) – Other per-sample data.

    @@ -1807,12 +1814,12 @@

    Functionsas_samples().

  • bqm (BinaryQuadraticModel) – A binary quadratic model.

  • -
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • +
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

  • -
  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

  • -
  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

  • **vectors (array_like) – Other per-sample data.

  • @@ -1839,16 +1846,16 @@

    Functionsas_samples().

  • cqm (ConstrainedQuadraticModel) – A constrained quadratic model.

  • -
  • rtol (float, optional, default=1e-6) – Relative tolerance for constraint violation. +

  • rtol (float, optional, default=1e-6) – Relative tolerance for constraint violation. See ConstrainedQuadraticModel.check_feasible() for more information.

  • -
  • atol (float, optional, default=1e-8) – Absolute tolerance for constraint violations. +

  • atol (float, optional, default=1e-8) – Absolute tolerance for constraint violations. See ConstrainedQuadraticModel.check_feasible() for more information.

  • -
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • +
  • info (dict, optional) – Information about the SampleSet as a whole formatted as a dict.

  • num_occurrences (array_like, optional) – Number of occurrences for each sample. If not provided, defaults to a vector of 1s.

  • -
  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, +

  • aggregate_samples (bool, optional, default=False) – If True, all samples in returned SampleSet are unique, with num_occurrences accounting for any duplicate samples in samples_like.

  • -
  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed +

  • sort_labels (bool, optional, default=True) – Return SampleSet.variables in sorted order. For mixed (unsortable) types, the given order is maintained.

  • **vectors (array_like) – Other per-sample data.

  • @@ -1873,7 +1880,7 @@

    FunctionsSampleSet.

    Parameters
    -

    obj (dict) – A SampleSet serialized by to_serializable().

    +

    obj (dict) – A SampleSet serialized by to_serializable().

    Returns

    SampleSet

    @@ -1927,12 +1934,12 @@

    Functionsnumpy.isclose() for additional details and caveats.

    +

    See numpy.isclose() for additional details and caveats.

    Parameters
      -
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • -
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    • +
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • +
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    Returns
    @@ -1974,7 +1981,7 @@

    Functions
    property record#
    -

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    +

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    Examples

    >>> sampler = dimod.ExactSolver()
     >>> sampleset = sampler.sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1.0})
    @@ -1996,9 +2003,9 @@ 

    Functions
    Parameters
    @@ -2036,7 +2043,7 @@

    Functions
    Parameters
    @@ -2085,9 +2092,9 @@

    Functions
    Parameters

    Examples

    @@ -2229,7 +2236,7 @@

    Functions
    Parameters
    @@ -1386,7 +1389,7 @@

    ClassesSampleSet.

    Parameters
    -

    obj (dict) – A SampleSet serialized by to_serializable().

    +

    obj (dict) – A SampleSet serialized by to_serializable().

    Returns

    SampleSet

    @@ -1440,12 +1443,12 @@

    Classesnumpy.isclose() for additional details and caveats.

    +

    See numpy.isclose() for additional details and caveats.

    Parameters
      -
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • -
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    • +
    • rtol (float, optional, default=1.e-5) – The relative tolerance (see above).

    • +
    • atol (float, optional, default=1.e-8) – The absolute tolerance (see above).

    Returns
    @@ -1487,7 +1490,7 @@

    Classes
    property record#
    -

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    +

    numpy.recarray containing the samples, energies, number of occurences, and other sample data.

    Examples

    >>> sampler = dimod.ExactSolver()
     >>> sampleset = sampler.sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1.0})
    @@ -1509,9 +1512,9 @@ 

    Classes
    Parameters
    @@ -1549,7 +1552,7 @@

    Classes
    Parameters
    @@ -1598,9 +1601,9 @@

    Classes
    Parameters

    Examples

    @@ -1742,7 +1745,7 @@

    Classes
    Parameters

    @@ -840,7 +840,7 @@

    Attributes

    redisual energy’s standard error from measure energy

    Return type
    -

    float

    +

    float

    @@ -863,7 +863,7 @@

    AttributesReturn type -

    float

    +

    float

    @@ -874,9 +874,9 @@

    Attributes
    Parameters
    @@ -921,7 +921,7 @@

    AttributesReturn type -

    dict

    +

    dict

    @@ -944,7 +944,7 @@

    AttributesReturn type -

    float

    +

    float

    @@ -955,16 +955,16 @@

    Attributes
    Parameters
    Returns

    time to solution τlog(1pr)/log(1ps)\tau * \log(1-pr)/\log(1-ps) which pr is thereshold probability, ps is success probability and tautau is computation time.

    Return type
    -

    float

    +

    float

    diff --git a/www/reference/openjij/utils/graph_utils/index.html b/www/reference/openjij/utils/graph_utils/index.html index 5f9573d..128ef6c 100644 --- a/www/reference/openjij/utils/graph_utils/index.html +++ b/www/reference/openjij/utils/graph_utils/index.html @@ -659,32 +659,32 @@

    Functions
    -openjij.utils.graph_utils.chimera_to_ind(r: int, c: int, z: int, L: int)[source]#
    +openjij.utils.graph_utils.chimera_to_ind(r: int, c: int, z: int, L: int)[source]#

    [summary]

    Parameters
      -
    • r (int) – row index

    • -
    • c (int) – column index

    • -
    • z (int) – in-chimera index (must be from 0 to 7)

    • -
    • L (int) – height and width of chimera-units (total number of spins is L×L×8L \times L \times 8)

    • +
    • r (int) – row index

    • +
    • c (int) – column index

    • +
    • z (int) – in-chimera index (must be from 0 to 7)

    • +
    • L (int) – height and width of chimera-units (total number of spins is L×L×8L \times L \times 8)

    Raises
    -

    ValueError – [description]

    +

    ValueError – [description]

    Returns

    corresponding Chimera index

    Return type
    -

    int

    +

    int

    -openjij.utils.graph_utils.qubo_to_ising(mat: numpy.ndarray)[source]#
    +openjij.utils.graph_utils.qubo_to_ising(mat: numpy.ndarray)[source]#

    inplace-convert numpy matrix from qubo to ising.

    Parameters
    diff --git a/www/reference/openjij/utils/index.html b/www/reference/openjij/utils/index.html index 84cc44f..449ed62 100644 --- a/www/reference/openjij/utils/index.html +++ b/www/reference/openjij/utils/index.html @@ -803,7 +803,7 @@

    Functions

    Residual energy which is defined as EE0\langle E \rangle - E_0 (...\langle...\rangle represents average, E0E_0 is the reference energy (usually use the ground energy)).

    Return type
    -

    float

    +

    float

    @@ -814,16 +814,16 @@

    Functions
    Parameters
    Returns

    time to solution τlog(1pr)/log(1ps)\tau * \log(1-pr)/\log(1-ps) ‘s standard error which pr is thereshold probability, ps is success probability and tautau is computation time.

    Return type
    -

    float

    +

    float

    @@ -841,7 +841,7 @@

    Functions

    redisual energy’s standard error from measure energy

    Return type
    -

    float

    +

    float

    @@ -864,7 +864,7 @@

    FunctionsReturn type -

    float

    +

    float

    @@ -875,9 +875,9 @@

    Functions
    Parameters
    @@ -922,7 +922,7 @@

    FunctionsReturn type -

    dict

    +

    dict

    @@ -945,7 +945,7 @@

    FunctionsReturn type -

    float

    +

    float

    @@ -956,16 +956,16 @@

    Functions
    Parameters
    Returns

    time to solution τlog(1pr)/log(1ps)\tau * \log(1-pr)/\log(1-ps) which pr is thereshold probability, ps is success probability and tautau is computation time.

    Return type
    -

    float

    +

    float