GithubHelp home page GithubHelp logo

About cooling schedule about openjij HOT 4 CLOSED

openjij avatar openjij commented on June 16, 2024
About cooling schedule

from openjij.

Comments (4)

K-Suzuki-Jij avatar K-Suzuki-Jij commented on June 16, 2024

The cooling schedule does not seem to be consistent with changing vartype

import openjij as oj
model = oj.BinaryPolynomialModel({(0,1):-1}, "SPIN")
res = oj.SASampler().sample_hubo(model.to_hising(), "SPIN")
res.info['schedule']
{'beta_max': 2.302585092994046, 'beta_min': 0.34657359027997264, 'num_sweeps': 1000}

res = oj.SASampler().sample_hubo(model.to_hubo(), "BINARY")
res.info['schedule']
{'beta_max': 1.5350567286626973, 'beta_min': 0.11552453009332421, 'num_sweeps': 1000}

Above two cases should have the same cooling schedule.
This inconsistency also occurs in sample_ising and sample_qubo

from openjij.

j-i-k-o avatar j-i-k-o commented on June 16, 2024

Detailed log shows that the right-bottom element of augmented ising matrix is 1, which makes the min_delta_energy always 1.

>>> import openjij as oj
>>> res = oj.SASampler().sample_ising({}, {(0,1):-1, (0,2):+1})
ising interaction: [[ 0. -1.  1.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  1.]]
ising_interaction[ising_interaction > 0]: [1. 1.]
abs_bias: [2. 0. 0. 1.]
abs_bias[abs_bias > 0]: [2. 1.]
>>> res.info
{'system': [], 'sampling_time': 344.903999575763, 'execution_time': 291.5839995694114, 'list_exec_times': array([291.58399957]), 'schedule': {'beta_max': 4.605170185988092, 'beta_min': 0.34657359027997264, 'num_sweeps': 1000}}
>>> res = oj.SASampler().sample_ising({}, {(0,1):-2, (0,2):+2})
ising interaction: [[ 0. -2.  2.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  1.]]
ising_interaction[ising_interaction > 0]: [2. 1.]
abs_bias: [4. 0. 0. 1.]
abs_bias[abs_bias > 0]: [4. 1.]

from openjij.

K-Suzuki-Jij avatar K-Suzuki-Jij commented on June 16, 2024

The cooling schedule does not seem to be consistent with changing vartype

import openjij as oj
model = oj.BinaryPolynomialModel({(0,1):-1}, "SPIN")
res = oj.SASampler().sample_hubo(model.to_hising(), "SPIN")
res.info['schedule']
{'beta_max': 2.302585092994046, 'beta_min': 0.34657359027997264, 'num_sweeps': 1000}

res = oj.SASampler().sample_hubo(model.to_hubo(), "BINARY")
res.info['schedule']
{'beta_max': 1.5350567286626973, 'beta_min': 0.11552453009332421, 'num_sweeps': 1000}

Above two cases should have the same cooling schedule. This inconsistency also occurs in sample_ising and sample_qubo

Hard to fix this right now, so we'll do it in the future.

from openjij.

K-Suzuki-Jij avatar K-Suzuki-Jij commented on June 16, 2024

The first problem has been fixed in v0.4.5.
I created a new issue about the second problem.

from openjij.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.