diff --git a/docs/guides/qunova-chemistry.ipynb b/docs/guides/qunova-chemistry.ipynb index 397a38777605..1807b90fe9e0 100644 --- a/docs/guides/qunova-chemistry.ipynb +++ b/docs/guides/qunova-chemistry.ipynb @@ -128,18 +128,6 @@ "Users are able to decide the quantum circuit used and the number of shots taken for each quantum circuit, as well as control the subspace size or enable the classical generation of additional configurations to assist the quantum generated configurations. In this way users can tailor the behavior of HI-VQE to suit their desired applications." ] }, - { - "cell_type": "markdown", - "id": "13d5b39e-a4cd-4c7e-b891-5d5fa474cdd5", - "metadata": {}, - "source": [ - "## Licensing\n", - "\n", - "Please note that use of this Qiskit Function is limited to problems requiring at most 20 qubits, unless a license is obtained granting a higher limit.\n", - "\n", - "Please email [qiskit.support@qunovacomputing.com](mailto:qiskit.support@qunovacomputing.com) if you would like to inquire about obtaining a license." - ] - }, { "cell_type": "markdown", "id": "73390a19", @@ -405,6 +393,61 @@ "print(f\"Sampled Number of States: {len(result['states'])}\")" ] }, + { + "cell_type": "markdown", + "id": "5f252348-720f-47c0-9e7f-ae5e5512b8d1", + "metadata": {}, + "source": [ + "## Licensing\n", + "\n", + "Note that use of this Qiskit Function is limited to problems requiring at most 20 qubits, unless a license is obtained granting a higher limit.\n", + "\n", + "Email [qiskit.support@qunovacomputing.com](mailto:qiskit.support@qunovacomputing.com) with license inquiries.\n", + "\n", + "### Example of licensed function use\n", + "\n", + "Licensed users are issued a license token, and then must use a wrapper library to submit their license token to the function.\n", + "The wrapper library can be installed [from PyPI](https://pypi.org/project/hivqe-qiskit-function-utils/) with `pip install hivqe-qiskit-function-utils`.\n", + "The below example shows how this library should be used to submit your license token when calling the function." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a1d9ad0f-4add-4ef8-a63c-c1601b13e322", + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "from qiskit_ibm_catalog import QiskitFunctionsCatalog\n", + "from hivqe_qiskit_function_utils import FunctionWrapper\n", + "\n", + "catalog = QiskitFunctionsCatalog(\n", + " token=\"your_qiskit_functions_catalog_token\",\n", + " channel=\"ibm_quantum_platform\",\n", + " instance=\"your_ibm_instance\",\n", + ")\n", + "\n", + "molecule_geometry = f\"\"\"\n", + "O 0 0 0;\n", + "H {-0.957*math.sin(math.radians(104.5)/2.0)} {0.957*math.cos(math.radians(104.5)/2.0)} 0;\n", + "H {0.957*math.sin(math.radians(104.5)/2.0)} {0.957*math.cos(math.radians(104.5)/2.0)} 0\n", + "\"\"\"\n", + "\n", + "hivqe = FunctionWrapper(\n", + " token=\"your_hivqe_license_token\",\n", + " function=catalog.load(\"qunova/hivqe-chemistry\"),\n", + ")\n", + "job = hivqe.run(\n", + " geometry=molecule_geometry,\n", + " backend_name=\"ibm_torino\",\n", + " max_states=10000,\n", + " max_expansion_states=1000,\n", + " hivqe_options={\"ansatz\": \"epa\", \"max_iter\": 10},\n", + ")\n", + "result = job.result()" + ] + }, { "cell_type": "markdown", "id": "4af252f6",