Skip to content

Commit

Permalink
Removed references to s3_folder since this is assumed by default now
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanAWS committed Mar 3, 2022
1 parent 76f82ee commit d80fe97
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def optimize(
sigma,
beta,
vol_bound,
s3_folder,
dwave=True
):
"""
Expand Down Expand Up @@ -199,7 +198,7 @@ def optimize(
)

# qubo solver
response = dwave_solver(obj,s3_folder) if dwave else qubo_solver(obj)
response = dwave_solver(obj) if dwave else qubo_solver(obj)
# get optimal prices
opt_prices, _, energy = decoder_price_response(response, len(a), price_levels)
opt_demand, max_revenue = get_demands_rev(a, b, selected_hist_prices, opt_prices)
Expand All @@ -218,11 +217,11 @@ def qubo_solver(obj):
return response


def dwave_solver(obj,s3_folder):
def dwave_solver(obj):
model = (-obj).compile().to_bqm()
num_shots = 10000

sampler = BraketDWaveSampler(s3_folder,
sampler = BraketDWaveSampler(device_arn=
'arn:aws:braket:::device/qpu/d-wave/Advantage_system4')
sampler = EmbeddingComposite(sampler)
response = sampler.sample(model, num_reads=num_shots)
Expand Down

0 comments on commit d80fe97

Please sign in to comment.