Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📄 add license headers #770

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ format:
line_width: 100
keyword_case: "upper"
autosort: true

markup:
first_comment_is_literal: true
31 changes: 31 additions & 0 deletions .license-tools-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"author": {
"name": "Chair for Design Automation, TUM"
},
"force_author": true,
"license": "MIT",
"title": false,
"include": ["**/*"],
"style_override_for_suffix": {
".pyi": "DOCSTRING_STYLE",
".in": "POUND_STYLE"
},
"exclude": [
"^\\.[^/]+",
"/\\.[^/]+",
".*\\.qasm",
".*\\.md",
".*\\.bib",
".*\\.css",
".*\\.json",
".*\\.html",
".*\\.tfc",
".*\\.qc",
".*\\.real",
".*\\.toml",
".*\\.yaml",
"uv\\.lock",
"py\\.typed",
".*build.*"
]
}
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ repos:
- id: blacken-docs
additional_dependencies: [black==24.*]

# Check for license headers
- repo: https://github.com/emzeat/mz-lictools
rev: v2.7.0
hooks:
- id: license-tools

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# set required cmake version
cmake_minimum_required(VERSION 3.19...3.30)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Chair for Design Automation, Technical University of Munich
Copyright (c) 2024 Chair for Design Automation, TUM

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 7 additions & 0 deletions cmake/Cache.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

option(ENABLE_CACHE "Enable compiler cache if available" ON)
if(NOT ENABLE_CACHE)
return()
Expand Down
7 changes: 7 additions & 0 deletions cmake/CompilerOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# set common compiler options for projects
function(enable_project_options target_name)
include(CheckCXXCompilerFlag)
Expand Down
7 changes: 7 additions & 0 deletions cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# enable extensive compiler warnings from here:
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
function(set_project_warnings target_name)
Expand Down
7 changes: 7 additions & 0 deletions cmake/ExternalDependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# Declare all external dependencies and make sure that they are available.

include(FetchContent)
Expand Down
7 changes: 7 additions & 0 deletions cmake/FindGMP.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# File adapted from
# https://github.com/dune-project/dune-common/blob/master/cmake/modules/FindGMP.cmake

Expand Down
7 changes: 7 additions & 0 deletions cmake/GetVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# A cmake script to determine the project version either
#
# * from the `SKBUILD_PROJECT_VERSION` variable (if available) or
Expand Down
7 changes: 7 additions & 0 deletions cmake/PackageAddTest.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# macro to add a test executable for one of the project libraries
macro(PACKAGE_ADD_TEST testname linklibs)
if(NOT TARGET ${testname})
Expand Down
7 changes: 7 additions & 0 deletions cmake/PreventInSourceBuilds.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# This function will prevent in-source builds
function(assure_out_of_source_builds)
# make sure the user doesn't play dirty with symlinks
Expand Down
7 changes: 7 additions & 0 deletions cmake/Sanitizers.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# enable support for all kinds of sanitizers
function(enable_sanitizers target_name)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
Expand Down
7 changes: 7 additions & 0 deletions cmake/StandardProjectSettings.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# enable organization of targets into folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Expand Down
7 changes: 7 additions & 0 deletions cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# Source: https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake

if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
Expand Down
7 changes: 7 additions & 0 deletions cmake/mqt-core-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# A CMake config file for the library, to be used by external projects

@PACKAGE_INIT@
Expand Down
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

"""Sphinx configuration file."""

from __future__ import annotations
Expand Down
7 changes: 7 additions & 0 deletions eval/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2024 Chair for Design Automation, TUM
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

add_executable(mqt-core-dd-eval eval_dd_package.cpp)
target_link_libraries(
mqt-core-dd-eval PRIVATE MQT::CoreDD MQT::CoreAlgorithms MQT::CoreCircuitOptimizer
Expand Down
9 changes: 9 additions & 0 deletions eval/eval_dd_package.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#include "algorithms/BernsteinVazirani.hpp"
#include "algorithms/Entanglement.hpp"
#include "algorithms/Grover.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/Definitions.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include <bitset>
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/BernsteinVazirani.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/Entanglement.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "ir/QuantumComputation.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/Grover.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/QFT.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "ir/QuantumComputation.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/QPE.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/RandomCliffordCircuit.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/algorithms/WState.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "Definitions.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/datastructures/DirectedAcyclicGraph.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include "DirectedGraph.hpp"
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/datastructures/DirectedGraph.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include <cstddef>
Expand Down
9 changes: 9 additions & 0 deletions include/mqt-core/datastructures/DisjointSet.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (c) 2024 Chair for Design Automation, TUM
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/

#pragma once

#include <algorithm>
Expand Down
Loading
Loading