Comments (4)
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.
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.
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
andsample_qubo
Hard to fix this right now, so we'll do it in the future.
from openjij.
The first problem has been fixed in v0.4.5.
I created a new issue about the second problem.
from openjij.
Related Issues (20)
- C++ test messages
- Error in CSQASampler()
- Integrated test for OpenJij
- beta_min and beta_max must be consistent with changing vartype
- vartype in polynomial system cannot be represented. HOT 1
- Unnatural behavior about vartype.
- setting binary `initial_state` results in wrong solution HOT 1
- Strange behavior of annealing time HOT 1
- support dimod 0.10.13 HOT 1
- openjij.BinaryQuadraticModel does not support dwave's EmbeddingComposite etc.
- Mathematical forms are right-aligned
- Add explanation for `sparse` setting to tutorial HOT 2
- `solver_benchmark` calculates standard deviation not standard error HOT 1
- The final plot at Job Sequencing problem shows ValueError
- The several results in the tutorial are not correctly drawn because of KeyboardInterrupt.
- The networkx is not imported at Graph coloring tutorial HOT 1
- cmake fails when installing OpenJij with CUDA/GPU HOT 9
- Failure at building CUDA objects HOT 1
- ChimeraModel() fails due to missing positional argument 'sparse' HOT 2
- Error during pip install HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openjij.