Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Replace VQEProgram with VQEClient in qiskit-nature notebook #11

Open
HuangJunye opened this issue Apr 25, 2022 · 3 comments
Open

Replace VQEProgram with VQEClient in qiskit-nature notebook #11

HuangJunye opened this issue Apr 25, 2022 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@HuangJunye
Copy link
Collaborator

HuangJunye commented Apr 25, 2022

VQEProgram has been deprecated and VQEClient should be used instead.

"And finally we can construct a new VQE solver using `VQEProgram`:"
]
},
{
"cell_type": "markdown",
"id": "93b95cf7",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"> Note: `VQEProgram` will be renamed to `VQEClient` in Qiskit Nature v0.3.0!"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "6f57f58e",
"metadata": {
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"from qiskit_nature.runtime import VQEProgram\n",
"\n",
"optimizer = {\n",
" \"name\": \"SPSA\",\n",
" \"maxiter\": 50,\n",
"}\n",
"initial_point = np.random.random(ansatz.num_parameters)\n",
" \n",
"runtime_vqe = VQEProgram(\n",
" ansatz=ansatz,\n",
" optimizer=optimizer,\n",
" initial_point=initial_point,\n",
" provider=provider,\n",
" backend=backend,\n",
" shots=1024,\n",
" measurement_error_mitigation=True,\n",
")"

@HuangJunye HuangJunye added the good first issue Good for newcomers label Apr 25, 2022
@garrison
Copy link
Member

The qiskit-finance notebook needs to be updated as well.

@stormshawn
Copy link

I will try this as a first issue if no one has already started working on it.

@HuangJunye
Copy link
Collaborator Author

@stormshawn Sure, thank you! I will assign you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants