Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues OpenJij#217 , OpenJij#381 & OpenJij#338 #434

Closed
wants to merge 9 commits into from

Conversation

durga0201
Copy link
Contributor

Changes

changes in benchmark.py,
chimeramodel.py and
CSQSampler.py

Related issue

#217 , #381 and #338

Sample code

>>> from openjij.model.chimera_model import ChimeraModel
>>> Q={(0, 4): -1, (4, 12): -1}
>>> chimera_model = ChimeraModel(quadratic =Q, unit_num_L=2)
>>> chimera_model.validate_chimera()
True

>>> import openjij as oj
>>> J = {(0, 1): -1, (3, 4): -1}
>>> h = {0: -1, 1: -1, 2: 1, 3: 1}
>>> sampler = oj.CSQASampler()
>>> res = sampler.sample_ising(h, J)
>>> res
Response(rec.array([([ 1,  1, -1, -1,  1], -4., 1)],
          dtype=[('sample', 'i1', (5,)), ('energy', '<f8'), ('num_occurrences', '<i8')]), Variables([0, 1, 2, 3, 4]), {'system': [{'spin_config': [[(4.1280454561235835, 1)], [(2.1423947529617693, 1)], [(0.158394660189376, -1)], [(4.620177263165031, -1)], [(4.3465034278912915, 1)], [(3.2927341924258946, 1)]]}], 'sampling_time': 5336.083006113768, 'execution_time': 5115.207983180881, 'list_exec_times': array([5115.20798318]), 'schedule': {'beta': 5.0, 'gamma': 1.0, 'num_sweeps': 1000}}, 'SPIN')
>>> 

Destructive changes

None

Misc

None

@durga0201 durga0201 changed the title Fixed issues OpenJij#217 , OpenJij#381 and OpenJij#338 Fixed issues OpenJij#217 , OpenJij#381 & OpenJij#338 Jun 19, 2024
@durga0201
Copy link
Contributor Author

@29rou @j-i-k-o kindly review it.

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.09%. Comparing base (b405fd2) to head (02baf50).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #434   +/-   ##
=======================================
  Coverage   74.09%   74.09%           
=======================================
  Files          42       42           
  Lines        2567     2567           
  Branches      925      925           
=======================================
  Hits         1902     1902           
  Misses        379      379           
  Partials      286      286           
Flag Coverage Δ
openjij 67.30% <66.66%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
openjij/sampler/csqa_sampler.py 29.72% <ø> (ø)
openjij/utils/benchmark.py 97.43% <ø> (ø)
openjij/model/chimera_model.py 49.60% <66.66%> (ø)

@29rou
Copy link
Member

29rou commented Jun 20, 2024

Thank you for the pull request. We have fixed the GitHub Actions script, so we apologize for the inconvenience. We would like to kindly request that you run the test again.

@durga0201
Copy link
Contributor Author

@29rou I don't know why, it's still showing some error.

@29rou 29rou self-requested a review June 20, 2024 06:08
@29rou 29rou self-assigned this Jun 20, 2024
@durga0201 durga0201 deleted the branch OpenJij:main June 20, 2024 23:54
@durga0201 durga0201 closed this Jun 20, 2024
@durga0201 durga0201 deleted the main branch June 20, 2024 23:54
@durga0201 durga0201 restored the main branch June 21, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants