-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Qulacs-Osaka/nb-test
nanobind
- Loading branch information
Showing
23 changed files
with
1,837 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,4 @@ | |
/.vscode | ||
/bin | ||
/build | ||
/typings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from qulacs2023 import * | ||
|
||
def main(): | ||
a = PauliOperator([0, 60, 2], [2, 3, 1]) | ||
print(a.get_XZ_mask_representation()) | ||
|
||
initialize(InitializationSettings().set_num_threads(8)) | ||
main() | ||
finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
[build-system] | ||
requires = ["wheel", "setuptools", "setuptools_scm[toml]"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.2"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
dynamic = ["version"] | ||
name = "qulacs2023" | ||
version = "1.0.0" | ||
description = "Quantum circuit simulator for research" | ||
authors = [ | ||
{ name = "Qulacs-Osaka", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = { file = "LICENSE" } | ||
dependencies = [] | ||
dependencies = [ | ||
"scikit_build", | ||
"nanobind" | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Console", | ||
|
@@ -24,11 +28,12 @@ classifiers = [ | |
"Topic :: Communications :: Email" | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "qulacs._version.__version__"} | ||
|
||
[tool.setuptools_scm] | ||
write_to = "pysrc/qulacs/_version.py" | ||
[tool.scikit-build] | ||
minimum-version = "0.4" | ||
# Setuptools-style build caching in a local directory | ||
build-dir = "build/{wheel_tag}" | ||
# Build stable ABI wheels for CPython 3.12+ | ||
wheel.py-api = "cp312" | ||
|
||
[project.urls] | ||
homepage = "http://www.qulacs.org" | ||
|
@@ -37,19 +42,24 @@ homepage = "http://www.qulacs.org" | |
dev = [ | ||
"black", | ||
"flake8", | ||
"openfermion", | ||
"isort", | ||
"mypy", | ||
"pybind11-stubgen" | ||
"nanobind", | ||
"nanobind-stubgen", | ||
"openfermion" | ||
] | ||
|
||
test = [ | ||
"openfermion" | ||
] | ||
|
||
ci = [ | ||
"openfermion", | ||
"black", | ||
"flake8", | ||
"isort", | ||
"mypy", | ||
"pybind11-stubgen" | ||
"nanobind-stubgen", | ||
"openfermion" | ||
] | ||
|
||
doc = [ | ||
|
@@ -63,7 +73,3 @@ doc = [ | |
"ipykernel == 6.17.*", | ||
"sphinx-autoapi == 2.0.*" | ||
] | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
zip-safe = false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
|
||
pybind11_add_module(qulacs_core SHARED EXCLUDE_FROM_ALL binding.cpp) | ||
target_link_libraries(qulacs_core PRIVATE Kokkos::kokkos) | ||
target_link_libraries(qulacs_core PUBLIC qulacs) | ||
|
||
message(STATUS "Building library for python...") | ||
|
||
nanobind_add_module(qulacs_core STABLE_ABI binding.cpp) | ||
target_link_libraries(qulacs_core PRIVATE qulacs Kokkos::kokkos) | ||
target_include_directories(qulacs_core PRIVATE ${PROJECT_SOURCE_DIR}/qulacs) | ||
install(TARGETS qulacs_core LIBRARY DESTINATION qulacs2023) |
Oops, something went wrong.