Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

VQE sample edits for Intellisense and clarity #675

Open
wants to merge 4 commits into
base: feature/samples-gallery
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -514,7 +514,7 @@
"source": [
"num_iterations = 300\n",
"energy_eval_cost = sum(_cost.estimated_total for _cost in cost)\n",
"print(f\"Single iteration: {energy_eval_cost} {_cost.currency_code}, {num_iterations} iterations: {energy_eval_cost * num_iterations} {_cost.currency_code}\")"
"print(f\"Single iteration: {energy_eval_cost} {cost[0].currency_code}, {num_iterations} iterations: {energy_eval_cost * num_iterations} {cost[0].currency_code}\")"
]
},
{
Expand Down
Expand Up @@ -166,7 +166,7 @@
"# Create a VQE object that runs VQE using the above created qubit operations, variational form and optimizer\n",
"vqe = VQE(qubit_op, var_form, optimizer=optimizer)\n",
"\n",
"# Run the full VQE program\n",
"# Run the full VQE program. This might take up to 50 seconds to run on the noisy simulator.\n",
"ret = vqe.run(quantum_instance)\n",
"\n",
"# Get and print the result\n",
Expand Down Expand Up @@ -515,7 +515,7 @@
"source": [
"num_iterations = 300\n",
"energy_eval_cost = sum(_cost.estimated_total for _cost in cost)\n",
"print(f\"Single iteration: {energy_eval_cost} {_cost.currency_code}, {num_iterations} iterations: {energy_eval_cost * num_iterations} {_cost.currency_code}\")"
"print(f\"Single iteration: {energy_eval_cost} {cost[0].currency_code}, {num_iterations} iterations: {energy_eval_cost * num_iterations} {cost[0].currency_code}\")"
]
},
{
Expand Down