|View source on GitHub|
Representation of a circuit in QASM (quantum assembly) format.
cirq.QasmOutput( operations: 'cirq.OP_TREE', qubits: Tuple['cirq.Qid', ...], header: str = '', precision: int = 10, version: str = '2.0' ) -> None
Please note that the QASM importer is in an experimental state and currently only supports a subset of the full OpenQASM spec. Amongst others, classical control, arbitrary gate definitions, and even some of the gates that don't have a one-to-one representation in Cirq, are not yet supported.
QASM output can be saved to a file using the save method.
is_valid_qasm_id( id_str: str ) -> bool
Test if id_str is a valid id in QASM grammar.
save( path: Union[str, bytes, int] ) -> None
Write QASM output to a file specified by path.