Skip to content

Commit fe9d469

Browse files
authored
Version 1.10.1 (#9)
- ✨/🐛 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
1 parent fde8944 commit fe9d469

File tree

5 files changed

+32
-19
lines changed

5 files changed

+32
-19
lines changed

Diff for: .github/workflows/deploy.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111

1212
env:
1313
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
14-
CIBW_BUILD: cp3?-*
14+
CIBW_BUILD: cp3*
15+
CIBW_ENVIRONMENT: "DEPLOY=ON"
16+
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.15 DEPLOY=ON"
1517
CIBW_ARCHS_MACOS: "x86_64 arm64"
1618
CIBW_TEST_SKIP: "*_arm64"
1719
CIBW_SKIP: "*-win32 *-manylinux_i686"
@@ -34,7 +36,7 @@ jobs:
3436
submodules: recursive
3537
- uses: ilammy/msvc-dev-cmd@v1
3638
- name: Build wheels
37-
uses: pypa/[email protected].1
39+
uses: pypa/[email protected].3
3840
- uses: actions/upload-artifact@v2
3941
with:
4042
path: ./wheelhouse/*.whl

Diff for: CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14...3.21)
22

33
project(qcec
44
LANGUAGES CXX
5-
VERSION 1.10.0
5+
VERSION 1.10.1
66
DESCRIPTION "QCEC - A JKQ tool for Quantum Circuit Equivalence Checking"
77
)
88

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

19+
if (DEFINED ENV{DEPLOY})
20+
set(DEPLOY $ENV{DEPLOY} CACHE BOOL "Use deployment configuration from environment" FORCE)
21+
message(STATUS "Setting deployment configuration to '${DEPLOY}' from environment")
22+
endif ()
23+
1924
# build type settings
2025
set(default_build_type "Release")
21-
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
26+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
2227
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
2328
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
2429
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
25-
endif()
30+
endif ()
2631

2732
macro(check_submodule_present MODULENAME)
2833
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/${MODULENAME}/CMakeLists.txt")

Diff for: README.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,16 @@ If you have any questions, feel free to contact us via [[email protected]](mail
4343
## Usage
4444

4545
JKQ QCEC is mainly developed as a C++ library with an easy-to-use Python interface.
46-
- Get the Python package
46+
- 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
4747
```bash
4848
pip install jkq.qcec
4949
```
50-
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
51-
build it locally from the source distribution via
50+
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
5251
```bash
5352
pip install --no-binary jkq.qcec
5453
```
5554
This enables platform specific compiler optimizations that cannot be enabled on portable wheels.
56-
- Start using it in Python:
55+
- Once installed, start using it in Python:
5756
```python
5857
from jkq.qcec import *
5958
@@ -116,17 +115,22 @@ result = verify(qc, qc_comp, config)
116115
```
117116
118117
### Command-line Executable
119-
JKQ QCEC also provides a **standalone executable** with command-line interface called `qcec_app`.
120-
It provides the same options as the Python module as flags (e.g., `--method <method>` for setting the method) and produces JSON formatted output.
121-
For a full list of options, call `qcec_app --help`.
118+
119+
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
120+
output. For a full list of options, call `qcec_app --help`.
122121
123122
### System requirements
124123
125-
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).
126-
However, the implementation should be compatible with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14.
124+
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
125+
with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14.
126+
127+
*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
128+
found [here](https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-160).
127129
128130
### Library Organisation
131+
129132
Internally the JKQ QCEC library works in the following way
133+
130134
- Import both input files into a `qc::QuantumComputation` object
131135
```c++
132136
std::string file1 = "<PATH_TO_FILE_1>";

Diff for: extern/qfr

Submodule qfr updated from 1d5e9a3 to cf7d866

Diff for: setup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def build_extension(self, ext):
3333

3434
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
3535
'-DPYTHON_EXECUTABLE=' + sys.executable,
36-
'-DBINDINGS=ON',
37-
'-DDEPLOY=ON']
36+
'-DBINDINGS=ON']
3837

3938
cfg = 'Debug' if self.debug else 'Release'
4039
build_args = ['--config', cfg]
@@ -47,7 +46,10 @@ def build_extension(self, ext):
4746
build_args += ['--', '/m']
4847
else:
4948
cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
50-
build_args += ['--', '-j2']
49+
cpus = os.cpu_count()
50+
if cpus is None:
51+
cpus = 2
52+
build_args += ['--', '-j{}'.format(cpus)]
5153

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

6668
setup(
6769
name='jkq.qcec',
68-
version='1.10.0',
70+
version='1.10.1',
6971
author='Lukas Burgholzer',
7072
author_email='[email protected]',
7173
description='QCEC - A JKQ tool for Quantum Circuit Equivalence Checking',

0 commit comments

Comments
 (0)