Skip to content

Commit b6b6859

Browse files
committed
bump version, update docs
1 parent 0fdea7d commit b6b6859

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ProblemReductions"
22
uuid = "899c297d-f7d2-4ebf-8815-a35996def416"
33
authors = ["GiggleLiu <[email protected]> and contributors"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55

66
[deps]
77
BitBasis = "50ba71b6-fa0f-514d-ae9a-0916efc90dcf"

examples/Ising.jl

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,12 @@ target = target_problem(reduction_result)
3535
# Note that the output of `implement_reduction_path` is a [`AbstractReductionResult`](@ref), which contains the target problem and reduction information. So we
3636
# need to extract the target problem by [`target_problem`](@ref) function.
3737

38-
import GenericTensorNetworks, Graphs # import Ising machine solver
39-
gtn_problem = GenericTensorNetworks.SpinGlass(
40-
ProblemReductions.nv(target.graph),
41-
vcat(ProblemReductions._vec.(Graphs.edges(target.graph)), [[i] for i=1:Graphs.nv(target.graph)]),
42-
ProblemReductions.weights(target)
43-
)
44-
result = GenericTensorNetworks.solve(
45-
GenericTensorNetworks.GenericTensorNetwork(gtn_problem),
46-
GenericTensorNetworks.SingleConfigMin()
47-
)[]
38+
import GenericTensorNetworks # import Generic Tensor Network Solver
39+
result = findbest(target, GenericTensorNetworks.GTNSolver())
4840

4941
# Here we use `GenericTensorNetworks.jl` to solve the SpinGlass problem and obtain the `result`, we need to extract the solution for source problem from the result.
5042

51-
extract_solution(reduction_result, 1 .- 2 .* Int.(GenericTensorNetworks.read_config(result)))
43+
extract_solution.(Ref(reduction_result), result)
5244

5345
# The result is `01` and `11`, decimally 2 and 3, which yields the correct factors of 6.
5446

0 commit comments

Comments
 (0)