From e3262be209b52d4d315242008559376ea18529df Mon Sep 17 00:00:00 2001 From: Mudit Pandey Date: Wed, 12 Apr 2023 13:22:44 -0400 Subject: [PATCH] Updated adaptive circuits demo for new return type --- demonstrations/tutorial_adaptive_circuits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demonstrations/tutorial_adaptive_circuits.py b/demonstrations/tutorial_adaptive_circuits.py index 0aa824d66b..fc9e9bdac3 100644 --- a/demonstrations/tutorial_adaptive_circuits.py +++ b/demonstrations/tutorial_adaptive_circuits.py @@ -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