bloqade.qasm3.loadfile
← Module overview
function
source
functionloadfile¶source
bloqade.qasm3.loadfile
Signature
def loadfile(qasm_file: str | pathlib.Path, *, kernel_name: str | None = 'main', dialects: ir.DialectGroup | None = None, file: str | None = None, lineno_offset: int = 0, col_offset: int = 0, compactify: bool = True) -> ir.MethodLoad an OpenQASM 3.0 file and return an ir.Method. See also loads.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
qasm_file | str | pathlib.Path | required | Path to the OpenQASM 3.0 file. |
kernel_name | str | None | 'main' | |
dialects | ir.DialectGroup | None | None | |
file | str | None | None | |
lineno_offset | int | 0 | |
col_offset | int | 0 | |
compactify | bool | True |
Other Parameters
| Name | Type | Description |
|---|---|---|
kernel_name | str | None | The name of the kernel. Defaults to "main". |
dialects | ir.DialectGroup | None | The dialect group to use. Defaults to `qasm3.main`. |
file | str | None | The file name for error reporting. Defaults to None. |
lineno_offset | int | The line number offset for error reporting. Defaults to 0. |
col_offset | int | The column number offset for error reporting. Defaults to 0. |
compactify | bool | Whether to compactify the output. Defaults to True. |
Returns
ir.Method