Skip to content

Commit 0102f01

Browse files
authored
Merge pull request #3 from psrenergy/pr/update
Update dependencies
2 parents 0c48fd0 + 8e9b0fb commit 0102f01

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

CondaPkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels = ["anaconda", "conda-forge"]
22

33
[deps]
4-
python = ">=3.8,<3.11"
4+
python = ">=3.8,<=3.11"
55

66
[pip.deps]
77
numpy = ">=1.20.0"

Project.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
name = "PySA"
2-
uuid = "46b73cfa-376a-48ee-8926-0c45ac3f7830"
1+
name = "PySA"
2+
uuid = "46b73cfa-376a-48ee-8926-0c45ac3f7830"
33
authors = ["pedromxavier <pedromxavier@psr-inc.com>"]
44
version = "0.2.0"
55

66
[deps]
7-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
88
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
9-
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
10-
QUBODrivers = "a3f166f7-2cd3-47b6-9e1e-6fbfe0449eb0"
11-
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319"
9+
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
10+
QUBO = "ce8c2e91-a970-4681-856b-16178c24a30c"
1211

1312
[compat]
1413
MathOptInterface = "1"
15-
PythonCall = "0.9.15"
16-
QUBODrivers = "0.3"
17-
QUBOTools = "0.9"
18-
julia = "1.9"
14+
PythonCall = "0.9.20"
15+
julia = "1.9"
16+
QUBO = "0.3.0"

src/PySA.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ module PySA
33
using PythonCall
44
using LinearAlgebra
55

6-
import QUBODrivers
7-
import QUBOTools
6+
import QUBO
7+
QUBODrivers = QUBO.QUBODrivers
8+
QUBOTools = QUBO.QUBOTools
89
import MathOptInterface as MOI
910

1011
const np = PythonCall.pynew()
@@ -82,7 +83,7 @@ function QUBODrivers.sample(sampler::Optimizer{T}) where {T}
8283
for i = 1:num_replicas
8384
# NOTE: Python is 0-indexed
8485
# NOTE: sign has to be inverted, as mentioned before
85-
ψ = -round.(Int, pyconvert.(T, Ψ[i-1]))
86+
ψ = -round.(Int, pyconvert.(T, [var for var in Ψ[i-1]]))
8687

8788
# Compute value instead of retrieving it, to avoid precision errors
8889
λ = QUBOTools.value(ψ, h, J, α, β)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using PySA: PySA, MOI, QUBODrivers
1+
using PySA: PySA, MOI, QUBO.QUBODrivers
22

33
QUBODrivers.test(PySA.Optimizer; examples=true) do model
44
MOI.set(model, MOI.Silent(), true)

0 commit comments

Comments
 (0)