Skip to content

Commit

Permalink
Add docstring for cirq.QasmOutput (#3934)
Browse files Browse the repository at this point in the history
Adds docstring for `cirq.QasmOutput` and fixes formatting.

Fixes #3658.
  • Loading branch information
unaiic committed Mar 22, 2021
1 parent b190b40 commit 7aff0dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cirq/circuits/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,8 +2004,8 @@ def insert_at_frontier(
"""Inserts operations inline at frontier.
Args:
operations: the operations to insert
start: the moment at which to start inserting the operations
operations: The operations to insert.
start: The moment at which to start inserting the operations.
frontier: frontier[q] is the earliest moment in which an operation
acting on qubit q can be placed.
"""
Expand Down
12 changes: 12 additions & 0 deletions cirq/circuits/qasm_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ def __init__(
precision: int = 10,
version: str = '2.0',
) -> None:
"""Representation of a circuit in QASM format.
Args:
operations: Tree of operations to insert.
qubits: The qubits used in the operations.
header: A multi-line string that is placed in a comment at the top
of the QASM.
precision: The number of digits after the decimal to show for
numbers in the QASM code.
version: The QASM version to target. Objects may return different
QASM depending on version.
"""
self.operations = tuple(ops.flatten_to_ops(operations))
self.qubits = qubits
self.header = header
Expand Down

0 comments on commit 7aff0dd

Please sign in to comment.