-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tidy up pytket.circuit
API docs
#1178
Changes from 35 commits
aa81203
b4d74de
c11c4ca
0104fe8
6a57997
2dcbb37
e146082
cd31ca4
66a0c5b
009d4af
68e5bc7
12cd295
f52971f
104e196
3357da1
d182291
134e6cd
00d9e7e
4c45c85
dad668e
4b31411
b5a5270
c6c46d1
78de3d4
e587ae1
f384377
5713962
3d992b7
abe76a4
7b0df5c
4796185
126a707
53206d3
62a2508
278e8b5
618c36d
a06c9b4
69382b3
f4e259a
9581168
fa99cb8
cb09c7b
36a4265
4bc5285
0a3520b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import inspect | ||
import re | ||
|
||
from pytket._tket.circuit import Circuit | ||
|
||
# paste contents of https://github.com/CQCL/tket/blob/7b0df5cf68503944cd34e593fb094ba5aa4357f4/pytket/docs/circuit_class.rst | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we want this comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed |
||
|
||
|
||
with open("circuit_class.rst", "r", encoding="utf-8") as file: | ||
rst = file.read() | ||
|
||
in_methods = {p[0] for p in inspect.getmembers(Circuit)} | ||
pattern = re.compile(r"(?:\bautomethod\b|\bautoproperty\b):: (\w+)\n") | ||
in_docs = set(pattern.findall(rst)) | ||
missing = in_methods - in_docs | ||
print([s for s in missing if not s.startswith("_")]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ pytket.circuit | |
================================== | ||
.. toctree:: | ||
:caption: Classes: | ||
:maxdepth: 2 | ||
:maxdepth: 1 | ||
CalMacCQ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
circuit_class.rst | ||
optype.rst | ||
|
@@ -14,104 +14,104 @@ pytket.circuit | |
|
||
.. automodule:: pytket._tket.circuit | ||
:members: fresh_symbol | ||
.. autoclass:: pytket._tket.circuit.Op | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think all of this _tket stuff is replaced in the docs build anyway. I don't think theres any good reason for it to be in the rst source |
||
.. autoclass:: pytket.circuit.Op | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.Command | ||
.. autoclass:: pytket.circuit.Command | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.BasisOrder | ||
.. autoclass:: pytket.circuit.BasisOrder | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.CircBox | ||
.. autoclass:: pytket.circuit.CircBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.Unitary1qBox | ||
.. autoclass:: pytket.circuit.Unitary1qBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.Unitary2qBox | ||
.. autoclass:: pytket.circuit.Unitary2qBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.Unitary3qBox | ||
.. autoclass:: pytket.circuit.Unitary3qBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ExpBox | ||
.. autoclass:: pytket.circuit.ExpBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.PauliExpBox | ||
.. autoclass:: pytket.circuit.PauliExpBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.PauliExpPairBox | ||
.. autoclass:: pytket.circuit.PauliExpPairBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ToffoliBox | ||
.. autoclass:: pytket.circuit.ToffoliBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.QControlBox | ||
.. autoclass:: pytket.circuit.QControlBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.CustomGateDef | ||
.. autoclass:: pytket.circuit.CustomGateDef | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.CustomGate | ||
.. autoclass:: pytket.circuit.CustomGate | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.Conditional | ||
.. autoclass:: pytket.circuit.Conditional | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ClassicalExpBox | ||
.. autoclass:: pytket.circuit.ClassicalExpBox | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.PhasePolyBox | ||
.. autoclass:: pytket.circuit.PhasePolyBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ProjectorAssertionBox | ||
.. autoclass:: pytket.circuit.ProjectorAssertionBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.StabiliserAssertionBox | ||
.. autoclass:: pytket.circuit.StabiliserAssertionBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.WASMOp | ||
.. autoclass:: pytket.circuit.WASMOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.MultiBitOp | ||
.. autoclass:: pytket.circuit.MultiBitOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.SetBitsOp | ||
.. autoclass:: pytket.circuit.SetBitsOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ClassicalEvalOp | ||
.. autoclass:: pytket.circuit.ClassicalEvalOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ClassicalOp | ||
.. autoclass:: pytket.circuit.ClassicalOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.CopyBitsOp | ||
.. autoclass:: pytket.circuit.CopyBitsOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.RangePredicateOp | ||
.. autoclass:: pytket.circuit.RangePredicateOp | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.MultiplexorBox | ||
.. autoclass:: pytket.circuit.MultiplexorBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.MultiplexedRotationBox | ||
.. autoclass:: pytket.circuit.MultiplexedRotationBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.MultiplexedU2Box | ||
.. autoclass:: pytket.circuit.MultiplexedU2Box | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.MultiplexedTensoredU2Box | ||
.. autoclass:: pytket.circuit.MultiplexedTensoredU2Box | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.StatePreparationBox | ||
.. autoclass:: pytket.circuit.StatePreparationBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.DiagonalBox | ||
.. autoclass:: pytket.circuit.DiagonalBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ConjugationBox | ||
.. autoclass:: pytket.circuit.ConjugationBox | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ResourceBounds | ||
.. autoclass:: pytket.circuit.ResourceBounds | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.ResourceData | ||
.. autoclass:: pytket.circuit.ResourceData | ||
:special-members: | ||
:members: | ||
.. autoclass:: pytket._tket.circuit.DummyBox | ||
.. autoclass:: pytket.circuit.DummyBox | ||
:special-members: | ||
:members: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put a couple of lines of commentary at the top of this file to explain what it does and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.