diff --git a/CHANGES b/CHANGES index b993f8af..bd3669f3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -Pre-release +Version 3.4 - 1 December 2023 - When configuring staq with `cmake -B build -DINSTALL_SOURCES=ON`, `cmake --build build --target install` now installs staq's source code in addition to the binaries @@ -7,7 +7,7 @@ Pre-release - Added standalone source code example (requires staq's source installation) in the ["examples/standalone"] directory -Version 3.3 +Version 3.3 - 6 October 2023 - Implemented the grid synth rotation synthesizer algorithm https://arxiv.org/abs/1403.2975, enabled only when the GNU MP library is detected. When enabled, the build will include `staq_grid_synth` and diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b6295d5..37d76384 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -set(STAQ_VERSION_NUM 3.3) +set(STAQ_VERSION_NUM 3.4) set(STAQ_VERSION_STR "${STAQ_VERSION_NUM}") project(staq VERSION ${STAQ_VERSION_NUM} LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) diff --git a/Doxyfile b/Doxyfile index ed656a07..f090fbd7 100644 --- a/Doxyfile +++ b/Doxyfile @@ -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.3 +PROJECT_NUMBER = v3.4 # 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 diff --git a/README.md b/README.md index 43a5607c..2e5dc7b8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # staq -## Version 3.3 - 6 October 2023 +## Version 3.4 - 1 December 2023 [![GitHub actions](https://github.com/softwareqinc/staq/actions/workflows/cmake.yml/badge.svg)](https://github.com/softwareQinc/staq/actions) diff --git a/VERSION b/VERSION index b4024380..cd3a6fe5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 3.3 - 6 October 2023 +Version 3.4 - 1 December 2023 diff --git a/include/grid_synth/gmp_functions.hpp b/include/grid_synth/gmp_functions.hpp index 7b8d5fbe..a40b7a87 100644 --- a/include/grid_synth/gmp_functions.hpp +++ b/include/grid_synth/gmp_functions.hpp @@ -260,7 +260,7 @@ inline mpf_class exp(const mpf_class& x) { mpf_class s = 1; mpf_class term = x; // Use Taylor's remainder theorem bound on error - while (gmp_abs(term*s) > eps) { + while (gmp_abs(term * s) > eps) { s += term; i += 1; term *= x; diff --git a/include/output/ionq.hpp b/include/output/ionq.hpp index ca09c889..e482eb63 100644 --- a/include/output/ionq.hpp +++ b/include/output/ionq.hpp @@ -148,7 +148,8 @@ class IonQOutputter final : public ast::Visitor { // TODO: assert that this is a rotation gate // TODO: Handle multiples of pi nicely os_ << prefix_ << "\"angle\": " << std::fixed - << gate.carg(0).constant_eval().value() / qasmtools::utils::pi << ",\n"; + << gate.carg(0).constant_eval().value() / qasmtools::utils::pi + << ",\n"; } os_ << prefix_ << "\"gate\": \"" << name << "\"\n"; // no comma diff --git a/pyproject.toml b/pyproject.toml index 67574a86..c431b0ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "pystaq" -version = "3.3" +version = "3.4" description = "Python 3 wrapper for staq" authors = [ { name = "softwareQ Inc.", email = "info@softwareq.ca" }, diff --git a/qasmtools/include/qasmtools/parser/parser.hpp b/qasmtools/include/qasmtools/parser/parser.hpp index e163c029..08557ecc 100644 --- a/qasmtools/include/qasmtools/parser/parser.hpp +++ b/qasmtools/include/qasmtools/parser/parser.hpp @@ -71,8 +71,8 @@ class Parser { int bits_ = 0; ///< number of bits int qubits_ = 0; ///< number of qubits #ifdef EXPR_GMP - bool use_gmp_ = false; ///< whether to use gmp to parse reals -#endif /* EXPR_GMP */ + bool use_gmp_ = false; ///< whether to use gmp to parse reals +#endif /* EXPR_GMP */ public: /** @@ -81,9 +81,9 @@ class Parser { * \param pp_lexer The preprocessed lexer stream to be parsed */ #ifdef EXPR_GMP - Parser(Preprocessor& pp_lexer, bool use_gmp=false) + Parser(Preprocessor& pp_lexer, bool use_gmp = false) : pp_lexer_(pp_lexer), current_token_(pp_lexer_.next_token()), - use_gmp_(use_gmp) {} + use_gmp_(use_gmp) {} #else Parser(Preprocessor& pp_lexer) : pp_lexer_(pp_lexer), current_token_(pp_lexer_.next_token()) {} @@ -747,11 +747,11 @@ class Parser { case Token::Kind::real: { auto real = current_token_; consume_token(); - #ifdef EXPR_GMP +#ifdef EXPR_GMP if (use_gmp_) { return ast::RealExpr::create(pos, mpf_class(real.raw())); } - #endif /* EXPR_GMP */ +#endif /* EXPR_GMP */ return ast::RealExpr::create(pos, real.as_real()); } @@ -1029,7 +1029,7 @@ inline ast::ptr parse_file(std::string fname) { /** * \brief Parse input from stdin */ -inline ast::ptr parse_stdin(std::string name = "", +inline ast::ptr parse_stdin(std::string name = "", bool use_gmp = false) { Preprocessor pp; #ifdef EXPR_GMP diff --git a/src/tools/grid_synth.cpp b/src/tools/grid_synth.cpp index c6c9903e..a125a3c0 100644 --- a/src/tools/grid_synth.cpp +++ b/src/tools/grid_synth.cpp @@ -96,8 +96,7 @@ int main(int argc, char** argv) { std::cerr << "Invalid angle provided: " << angle << std::endl; return EXIT_FAILURE; } - str_t op_str = - synthesizer.get_op_str(gmp_angle * gmpf::gmp_pi()); + str_t op_str = synthesizer.get_op_str(gmp_angle * gmpf::gmp_pi()); for (char c : op_str) { std::cout << c << ' '; }