Skip to content

Commit 994d97f

Browse files
authored
Version 3.5 (#75)
1 parent f5c945f commit 994d97f

File tree

261 files changed

+272
-109240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+272
-109240
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: GitHub actions
22

33
on:
44
push:
5-
branches: [ "**" ]
5+
branches: ["**"]
66
pull_request:
7-
branches: [ "**" ]
7+
branches: ["**"]
88

99
env:
1010
BUILD_TYPE: Debug
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
strategy:
1515
matrix:
16-
os: [ ubuntu-latest, macos-latest, windows-latest ]
16+
os: [ubuntu-latest, macos-latest, windows-latest]
1717
runs-on: ${{ matrix.os }}
1818

1919
steps:
@@ -94,7 +94,7 @@ jobs:
9494
export CPATH=$LIBRARY_PATH:/usr/local/include
9595
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
9696
fi
97-
cmake --build build --target unit_tests
97+
cmake --build build/unit_tests --target unit_tests
9898
9999
- name: Run unit tests
100100
run: ctest --test-dir build

CHANGES

Lines changed: 0 additions & 108 deletions
This file was deleted.

CHANGES.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Version 3.5 - 8 March 2024
2+
3+
- Replaced ["CHANGES"] by ["CHANGES.md"],
4+
as we now use Markdown format to keep track of changes in new releases
5+
- Removed pybind11 and GoogleTest dependencies; if not detected, they are
6+
installed automatically as build dependencies by CMake
7+
- Bumped GoogleTest version to HEAD latest, as
8+
[recommended by Google](https://github.com/google/googletest?tab=readme-ov-file#live-at-head)
9+
- All header files are moved into ["include/staq"], so to include **staq**
10+
headers one now must `#include "staq/<header>.hpp"`. This change was made for
11+
the sake of making the include statements look uniform in both non-installed
12+
(compiled without having **staq** installed) and installed
13+
(compiling with **staq** installed headers) modes.
14+
- Integrated the `staq_ionq` OpenQASM2 -> IonQ transpiler into **pystaq**
15+
16+
# Version 3.4 - 1 December 2023
17+
18+
- When configuring **staq** with `cmake -B build -DINSTALL_SOURCES=ON`,
19+
`cmake --build build --target install` now installs **staq**'s source code in
20+
addition to the binaries
21+
- Renamed the ["examples"] directory to ["misc"]
22+
- Moved ["qpu_specs"] and ["scripts"] directories to ["misc"]
23+
- Added standalone source code example (requires **staq**'s source
24+
installation) in the ["examples/standalone"] directory
25+
- Added `staq_ionq` OpenQASM2 -> IonQ transpiler
26+
27+
# Version 3.3 - 6 October 2023
28+
29+
- Implemented the
30+
[grid synth rotation synthesizer algorithm](https://arxiv.org/abs/1403.2975),
31+
enabled only when the GNU MP library
32+
is detected. When enabled, the build will include `staq_grid_synth` and
33+
`staq_qasm_synth`.
34+
35+
# Version 3.2.3 - 14 August 2023
36+
37+
- Minor bugfix in **pystaq** ["setup.py"] that prevented `pip install`
38+
from remote
39+
- Docker update, see the ["docker"] directory
40+
41+
# Version 3.2.2 - 12 June 2023
42+
43+
- This is a maintenance release
44+
- Compiling errors fixed on SunOS/OpenIndiana
45+
46+
# Version 3.2.1
47+
48+
- This is a maintenance release
49+
- CMake dependent flag name changes:
50+
`USE_OPENQASM2_SPECS` -> `QASMTOOLS_QASM2_SPECS`
51+
52+
# Version 3.2 - 26 May 2023
53+
54+
- This is a maintenance release
55+
- Migrated all continuous integration to GitHub actions
56+
- Minor updates in qasmtools
57+
58+
# Version 3.1 - 13 May 2023
59+
60+
- **staq** is now available on Homebrew (macOS/Linux), and can be installed
61+
with `brew install staq`
62+
- Migrated **pystaq** installation method to ["pyproject.toml"]
63+
- CMake minimum required version bumped to 3.15
64+
65+
# Version 3.0.1 - 2 April 2023
66+
67+
- This is a maintenance release with minor changes
68+
- Updated pybind11 to version 2.10.4
69+
70+
# Version 3.0 - 20 March 2023
71+
72+
- Complete Windows support for **pystaq**
73+
- Bumped
74+
[GoogleTest version to 1.12.1](https://github.com/google/googletest/commit/58d77fa8070e8cec2dc1ed015d66b454c8d78850)
75+
- Implemented a lattice surgery compiler ["include/output/lattice_surgery.hpp"]
76+
77+
# Version 2.1 - 17 January 2022
78+
79+
- Added **pystaq**, a Python wrapper around **staq**. See
80+
[this](https://github.com/softwareQinc/staq/wiki/pystaq) for more details.
81+
- Due to phase discrepancies, by default the parser now uses Qiskit definitions
82+
(which are also the usual ones used in QC textbooks). To switch to standard
83+
OpenQASM 2.0 gate definitions, configure the project with
84+
`cmake -DUSE_OPENQASM2_SPECS=ON`.
85+
- When building with CMake, the new `STAQ_VERSION_NUM` (numeric) and
86+
`STAQ_VERSION_STR` (string) preprocessor definitions are automatically
87+
injected in the code
88+
89+
# Version 2.0 - 5 October 2021
90+
91+
- Decoupled the OpenQASM parser from the main codebase. A hard copy of
92+
[qasmtools](https://github.com/softwareQinc/qasmtools) is now common to both
93+
**staq** and **Quantum++**, and by default uses standard OpenQASM 2.0 gate
94+
definitions. To switch to Qiskit definitions (which are also the usual ones
95+
used in QC textbooks), configure the project with
96+
`cmake -DUSE_QISKIT_SPECS=ON`.
97+
- Added CMake installation support
98+
- Switched continuous integration from Travis CI to CircleCI
99+
- CMake minimum required version bumped to 3.12 for automatic unit tests
100+
detection by CMake
101+
- Unit testing is now a separate CMake target, one needs to explicitly type
102+
`make unit_tests` to build the unit testing suite
103+
- Simplified unit testing, now one can run tests with `ctest` or `make test`
104+
(after explicitly built with `make unit_tests`). Use
105+
`GTEST_COLOR=1 ARGS="-V" make test` or `GTEST_COLOR=1 ctest -V` for coloured
106+
verbose testing output.
107+
- QPU specifications (qubits, couplings, fidelities) are now stored in
108+
[JSON files](https://github.com/softwareQinc/staq/tree/main/misc/qpu_specs)
109+
- Added a device generator to easily create these JSON files under
110+
["tools/device_generator.cpp"].
111+
112+
# Version 1.4 - 5 December 2020
113+
114+
- Bugfixes
115+
- Renamed `master` branch to `main`
116+
117+
# Version 1.3 - 11 June 2020
118+
119+
- Bugfix release
120+
121+
# Version 1.2 - 13 May 2020
122+
123+
- Minor incremental improvements/bugfixes
124+
125+
# Version 1.1 - 8 April 2020
126+
127+
- Added complete Windows support (including MSVC) + AppVeyor CI
128+
- Various minor bugfixes
129+
130+
# Version 1.0 - 10 December 2019
131+
132+
- Initial public release

CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ add_compile_definitions(STAQ_VERSION_STR="${STAQ_VERSION_STR}")
2020
# staq root directory
2121
add_compile_definitions(PROJECT_ROOT_DIR="${PROJECT_SOURCE_DIR}")
2222

23+
# Guard against in-source builds (snippet from Eigen's CMakeLists.txt)
24+
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
25+
message(
26+
FATAL_ERROR
27+
"In-source builds not allowed. Please instruct CMake to use an\
28+
out-of-source build, e.g.,
29+
cmake -B build && cmake --build build
30+
You may need to remove CMakeCache.txt.")
31+
endif()
32+
2333
# Force clang to use libc++
2434
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
2535
add_compile_options("-stdlib=libc++")
@@ -61,10 +71,11 @@ target_include_directories(
6171
libstaq INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs>
6272
$<INSTALL_INTERFACE:include/staq/third_party>)
6373

64-
# pystaq (only if Python development kit is detected)
74+
# pystaq and pybind11 (only if the Python development kit is detected)
6575
find_package(Python3 QUIET COMPONENTS Interpreter Development)
6676
if(${Python3_FOUND})
67-
include(cmake/staq_pystaq.cmake)
77+
include(cmake/pybind11.cmake)
78+
include(cmake/pystaq.cmake)
6879
endif()
6980

7081
# Enable OpenQASM 2.0 Specs
@@ -87,7 +98,7 @@ target_link_libraries(${COMPILER} PUBLIC libstaq)
8798
add_subdirectory(src/tools)
8899

89100
# Unit testing
90-
add_subdirectory(${CMAKE_SOURCE_DIR}/unit_tests/)
101+
add_subdirectory(${CMAKE_SOURCE_DIR}/unit_tests/ EXCLUDE_FROM_ALL SYSTEM)
91102

92103
# Enable all warnings for GNU gcc and Clang/AppleClang
93104
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID}

INSTALL.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ as [Windows](https://www.microsoft.com/en-us/windows).
1414
## Pre-requisites
1515

1616
- [CMake](https://cmake.org/)
17-
- C++17 compliant compiler, e.g.,
17+
- pp+17 compliant compiler, e.g.,
1818
[gcc](https://gcc.gnu.org/),
1919
[clang](https://clang.llvm.org),
2020
[MSVC](https://visualstudio.microsoft.com/vs/)
@@ -57,8 +57,8 @@ Next, build the **staq** system by executing
5757
cmake --build build --parallel 8
5858
```
5959

60-
The `--parallel 8` instructs CMake to build in parallel using 8 threads, modify
61-
accordingly.
60+
The `--parallel 8` flag instructs CMake to build in parallel using 8 threads,
61+
modify accordingly.
6262

6363
To build only the **staq** tool suite, execute
6464

@@ -75,7 +75,7 @@ cmake --build build --target staq --parallel 8
7575
Unit tests can be built with the command
7676

7777
```shell
78-
cmake --build build --target unit_tests --parallel 8
78+
cmake --build build/unit_tests --target unit_tests --parallel 8
7979
```
8080

8181
and run with
@@ -100,18 +100,17 @@ If you configured the system with `-DINSTALL_SOURCES=ON`, **staq**'s source
100100
code will be installed in `/usr/local/include/staq` (UNIX/UNIX-like systems), or
101101
in `C:\Program Files (x86)\staq` on Windows systems. The paths may differ on
102102
your system. To use **staq**'s source code, precede all include paths by `staq`
103-
in
104-
your own code, i.e.,
103+
in your own code, i.e.,
105104

106-
```c++
105+
```cpp
107106
#include <staq/qasmtools/parser/parser.hpp>
108107
```
109108

110109
Third party header-only libraries used internally by **staq** need to be
111110
preceded by `third_party` when including their corresponding header file(s),
112111
i.e.,
113112

114-
```c++
113+
```cpp
115114
#include <staq/third_party/CLI/CLI.hpp>
116115
```
117116

@@ -165,8 +164,8 @@ followed by building the system as usual.
165164

166165
## Python 3 wrapper
167166

168-
[pystaq](https://github.com/softwareQinc/staq/blob/main/pystaq/) is a Python 3
169-
wrapper for **staq**. pystaq can be installed using `pip`
167+
[**pystaq**](https://github.com/softwareQinc/staq/blob/main/pystaq/) is a
168+
Python 3 wrapper for **staq**. **pystaq** can be installed using `pip`
170169

171170
```shell
172171
pip install git+https://github.com/softwareQinc/staq

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# staq
22

3-
## Version 3.5 - xx February 2024
3+
## Version 3.5 - 8 March 2024
44

55
[![GitHub actions](https://github.com/softwareqinc/staq/actions/workflows/cmake.yml/badge.svg)](https://github.com/softwareQinc/staq/actions)
66

@@ -53,8 +53,8 @@ documentation and detailed examples.
5353

5454
## Python 3 wrapper
5555

56-
[pystaq](https://github.com/softwareQinc/staq/blob/main/pystaq/) is a Python 3
57-
wrapper for **staq**. pystaq can be installed using `pip`
56+
[**pystaq**](https://github.com/softwareQinc/staq/blob/main/pystaq/) is a
57+
Python 3 wrapper for **staq**. **pystaq** can be installed using `pip`
5858

5959
```shell
6060
pip install git+https://github.com/softwareQinc/staq

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Version 3.5 - xx February 2024
1+
Version 3.5 - 8 March 2024

0 commit comments

Comments
 (0)