qiskit-documentation/docs/api/qiskit/0.25/qiskit.qasm.Qasm.mdx

50 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Qasm
description: API reference for qiskit.qasm.Qasm
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.qasm.Qasm
---
# qiskit.qasm.Qasm
<Class id="qiskit.qasm.Qasm" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/qasm/qasm.py" signature="Qasm(filename=None, data=None)" modifiers="class">
OPENQASM circuit object.
Create an OPENQASM circuit object.
### \_\_init\_\_
<Function id="qiskit.qasm.Qasm.__init__" signature="__init__(filename=None, data=None)">
Create an OPENQASM circuit object.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------- | ---------------------------------- |
| [`__init__`](#qiskit.qasm.Qasm.__init__ "qiskit.qasm.Qasm.__init__")(\[filename, data]) | Create an OPENQASM circuit object. |
| [`generate_tokens`](#qiskit.qasm.Qasm.generate_tokens "qiskit.qasm.Qasm.generate_tokens")() | Returns a generator of the tokens. |
| [`parse`](#qiskit.qasm.Qasm.parse "qiskit.qasm.Qasm.parse")() | Parse the data. |
| [`return_filename`](#qiskit.qasm.Qasm.return_filename "qiskit.qasm.Qasm.return_filename")() | Return the filename. |
### generate\_tokens
<Function id="qiskit.qasm.Qasm.generate_tokens" signature="generate_tokens()">
Returns a generator of the tokens.
</Function>
### parse
<Function id="qiskit.qasm.Qasm.parse" signature="parse()">
Parse the data.
</Function>
### return\_filename
<Function id="qiskit.qasm.Qasm.return_filename" signature="return_filename()">
Return the filename.
</Function>
</Class>