Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
069c3e3
Update issue templates
Doomsk May 13, 2025
ff4d0b7
Dev/python to main (#36)
Doomsk May 13, 2025
17371f4
Docs updated from `main` branch (#37)
Doomsk May 13, 2025
a9cfb19
Update issue templates
Doomsk May 16, 2025
88c4bab
Add more docs pages and pre-commit (#42)
Doomsk May 19, 2025
907d9ab
Small docs addition (#45)
Doomsk May 19, 2025
16293ca
Place pre-commit and CI/CD checks (#51)
Doomsk May 30, 2025
8e0a483
[IMPL] @not instruction for OpenQASM v2.0 #38 (#50)
martin-klacan May 30, 2025
b73e3f5
Add cli with typer for toolchain.project for Issue #39 (#56)
Hazarre Jun 1, 2025
3aa943d
Add Heather AST parsing visitor (#60)
Doomsk Jun 8, 2025
0552971
small fix
Doomsk Jun 13, 2025
66e8cef
import types from the `src/hat_types/` directory (#59)
q-inho Jun 15, 2025
c233454
Add `@nez` instruction for `OpenQASMv2.0` (#58)
q-inho Jun 16, 2025
1a23ff9
add new idea for IR structure and logic
Doomsk Jun 22, 2025
a6662b5
add new parsing to IR
Doomsk Jun 23, 2025
8a81743
Merge branch 'main' into dev/python_impl/ir_parsing
Doomsk Jun 23, 2025
d1af3b0
improve ir, types
Doomsk Jun 27, 2025
af62d25
add new IR to test parsing feasibility
Doomsk Jul 6, 2025
bc1b98a
Add author in pyproject.toml (#65)
q-inho Jul 8, 2025
5d05603
improve code around new IR logic
Doomsk Jul 9, 2025
7b25d67
introduce abstract interpreter class to hold H-hat dialects-specific …
Doomsk Jul 9, 2025
f568943
implement big changes on type importer
Doomsk Jul 14, 2025
5d94d78
(wip) implement IR graph
Doomsk Jul 24, 2025
83e56e9
(wip) implement IR graph
Doomsk Aug 7, 2025
6aac37f
handling IR to build IRGraph, insert and retrieve IR modules, types a…
Doomsk Aug 8, 2025
cc7a0cc
implement IR graph structure, logic and constructors
Doomsk Aug 12, 2025
d16323b
implement IR graph
Doomsk Aug 16, 2025
4849951
Update issue templates
Doomsk Aug 21, 2025
a436301
(wip) big cleanup, big refactor
Doomsk Aug 24, 2025
65fb4e5
(wip) fix mypy
Doomsk Aug 24, 2025
d247523
fix mypy
Doomsk Aug 25, 2025
6d6eb00
fix file creation during pytest
Doomsk Aug 25, 2025
7093442
fix folders handling on pytest
Doomsk Aug 25, 2025
8208e3d
Merge branch 'main' into dev/python_impl/ir_parsing
Doomsk Sep 4, 2025
9a794f9
(wip) functions definitions
Doomsk Sep 9, 2025
78f04e6
add basic built-in functions for int and float types: print, add, sub…
Doomsk Sep 11, 2025
28e4e17
save diagram
Doomsk Sep 25, 2025
64429c1
Merge branch 'dev/python' into dev/python_impl/ir_parsing
Doomsk Sep 25, 2025
995040a
add dev/python branch to workflow checks
Doomsk Sep 25, 2025
fb002cf
fix ci to include dev/python and dev/rust
Doomsk Sep 25, 2025
327cfcf
delete old tests
Doomsk Sep 25, 2025
d50c456
fix ci workflow
Doomsk Sep 25, 2025
bcd9a28
fix mypy
Doomsk Sep 25, 2025
f824ea3
Merge branch 'dev/python_impl/ir_parsing' into dev/python_impl/builti…
Doomsk Sep 26, 2025
b83b28b
(wip) add cast functionality --protocols, workflow
Doomsk Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## Bug description

**Describe the bug**: a clear and concise description of what the bug is.

## Steps to reproduce it

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Implementation
about: Use this template for issues related to the documentation TODOs page.
title: "[IMPL] "
labels: implementation
assignees: ''

---

## Implementation description

## Expected behavior


## Tests
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/roadmap-item.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Roadmap item
about: Describe this issue template's purpose here.
title: "[ROADMAP]"
labels: roadmap
assignees: ''

---

## Item Goals

## Dependency

## Description
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ci_gh-pages
on:
push:
branches:
- dev/python_impl/minimal_lang
- main
permissions:
contents: write
jobs:
Expand All @@ -25,4 +25,4 @@ jobs:
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocstrings markdown-exec
- run: mkdocs gh-deploy --force
- run: mkdocs gh-deploy --force
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
pull_request:
branches: [main, dev/python]
push:
branches: [main, dev/python]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Run pre-commit
working-directory: python
run: |
pip install pre-commit
pre-commit run --all-files
30 changes: 30 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: pytest

on:
push:
branches: [main, dev/python]
pull_request:
branches: [main, dev/python]

jobs:
build:
name: Run pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: python
run: |
pip install ".[all,dev]"
- name: Run tests
working-directory: python
run: |
pytest .
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ MIT

Please read this documentation before to understand how the repository is organized and how the language structure works.

You can check the [TODOs.md](TODOs.md) page to see what is listed to be done. There (probably) are issues in the [H-hat issue's page](https://github.com/hhat-lang/hhat_lang/issues) that you may want to check and try to solve/implement as well.
You can check the [TODOs.md](TODOs.md) page to see what is listed to be done. There (probably) are issues in the [H-hat issue's page](https://github.com/hhat-lang/hhat_lang/issues) that you may want to check and try to solve/implement as well.


At last, reach us out at the [Discord](http://discord.unitary.foundation)'s `#h-hat` channel to
Expand All @@ -110,4 +110,4 @@ learn more on how to contribute and chat, if you feel like doing so.
## Code of Conduct

We coexist in the same world. So be nice to others as you expect others to be nice to you :)
the same world. So be nice to others as you expect others to be nice to you :)
the same world. So be nice to others as you expect others to be nice to you :)
1,554 changes: 1,554 additions & 0 deletions definitions/IR_diagrams.drawio

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docs.hhat-lang.org
docs.hhat-lang.org
2 changes: 1 addition & 1 deletion docs/TODOs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TODOs

Here sits an updated list of things to implement/write. Feel free to check them out and [place an issue](https://github.com/hhat-lang/hhat_lang/issues) or discuss them at the [Discord](http://discord.unitary.foundation)'s `#h-hat` channel.
Here sits an updated list of things to implement/write. Feel free to check them out and [place an issue](https://github.com/hhat-lang/hhat_lang/issues) or discuss them at the [Discord `#h-hat` channel](https://discord.gg/J8udsUNRnk).

## H-hat core modules

Expand Down
11 changes: 11 additions & 0 deletions docs/core/builtin_instr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

!!! info

Built-in instructions are continuously being added. Check this page from time to time.


The core instructions are divided between classical and quantum, as follows:

- [Classical](classical_instr.md)

- [Quantum](quantum_instr.md)
86 changes: 86 additions & 0 deletions docs/core/classical_instr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Classical Instructions

Below you can find a list of existing (:white_check_mark:), under implementation (:construction:), or on TODO (:memo:) list functions/instructions.


## 1. `null` type

### `print`

- Status: :memo:
- Syntax: `print(msg:?T)`
- Description: print `msg` (generic) argument as text on the terminal
- Returns: nothing


## 2. `bool` type

### `not`

- Status: :memo:
- Syntax: `not(data:bool)`
- Description: negates `data` (`bool`) argument binary data
- Returns: the same type as `data` argument


### `eq`

- Status: :memo:
- Syntax: `eq(a:?T b:?T)`
- Description: compares `a` (generic) argument with `b` (generic) argument; both must be of the same type
- Returns: a boolean literal (`true`, `false`) from the comparison


### `le`

- Status: :memo:
- Syntax: `le(a:?T b:?T)`
- Description: checks if `a` (generic) argument is less or equal than `b` (generic) argument; both must be of the same type
- Returns: a boolean literal from the comparison


### `lt`

- Status: :memo:
- Syntax: `lt(a:?T b:?T)`
- Description: checks if `a` (generic) argument is less than `b` (generic) argument; both must be of the same type
- Returns: a boolean literal from the comparison


### `ge`

- Status: :memo:
- Syntax: `ge(a:?T b:?T)`
- Description: checks if `a` (generic) argument is greater or equal than `b` (generic) argument; both must be of the same type
- Returns: a boolean literal from the comparison


### `gt`

- Status: :memo:
- Syntax: `gt(a:?T b:?T)`
- Description: checks if `a` (generic) argument is greater than `b` (generic) argument; both must be of the same type
- Returns: a boolean literal from the comparison


## 3. `u16` type


## 4. `u32` type

### `add`

- Status: :memo:
- Syntax: `add(a:u32 b:u32)`
- Description: performs an addition operation on `a` (`u32`) and `b` (`u32`) arguments
- Returns: a `u32` type from the operation


## 5. `u64` type

### `add`

- Status: :memo:
- Syntax: `add(a:u64 b:u64)`
- Description: performs an addition operation on `a` (`u64`) and `b` (`u64`) arguments
- Returns: a `u64` type from the operation
59 changes: 58 additions & 1 deletion docs/core/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
# Core Features

In progress. This section is part of a TODO list.

## Core implementation

Some core features provide wide range of possibilities for the dialect implementation.


### 1. Call with options

It has the structure:

```
id (
option1: body
option2: body
...
)
```

It can be used to define an identifier `id` to hold some transformation through the options that are functions call (and not identifiers, as usually in function calls with arguments) with values being the body that is executed for that particular option.

Example: [`if` statement](../dialects/heather/current_syntax.md#8-conditional-statements-if).


### 2. Call with body

It has the structure:

```
id (args) { body }
```


### 3. Call with body options

It has the structure:

```
id (arg) {
option1: body
option2: body
...
}
```

Example: [pattern matching `match`](../dialects/heather/current_syntax.md#9-pattern-matching-match).


### 4. Modifier

It has the structure:

```
id<keyword>
id<property=value>
id<keyword property=value ...>
```

Example: []
Loading
Loading