Skip to content

Commit

Permalink
Update DropNegligible to cirq.drop_negligible_operations (#799)
Browse files Browse the repository at this point in the history
- This changed in Cirq 1.0.
  • Loading branch information
dstrain115 committed Sep 8, 2022
1 parent 8e5e685 commit deac822
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/tutorials/circuits_2_diagonal_coulomb_trotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
" strategy=cirq.InsertStrategy.EARLIEST)\n",
"\n",
"# Print circuit.\n",
"cirq.DropNegligible().optimize_circuit(swap_network_trotter_step)\n",
"swap_network_trotter_step=cirq.drop_negligible_operations(swap_network_trotter_step)\n",
"print(swap_network_trotter_step.to_text_diagram(transpose=True))"
]
},
Expand All @@ -277,7 +277,7 @@
" qubits, hamiltonian, time, n_steps, order,\n",
" algorithm=trotter.SPLIT_OPERATOR),\n",
" strategy=cirq.InsertStrategy.EARLIEST)\n",
"cirq.DropNegligible().optimize_circuit(split_operator_trotter_step)\n",
"split_operator_trotter_step=cirq.drop_negligible_operations(split_operator_trotter_step)\n",
"print(split_operator_trotter_step.to_text_diagram(transpose=True))"
]
},
Expand Down Expand Up @@ -352,7 +352,7 @@
" qubits, hamiltonian, time, n_steps, order,\n",
" algorithm=trotter.LINEAR_SWAP_NETWORK),\n",
" strategy=cirq.InsertStrategy.EARLIEST)\n",
"cirq.DropNegligible().optimize_circuit(swap_network_trotter_step)\n",
"swap_network_trotter_step=cirq.drop_negligible_operations(swap_network_trotter_step)\n",
"print(swap_network_trotter_step.to_text_diagram(transpose=True))"
]
},
Expand All @@ -379,7 +379,7 @@
" algorithm=trotter.LINEAR_SWAP_NETWORK,\n",
" omit_final_swaps=True),\n",
" strategy=cirq.InsertStrategy.EARLIEST)\n",
"cirq.DropNegligible().optimize_circuit(swap_network_trotter_step)\n",
"swap_network_trotter_step=cirq.drop_negligible_operations(swap_network_trotter_step)\n",
"print(swap_network_trotter_step.to_text_diagram(transpose=True))"
]
},
Expand Down Expand Up @@ -407,7 +407,7 @@
" qubits, hamiltonian, time, n_steps, order,\n",
" algorithm=trotter.LINEAR_SWAP_NETWORK),\n",
" strategy=cirq.InsertStrategy.EARLIEST)\n",
"cirq.DropNegligible().optimize_circuit(swap_network_trotter_step)\n",
"swap_network_trotter_step = cirq.drop_negligible_operations(swap_network_trotter_step)\n",
"print(swap_network_trotter_step.to_text_diagram(transpose=True))"
]
},
Expand Down Expand Up @@ -469,7 +469,7 @@
" controlled_unitary))\n",
"\n",
"# Print the circuit.\n",
"cirq.DropNegligible().optimize_circuit(circuit)\n",
"circuit=cirq.drop_negligible_operations(circuit)\n",
"print(circuit.to_text_diagram(transpose=True))"
]
}
Expand Down

0 comments on commit deac822

Please sign in to comment.