Skip to content

Commit

Permalink
Updated adaptive circuits demo for new return type (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudit2812 authored Apr 14, 2023
1 parent dbccd02 commit ce4d5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demonstrations/tutorial_adaptive_circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def circuit(params):
t1 = time.time()
params, energy = opt.step_and_cost(circuit, params)
t2 = time.time()
print("n = {:}, E = {:.8f} H, t = {:.2f} s".format(n, energy, t2 - t1))
print("n = {:}, E = {:.8f} H, t = {:.2f} s".format(n, energy[0], t2 - t1))

##############################################################################
# Using the sparse method reproduces the ground state energy while the optimization time is
Expand Down

0 comments on commit ce4d5bb

Please sign in to comment.