Skip to content

Commit

Permalink
Version 1.10.1 (#9)
Browse files Browse the repository at this point in the history
 - ✨/🐛 now natively supports ancillary registers and c3x/c4x gates in Qiskit QuantumCircuit objects
 - ⚡ actually enables -march=native -mtune=native for source builds via pip
 - ⚡ tunes the setup.py script to run on as many threads as available
 - 🚀 adds capability to build Python 3.10 wheels
 - 📝 updates documentation
 - 📌 increases the version number to 1.10.1
  • Loading branch information
burgholzer authored Oct 21, 2021
1 parent fde8944 commit fe9d469
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:

env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD: cp3?-*
CIBW_BUILD: cp3*
CIBW_ENVIRONMENT: "DEPLOY=ON"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.15 DEPLOY=ON"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_TEST_SKIP: "*_arm64"
CIBW_SKIP: "*-win32 *-manylinux_i686"
Expand All @@ -34,7 +36,7 @@ jobs:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.1
uses: pypa/cibuildwheel@v2.1.3
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14...3.21)

project(qcec
LANGUAGES CXX
VERSION 1.10.0
VERSION 1.10.1
DESCRIPTION "QCEC - A JKQ tool for Quantum Circuit Equivalence Checking"
)

Expand All @@ -16,13 +16,18 @@ option(COVERAGE "Configure for coverage report generation")
option(GENERATE_POSITION_INDEPENDENT_CODE "Generate position independent code")
option(BUILD_QCEC_TESTS "Also build tests for QMAP project")

if (DEFINED ENV{DEPLOY})
set(DEPLOY $ENV{DEPLOY} CACHE BOOL "Use deployment configuration from environment" FORCE)
message(STATUS "Setting deployment configuration to '${DEPLOY}' from environment")
endif ()

# build type settings
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
endif ()

macro(check_submodule_present MODULENAME)
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/${MODULENAME}/CMakeLists.txt")
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ If you have any questions, feel free to contact us via [iic-quantum@jku.at](mail
## Usage

JKQ QCEC is mainly developed as a C++ library with an easy-to-use Python interface.
- Get the Python package
- In order to make the library as easy to use as possible (without compilation), we provide pre-built wheels for most common platforms (64-bit Linux, MacOS, Windows). These can be installed using
```bash
pip install jkq.qcec
```
In order to make the library as easy to use as possible (without compilation), we provide wheels for most common platforms (64-bit Linux, MacOS, Windows). However, in order to get the best performance out of QCEC, it is recommended to
build it locally from the source distribution via
However, in order to get the best performance out of QCEC, it is recommended to build it locally from the source distribution (see [system requirements](#system-requirements)) via
```bash
pip install --no-binary jkq.qcec
```
This enables platform specific compiler optimizations that cannot be enabled on portable wheels.
- Start using it in Python:
- Once installed, start using it in Python:
```python
from jkq.qcec import *
Expand Down Expand Up @@ -116,17 +115,22 @@ result = verify(qc, qc_comp, config)
```
### Command-line Executable
JKQ QCEC also provides a **standalone executable** with command-line interface called `qcec_app`.
It provides the same options as the Python module as flags (e.g., `--method <method>` for setting the method) and produces JSON formatted output.
For a full list of options, call `qcec_app --help`.
JKQ QCEC also provides a **standalone executable** with command-line interface called `qcec_app`. It provides the same options as the Python module as flags (e.g., `--method <method>` for setting the method) and produces JSON formatted
output. For a full list of options, call `qcec_app --help`.
### System requirements
Building (and running) is continuously tested under Linux, MacOS, and Windows using the [latest available system versions for GitHub Actions](https://github.com/actions/virtual-environments).
However, the implementation should be compatible with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14.
Building (and running) is continuously tested under Linux, MacOS, and Windows using the [latest available system versions for GitHub Actions](https://github.com/actions/virtual-environments). However, the implementation should be compatible
with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14.
*Disclaimer*: We noticed some issues when compiling with Microsoft's `MSCV` compiler toolchain. If you are developing under Windows, consider using the `clang` compiler toolchain. A detailed description of how to set this up can be
found [here](https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-160).
### Library Organisation
Internally the JKQ QCEC library works in the following way
- Import both input files into a `qc::QuantumComputation` object
```c++
std::string file1 = "<PATH_TO_FILE_1>";
Expand Down
2 changes: 1 addition & 1 deletion extern/qfr
Submodule qfr updated from 1d5e9a to cf7d86
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def build_extension(self, ext):

cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DPYTHON_EXECUTABLE=' + sys.executable,
'-DBINDINGS=ON',
'-DDEPLOY=ON']
'-DBINDINGS=ON']

cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]
Expand All @@ -47,7 +46,10 @@ def build_extension(self, ext):
build_args += ['--', '/m']
else:
cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
build_args += ['--', '-j2']
cpus = os.cpu_count()
if cpus is None:
cpus = 2
build_args += ['--', '-j{}'.format(cpus)]

env = os.environ.copy()
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),
Expand All @@ -65,7 +67,7 @@ def build_extension(self, ext):

setup(
name='jkq.qcec',
version='1.10.0',
version='1.10.1',
author='Lukas Burgholzer',
author_email='lukas.burgholzer@jku.at',
description='QCEC - A JKQ tool for Quantum Circuit Equivalence Checking',
Expand Down

0 comments on commit fe9d469

Please sign in to comment.