Skip to content

Commit

Permalink
Version 3.2 (#59)
Browse files Browse the repository at this point in the history
Version 3.2
  • Loading branch information
vsoftco committed May 26, 2023
1 parent 675bcbd commit bd2dc3c
Show file tree
Hide file tree
Showing 71 changed files with 232 additions and 196 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3

- name: Configure staq
run: cmake -B ${{github.workspace}}/build
run: cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build staq
Expand All @@ -41,3 +41,7 @@ jobs:
- name: Run unit tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

- name: Install pystaq
working-directory: ${{github.workspace}}
run: pip3 install --user .
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Pre-release
Version 3.2 - 26 May 2023
- This is a maintenance release
- Migrated all continuous integration to GitHub actions
- Minor updates in qasmtools

Version 3.1 - 13 May 2023
- staq is now available on Homebrew (macOS/Linux), and can be installed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.15)
set(STAQ_VERSION_NUM 3.1)
set(STAQ_VERSION_NUM 3.2)
set(STAQ_VERSION_STR "${STAQ_VERSION_NUM}")
project(staq VERSION ${STAQ_VERSION_NUM} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && \
ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

RUN apt-get install -y \
RUN apt-get install -y \
build-essential \
python3.6 \
python3-pip \
Expand Down
9 changes: 5 additions & 4 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = staq
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v3.1
PROJECT_NUMBER = v3.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -184,7 +184,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH =
STRIP_FROM_PATH = .

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -917,7 +917,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = include
INPUT = include \
README.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1652,7 +1653,7 @@ DISABLE_INDEX = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_TREEVIEW = NO
GENERATE_TREEVIEW = YES

# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ Building on Windows requires [Visual Studio](https://www.visualstudio.com) 2017
or later for CMake support. In Visual Studio, open
[CMakeLists.txt](https://github.com/softwareQinc/staq/blob/main/CMakeLists.txt)
as a CMake project, then simply build as a regular Visual Studio project or,
from an Administrator Developer Command Prompt, execute under the root directory
in a Command Prompt, execute under the root directory

```
```shell
cmake -B build
cmake --build build --parallel 8
```

To (un)install, execute
To (un)install, execute in an Administrator Command Prompt

```
```shell
cmake --build build --target (UN)INSTALL
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# staq

## Version 3.1 - 13 May 2023
## Version 3.2 - 26 May 2023

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

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Version 3.1 - 13 May 2023
Version 3.2 - 26 May 2023
4 changes: 2 additions & 2 deletions include/gates/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
#ifndef GATES_CHANNEL_HPP_
#define GATES_CHANNEL_HPP_

#include "qasmtools/utils/angle.hpp"

#include <iostream>
#include <map>
#include <unordered_map>
#include <variant>
#include <vector>

#include "qasmtools/utils/angle.hpp"

namespace staq {
namespace gates {

Expand Down
10 changes: 5 additions & 5 deletions include/mapping/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@
#ifndef MAPPING_DEVICE_HPP_
#define MAPPING_DEVICE_HPP_

#include "qasmtools/ast/var.hpp"

#include <limits>
#include <cmath>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <nlohmann/json.hpp>
#include <optional>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
#include <fstream>
#include <nlohmann/json.hpp>

#include "qasmtools/ast/var.hpp"

namespace staq {
namespace mapping {
Expand Down
8 changes: 4 additions & 4 deletions include/mapping/layout/basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
#ifndef MAPPING_LAYOUT_BASIC_HPP_
#define MAPPING_LAYOUT_BASIC_HPP_

#include <cstddef>
#include <unordered_map>

#include "mapping/device.hpp"
#include "qasmtools/ast/replacer.hpp"
#include "qasmtools/ast/traversal.hpp"
#include "transformations/substitution.hpp"
#include "mapping/device.hpp"

#include <cstddef>
#include <unordered_map>

namespace staq {
namespace mapping {
Expand Down
6 changes: 3 additions & 3 deletions include/mapping/layout/bestfit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
#ifndef MAPPING_LAYOUT_BESTFIT_HPP_
#define MAPPING_LAYOUT_BESTFIT_HPP_

#include "qasmtools/ast/traversal.hpp"
#include "mapping/device.hpp"

#include <map>

#include "mapping/device.hpp"
#include "qasmtools/ast/traversal.hpp"

namespace staq {
namespace mapping {

Expand Down
6 changes: 3 additions & 3 deletions include/mapping/layout/eager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
#ifndef MAPPING_LAYOUT_EAGER_HPP_
#define MAPPING_LAYOUT_EAGER_HPP_

#include "qasmtools/ast/traversal.hpp"
#include "mapping/device.hpp"

#include <cstddef>
#include <map>
#include <set>
#include <vector>

#include "mapping/device.hpp"
#include "qasmtools/ast/traversal.hpp"

namespace staq {
namespace mapping {

Expand Down
8 changes: 4 additions & 4 deletions include/mapping/mapping/steiner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
#ifndef MAPPING_MAPPING_STEINER_HPP_
#define MAPPING_MAPPING_STEINER_HPP_

#include <vector>

#include "mapping/device.hpp"
#include "qasmtools/ast/traversal.hpp"
#include "qasmtools/utils/templates.hpp"
#include "synthesis/linear_reversible.hpp"
#include "synthesis/cnot_dihedral.hpp"
#include "mapping/device.hpp"

#include <vector>
#include "synthesis/linear_reversible.hpp"

namespace staq {
namespace mapping {
Expand Down
6 changes: 3 additions & 3 deletions include/mapping/mapping/swap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
#ifndef MAPPING_MAPPING_SWAP_HPP_
#define MAPPING_MAPPING_SWAP_HPP_

#include <map>

#include "mapping/device.hpp"
#include "qasmtools/ast/replacer.hpp"
#include "transformations/substitution.hpp"
#include "mapping/device.hpp"

#include <map>

// TODO: figure out what to do with if statements

Expand Down
8 changes: 4 additions & 4 deletions include/optimization/cnot_resynthesis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
#ifndef OPTIMIZATION_CNOTRESYNTHESIS_HPP_
#define OPTIMIZATION_CNOTRESYNTHESIS_HPP_

#include "qasmtools/ast/visitor.hpp"
#include "qasmtools/ast/replacer.hpp"
#include "synthesis/cnot_dihedral.hpp"

#include <cstddef>
#include <list>
#include <sstream>
#include <unordered_map>

#include "qasmtools/ast/replacer.hpp"
#include "qasmtools/ast/visitor.hpp"
#include "synthesis/cnot_dihedral.hpp"

namespace staq {
namespace optimization {

Expand Down
8 changes: 4 additions & 4 deletions include/optimization/rotation_folding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
#ifndef OPTIMIZATION_ROTATIONFOLDING_HPP_
#define OPTIMIZATION_ROTATIONFOLDING_HPP_

#include "qasmtools/ast/visitor.hpp"
#include "qasmtools/ast/replacer.hpp"
#include "gates/channel.hpp"

#include <list>
#include <sstream>
#include <unordered_map>

#include "gates/channel.hpp"
#include "qasmtools/ast/replacer.hpp"
#include "qasmtools/ast/visitor.hpp"

namespace staq {
namespace optimization {

Expand Down
6 changes: 3 additions & 3 deletions include/optimization/simplify.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
#ifndef OPTIMIZATION_SIMPLIFY_HPP_
#define OPTIMIZATION_SIMPLIFY_HPP_

#include "qasmtools/ast/visitor.hpp"
#include "qasmtools/ast/replacer.hpp"

#include <tuple>

#include "qasmtools/ast/replacer.hpp"
#include "qasmtools/ast/visitor.hpp"

namespace staq {
namespace optimization {

Expand Down
4 changes: 2 additions & 2 deletions include/output/cirq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#ifndef OUTPUT_CIRQ_HPP_
#define OUTPUT_CIRQ_HPP_

#include "qasmtools/ast/ast.hpp"

#include <typeinfo>

#include "qasmtools/ast/ast.hpp"

namespace staq {
namespace output {

Expand Down
17 changes: 9 additions & 8 deletions include/output/lattice_surgery.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
#ifndef OUTPUT_LATTICESURGERY_HPP_
#define OUTPUT_LATTICESURGERY_HPP_

#include "qasmtools/ast/ast.hpp"
#include "qasmtools/utils/angle.hpp"
#include "transformations/desugar.hpp"
#include "transformations/inline.hpp"

#include <algorithm>
#include <complex>
#include <map>
#include <nlohmann/json.hpp>
#include <set>
#include <typeinfo>
#include <nlohmann/json.hpp>

#include "qasmtools/ast/ast.hpp"
#include "qasmtools/utils/angle.hpp"
#include "transformations/desugar.hpp"
#include "transformations/inline.hpp"

namespace staq::output {

Expand Down Expand Up @@ -350,8 +350,9 @@ class LayeredPauliOpCircuit {
for (auto const& op : c.ops_) {
if (op.second == "1/8" || op.second == "-1/8") {
if (expect_no_more_Ts) {
throw std::logic_error("π/8 rotations must come before all "
"π/4 rotations and measurements");
throw std::logic_error(
"pi/8 rotations must come before all "
"pi/4 rotations and measurements");
} else {
layers_.push_back({op});
}
Expand Down
4 changes: 2 additions & 2 deletions include/output/projectq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#ifndef OUTPUT_PROJECTQ_HPP_
#define OUTPUT_PROJECTQ_HPP_

#include "qasmtools/ast/ast.hpp"

#include <typeinfo>

#include "qasmtools/ast/ast.hpp"

namespace staq {
namespace output {

Expand Down
4 changes: 2 additions & 2 deletions include/output/qsharp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
#ifndef OUTPUT_QSHARP_HPP_
#define OUTPUT_QSHARP_HPP_

#include "qasmtools/ast/ast.hpp"

#include <iomanip>
#include <typeinfo>

#include "qasmtools/ast/ast.hpp"

namespace staq {
namespace output {

Expand Down
8 changes: 4 additions & 4 deletions include/synthesis/cnot_dihedral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
#ifndef SYNTHESIS_CNOTDIHEDRAL_HPP_
#define SYNTHESIS_CNOTDIHEDRAL_HPP_

#include "mapping/device.hpp"
#include "synthesis/linear_reversible.hpp"
#include "qasmtools/ast/expr.hpp"

#include <cstddef>
#include <list>
#include <variant>
#include <vector>

#include "mapping/device.hpp"
#include "qasmtools/ast/expr.hpp"
#include "synthesis/linear_reversible.hpp"

namespace staq {
namespace synthesis {

Expand Down

0 comments on commit bd2dc3c

Please sign in to comment.