Skip to content

Commit

Permalink
cirq_pasqal getting_started.ipynb - enforce single operation per mome…
Browse files Browse the repository at this point in the history
…nt (#6656)

This is a workaround to allow execution of getting_started.ipynb
notebook as a part of documentation build.

Here we manually convert optimized circuit to have 1 operation per moment
so it passes validation w/r to the PasqalVirtualDevice.

Related to #6655
  • Loading branch information
pavoljuhas authored Jun 28, 2024
1 parent 9c836ba commit ac63c60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/hardware/pasqal/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,15 @@
"pasqal_gateset=cirq_pasqal.PasqalGateset(include_additional_controlled_ops=False)\n",
"pasqal_circuit = cirq.optimize_for_target_gateset(initial_circuit,\n",
" gateset=pasqal_gateset)\n",
"\n",
"# TODO(https://github.com/quantumlib/Cirq/issues/6655) - remove after fixup\n",
"pasqal_circuit = cirq.Circuit(pasqal_circuit.all_operations(),\n",
" strategy=cirq.InsertStrategy.NEW)\n",
"\n",
"print(pasqal_circuit)\n",
"\n",
"# Now the circuit validates correctly!\n",
"p_device.validate_circuit(pasqal_circuit)\n"
"p_device.validate_circuit(pasqal_circuit)"
]
},
{
Expand Down

0 comments on commit ac63c60

Please sign in to comment.