Skip to content

Commit

Permalink
Result of dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Dec 18, 2024
1 parent 8f94497 commit 83df33a
Showing 1 changed file with 219 additions and 6 deletions.
225 changes: 219 additions & 6 deletions templates/hamiltonian-simulation/serverless_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
"# In[1]:\n",
"\n",
"\n",
"# mypy: ignore-errors\n",
"from qiskit_serverless import get_arguments, save_result, is_running_in_serverless\n",
"\n",
"\n",
"output = {}\n",
"\n",
"if is_running_in_serverless():\n",
" \n",
"[...]\n"
]
Expand Down Expand Up @@ -242,7 +242,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"6caccb69-1d4b-49a3-949a-77b9e280ab6f\n"
"3f0c98e8-b018-4243-828d-0bde255e09c1\n"
]
}
],
Expand Down Expand Up @@ -307,20 +307,233 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"id": "ccb5e1b4-1471-43c9-b4ba-8db0a277ecd5",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'num_aqc_parameters': 111,\n",
" 'target_bond_dimension': 1,\n",
" 'aqc_starting_fidelity': 0.9998469036435305,\n",
" 'num_iterations': 3,\n",
" 'aqc_final_parameters': [-3.141592650080301,\n",
" 0.7854329738547067,\n",
" 3.1415830013190655,\n",
" -3.141592648357701,\n",
" 0.7854005829948971,\n",
" -4.771585317808193e-05,\n",
" 1.0536177958486086e-08,\n",
" 2.3561859299448105,\n",
" -1.9466309954997306e-07,\n",
" -3.1415926365909472,\n",
" 0.13227782458785936,\n",
" 3.1415877274788384,\n",
" 0.10058281931584818,\n",
" -0.000210284967971987,\n",
" 0.0003725528095780092,\n",
" -1.5708061121542478,\n",
" 1.5708061752095683,\n",
" -0.7853632963554884,\n",
" -5.165520177604924e-05,\n",
" 2.35619686381606,\n",
" -3.251384635320454e-08,\n",
" 0.10113150879839808,\n",
" -0.0008073870800575787,\n",
" -3.793581123311004e-07,\n",
" -1.5707961759324534,\n",
" 1.5708694553573799,\n",
" 3.141590288828051,\n",
" 2.6800637339568085e-07,\n",
" 0.25355226093861927,\n",
" 3.141592901481447,\n",
" 0.09924986002645499,\n",
" 3.1828626196469066e-07,\n",
" 0.0005826564623252421,\n",
" 2.087932624658035e-05,\n",
" 1.3249363700428107,\n",
" 3.1415977288979477,\n",
" 3.0437936179787315e-07,\n",
" 1.9903495471870327,\n",
" 3.1415926919219896,\n",
" 0.10063137399475715,\n",
" 0.0006344645744590586,\n",
" -6.170291699753841e-05,\n",
" -1.5707946530626848,\n",
" 1.5707992776533217,\n",
" 3.6734223359049287,\n",
" -1.5708011603861944,\n",
" 1.5708343761245829,\n",
" 3.0093467240537928,\n",
" 0.0986690986426043,\n",
" 1.2590113266825226e-06,\n",
" 0.0005250889024820352,\n",
" -3.141593062425439,\n",
" 0.04612168126899503,\n",
" -4.4878228971543533e-07,\n",
" 6.155041056665205e-06,\n",
" 2.770397759781553,\n",
" 3.1415868390069397,\n",
" 0.19921303511497152,\n",
" -9.958560176075904e-06,\n",
" -0.0005809477498134955,\n",
" -1.9817250388694902e-05,\n",
" 1.1358898103184771,\n",
" -1.1763074347292078e-06,\n",
" -1.5707817056873759,\n",
" 1.5707961538506197,\n",
" 4.71242730772076,\n",
" 0.09866916298777909,\n",
" 0.0010905387598248424,\n",
" -3.8540439627283816e-05,\n",
" -8.696219872201997e-07,\n",
" 1.8597495316576977,\n",
" 3.141591632472316,\n",
" -1.5707985467959331,\n",
" 1.5708309363587778,\n",
" 3.0778709247853837,\n",
" 0.09925018383317537,\n",
" -0.00036029337726259543,\n",
" -0.00011368961081508166,\n",
" -1.5707948743109788,\n",
" 1.5708022519737004,\n",
" 3.387480345990204,\n",
" -1.570799273339577,\n",
" 1.5707932753615077,\n",
" 0.8158760839243593,\n",
" 0.10061418328724725,\n",
" -4.3646302266085646e-07,\n",
" -0.0007870965161276542,\n",
" -3.141599011330227,\n",
" 2.914971283541657,\n",
" 6.247945336365239e-06,\n",
" -3.1415606345565603,\n",
" 1.5708109723145287,\n",
" 3.141592660440137,\n",
" 0.1011210594305181,\n",
" 2.4145069418707e-06,\n",
" -0.001207722686252212,\n",
" -6.773458521729703e-05,\n",
" 1.253759834500667,\n",
" -2.1133820472935366e-05,\n",
" -3.1415871776898463,\n",
" 1.3441057366254834,\n",
" 3.1415926636183755,\n",
" 0.10058970142716774,\n",
" 0.00013377812871569962,\n",
" -0.00015862656934879335,\n",
" -3.141579389042976,\n",
" 1.5708024367356543,\n",
" 3.14159265860347,\n",
" -3.141614606778262,\n",
" 2.82456467224735,\n",
" 6.283185312666912],\n",
" 'aqc_fidelity': 0.9999364836122492,\n",
" 'twoqubit_depth': 91}"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"job.result()"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"id": "3c6ab5e2-8c22-435d-b773-757a7ed075a4",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2024-12-18 14:25:53,111\tINFO job_manager.py:531 -- Runtime env is setting up.\n",
"estimator_options = {\n",
" \"resilience\": {\n",
" \"measure_mitigation\": true,\n",
" \"zne_mitigation\": true,\n",
" \"zne\": {\n",
" \"amplifier\": \"gate_folding\",\n",
" \"noise_factors\": [\n",
" 1,\n",
" 2,\n",
" 3\n",
" ],\n",
" \"extrapolated_noise_factors\": [\n",
" 0.0,\n",
" 0.1,\n",
" 0.2,\n",
" 0.30000000000000004,\n",
" 0.4,\n",
" 0.5,\n",
" 0.6000000000000001,\n",
" 0.7000000000000001,\n",
" 0.8,\n",
" 0.9,\n",
" 1.0,\n",
" 1.1,\n",
" 1.2000000000000002,\n",
" 1.3,\n",
" 1.4000000000000001,\n",
" 1.5,\n",
" 1.6,\n",
" 1.7000000000000002,\n",
" 1.8,\n",
" 1.9000000000000001,\n",
" 2.0,\n",
" 2.1,\n",
" 2.2,\n",
" 2.3000000000000003,\n",
" 2.4000000000000004,\n",
" 2.5,\n",
" 2.6,\n",
" 2.7,\n",
" 2.8000000000000003,\n",
" 2.9000000000000004,\n",
" 3.0\n",
" ],\n",
" \"extrapolator\": [\n",
" \"exponential\",\n",
" \"linear\",\n",
" \"fallback\"\n",
" ]\n",
" },\n",
" \"measure_noise_learning\": {\n",
" \"num_randomizations\": 512,\n",
" \"shots_per_randomization\": 512\n",
" }\n",
" },\n",
" \"twirling\": {\n",
" \"enable_gates\": true,\n",
" \"enable_measure\": true,\n",
" \"num_randomizations\": 300,\n",
" \"shots_per_randomization\": 100,\n",
" \"strategy\": \"active\"\n",
" }\n",
"}\n",
"Hamiltonian: SparsePauliOp(['IIXX', 'IXXI', 'XXII', 'IIYY', 'IYYI', 'YYII'],\n",
" coeffs=[1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j])\n",
"Observable: SparsePauliOp(['IZZI'],\n",
" coeffs=[1.+0.j])\n",
"Number of AQC parameters: 111\n",
"Target MPS maximum bond dimension: 1\n",
"Starting fidelity of AQC portion: 0.9998469036435305\n",
"2024-12-18 14:27:24.300802 Intermediate result: Fidelity 0.99988068\n",
"2024-12-18 14:27:24.304527 Intermediate result: Fidelity 0.99993563\n",
"2024-12-18 14:27:24.372708 Intermediate result: Fidelity 0.99993563\n",
"Done after 3 iterations.\n",
"Fidelity of AQC portion: 0.9999364836122492\n",
"ISA circuit two-qubit depth: 91\n",
"Aborting before hardware execution since `dry_run` is True.\n",
"\n"
]
}
],
"source": [
"print(job.logs())"
]
Expand Down

0 comments on commit 83df33a

Please sign in to comment.