Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/notebooks/test_mcx.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def test_notebook(tb: TestbookNotebookClient) -> None:
)
validate_quantum_program_size(
tb.ref_pydantic("qprog_4"),
expected_width=80, # actual width: 69
expected_depth=1700, # actual depth: 494 ; also was 920; also was 1550
expected_width=90, # actual width: 75
expected_depth=200, # actual depth: 80
)

# test notebook content
Expand Down
19 changes: 9 additions & 10 deletions tutorials/basic_tutorials/mcx/mcx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Quantum program link: https://platform.classiq.io/circuit/31s7JrRZWYNAeLtLEUrHCxXO4YG\n"
"Quantum program link: https://platform.classiq.io/circuit/37tMs9Yhgj9Pm4fwVmLh1Jxp46E\n"
]
}
],
Expand Down Expand Up @@ -161,8 +161,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Synthesized MCX depth is 271\n",
"Quantum program link: https://platform.classiq.io/circuit/31s7KotFMIZjxx3juBOv79YSLsT\n"
"Synthesized MCX depth is 239\n",
"Quantum program link: https://platform.classiq.io/circuit/37tMslkNlfM2VnGuz4HydLQoBu3\n"
]
}
],
Expand All @@ -173,7 +173,7 @@
" max_width=MAX_WIDTH_2, optimization_parameter=OptimizationParameter.DEPTH\n",
")\n",
"preferences_2 = Preferences(\n",
" backend_service_provider=\"IBM Quantum\", backend_name=\"ibm_brisbane\"\n",
" backend_service_provider=\"IBM Quantum\", backend_name=\"ibm_boston\"\n",
")\n",
"\n",
"\n",
Expand All @@ -200,8 +200,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Synthesized MCX cx-count is 168\n",
"Quantum program link: https://platform.classiq.io/circuit/31s7M6am6IJ7wZmDVRu37xNFyZt\n"
"Synthesized MCX cx-count is 156\n",
"Quantum program link: https://platform.classiq.io/circuit/37tMtbAcVYs38SdWEox00DnEVvC\n"
]
}
],
Expand All @@ -214,7 +214,6 @@
")\n",
"\n",
"qprog_3 = synthesize(main, constraints=constraints_3, preferences=preferences_3)\n",
"write_qmod(main, \"mcx_14_ctrl_cx\")\n",
"print(f\"Synthesized MCX cx-count is {qprog_3.transpiled_circuit.count_ops['cx']}\")\n",
"show(qprog_3)"
]
Expand All @@ -231,15 +230,15 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "17",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Quantum program link: https://platform.classiq.io/circuit/31s7uF4G5NptT3aWBiBdWKmRGHj\n"
"Quantum program link: https://platform.classiq.io/circuit/37tNCjf0PYRVDNj0F1ASEyVxWqx\n"
]
}
],
Expand All @@ -251,7 +250,7 @@
" my_mcx(cntrl, target)\n",
"\n",
"\n",
"constraints_4 = Constraints(max_depth=1000)\n",
"constraints_4 = Constraints(optimization_parameter=\"depth\")\n",
"preferences_4 = Preferences(optimization_level=0)\n",
"qprog_4 = synthesize(main, constraints=constraints_4, preferences=preferences_4)\n",
"show(qprog_4)"
Expand Down
11 changes: 0 additions & 11 deletions tutorials/basic_tutorials/mcx/mcx_14_ctrl_cx.qmod

This file was deleted.

This file was deleted.