Skip to content

Commit

Permalink
Merge pull request #1 from MazenAli/feat/lagrange2D
Browse files Browse the repository at this point in the history
Lagrange2D QFE
  • Loading branch information
MazenAli authored Jul 20, 2024
2 parents 0961160 + 370fd50 commit 1e80727
Show file tree
Hide file tree
Showing 50 changed files with 4,769 additions and 5,956 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 100
ignore =
E203,
W503,
E402
1 change: 1 addition & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git secrets --add 'PRIVATE KEY'
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Jupyter notebooks for language statistics
*.ipynb linguist-documentation=true

# Set the primary language to Python
*.py linguist-language=Python
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- name: Set up Poetry virtual environment
run: |
poetry config virtualenvs.in-project true
poetry install --no-root
poetry install --with dev,test,docs
- name: Run Makefile tasks
run: |
make all
poetry run make all
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ ipython_config.py
*.npy
*.npz
*.pkl

# Other
.DS_Store
24 changes: 0 additions & 24 deletions .gitlab-ci.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .pre-commit-config.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2024-07-20

### Added

- Add Linear2DBasisQFE

### Chore

- Move type aliases to a separate module
- Update Makefile
- Add github workflows

## [0.7.0] - 2024-02-06

### Added
Expand Down
38 changes: 29 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
# Minimal makefile for Sphinx documentation
# Minimal makefile for Sphinx documentation and project maintenance tasks
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = docs
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
default: all

all: docs-html format format_check static test_coverage secrets_check

help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
docs-%:
@$(SPHINXBUILD) -M $* "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

format:
black --line-length 100 qulearn tests
isort --multi-line 3 --trailing-comma --force-grid-wrap 0 --use-parentheses --line-width 100 qulearn tests

format_check:
black --line-length 100 --check qulearn tests
isort --multi-line 3 --trailing-comma --force-grid-wrap 0 --use-parentheses --line-width 100 qulearn tests --check-only

static:
flake8 qulearn tests
mypy qulearn tests --ignore-missing-imports --no-strict-optional

test:
pytest tests/

test_coverage:
coverage run --source=qulearn --module pytest -v tests/ && coverage report -m

secrets_check:
@git secrets --scan -r

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help docs-% format format_check static test test_coverage secrets_check
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# QuLearn

Welcome to QuLearn, a Python package designed to simplify the development and application of quantum and classical machine learning models. It includes a collection of QML applications from Fraunhofer ITWM.
Welcome to QuLearn, a Python package designed to simplify the development and application of quantum and classical machine learning models.
This project remained a hobby and is not actively developed anymore.
It is very difficult to get people to build something they don't have to...

## About

QuLearn is built on top of [PyTorch](https://pytorch.org/) and [PennyLane](https://pennylane.ai/), two well-established libraries in the realms of machine learning and quantum computing. Our goal is to streamline the process of setting up, training, and testing machine learning models, be they classical, quantum, or a mix of both.

QuLearn is suitable for various research applications and aims to democratize access to the exciting field of quantum machine learning. It serves as a platform for researchers, developers, and enthusiasts to implement, experiment, and contribute to this rapidly evolving field.

QuLearn also houses QML applications from Fraunhofer ITWM.

## Getting Started

### Installation

(Installation instructions will be added soon.)
Package is not available on PyPI.
It can be installed from source via pip, works most of the time.

### Basic Usage

Expand Down
6 changes: 6 additions & 0 deletions ToDo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- add input checking
- qlayer: remove item() calls for compatibility
- qlayer: handle 2D case where x or y are out of bounds
- qlayer: too much boiler plate code, reuse mps module
- pennylane non-default devices with lightning qubits, adjoint differentation and Hamiltonians
are bugged, the observable weights are not differentiated
Empty file removed ToDoNotes.txt
Empty file.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = "QuLearn"
copyright = "2023, Mazen Ali"
author = "Mazen Ali"
release = "0.1.0"
release = "0.8.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -24,4 +24,4 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]
html_static_path = []
Loading

0 comments on commit 1e80727

Please sign in to comment.