CQCL / pytket-docs

User manual and example notebooks for the pytket quantum computing toolkit
https://tket.quantinuum.com/user-guide/
Apache License 2.0
328 stars 92 forks source link

Use `Circuit.add_gate` in manual and example notebooks #328

Closed CalMacCQ closed 4 months ago

CalMacCQ commented 4 months ago

Description

Using Circuit.add_gate in preference to Circuit.add_circbox, Circuit.add_pauliexpbox etc.

Circuit.add_gate works for just about all OpTypes so I'd recommend using this vs add_circbox, add_statepreparation_box etc.

Also removed some uncecessary uses of Circuit.add_gate using say Circuit.YYPhase instead.

~There is a manual build failure related to graphviz which I think is unrelated to changes made in this PR~. Seems this is okay now?

REDO of #313

Related issues

Please mention any github issues addressed by this PR.

Checklist