Skip to content

Commit

Permalink
add a warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjaskula-aws committed Aug 10, 2023
1 parent 3fcbd63 commit 356ca76
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions examples/pulse_control/2_Native_gate_calibrations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,34 @@
"print(bell_circuit.to_ir(IRType.OPENQASM, gate_definitions=custom_calibration.pulse_sequences).source)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Warning: supplying input parameter values when submitting parametric pulse program is currently not possible.\n",
"This limitation includes:\n",
"- executing circuits with custom gate definitions or\n",
"- circuits containing `pulse_gate`s \n",
"by calling the `device.run` function with an `inputs` arguments.\n",
"\n",
"For now, you must assign values to each parameter of your circuit before submitting it to Braket as demonstrated in the next cell:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"parametric_circuit = Circuit().pulse_gate(qubit, U_sequence)\n",
"task = device.run(parametric_circuit(theta=math.pi / 2, phi=0, lambda_=0))\n",
"\n",
"counts = task.result().measurement_counts\n",
"plt.bar(sorted(counts), [counts[k] / nb_shots for k in sorted(counts)])\n",
"plt.xlabel(\"State\")\n",
"plt.ylabel(\"Population\")\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
Expand Down

0 comments on commit 356ca76

Please sign in to comment.