Skip to content

✨ Add Native Gate Decomposer to Zoned Neutral Atom Compiler#1050

Draft
ystade wants to merge 126 commits into
mainfrom
fiona/native-gate-decomposer
Draft

✨ Add Native Gate Decomposer to Zoned Neutral Atom Compiler#1050
ystade wants to merge 126 commits into
mainfrom
fiona/native-gate-decomposer

Conversation

@ystade

@ystade ystade commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds a real native gate decomposer to the compilation pipeline of the zned neutral atom compiler. It converts single qubit gates into global y-rotations and local z-rotations.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • I have disclosed the use of AI tools in the PR description as per our AI Usage Guidelines.
  • AI-assisted commits include an Assisted-by: [Model Name] via [Tool Name] footer.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

cs-tum-st and others added 30 commits January 13, 2026 17:27
 changed check for calculation of decomposition angles for sin/theta_m) near sin(theta)
 changed check for calculation of decomposition angles for sin/theta_m) near sin(theta)
# Conflicts:
#	src/na/zoned/decomposer/NativeGateDecomposer.cpp
@ystade ystade added feature New feature or request python Anything related to Python code c++ Anything related to C++ code minor Changes leading to a minor version increase labels Jun 25, 2026
@ystade ystade added this to the Neutral Atom Compilation milestone Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 44 concern(s)
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:183:10: warning: [clang-diagnostic-unused-but-set-variable]

    variable 'chi' set but not used

      183 |   qc::fp chi;
          |          ^
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:189:5: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'chi' is never read

      189 |     chi = qc::PI;
          |     ^     ~~~~~~
    /home/runner/work/qmap/qmap/src/na/zoned/decomposer/NativeGateDecomposer.cpp:189:5: note: Value stored to 'chi' is never read
      189 |     chi = qc::PI;
          |     ^     ~~~~~~
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:199:5: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'chi' is never read

      199 |     chi = fmod(2 * atan(kappa), qc::TAU);
          |     ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/qmap/qmap/src/na/zoned/decomposer/NativeGateDecomposer.cpp:199:5: note: Value stored to 'chi' is never read
      199 |     chi = fmod(2 * atan(kappa), qc::TAU);
          |     ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:382:8: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'thisTheta' during its initialization is never read

      382 |   auto thisTheta = prevTheta;
          |        ^~~~~~~~~   ~~~~~~~~~
    /home/runner/work/qmap/qmap/src/na/zoned/decomposer/NativeGateDecomposer.cpp:382:8: note: Value stored to 'thisTheta' during its initialization is never read
      382 |   auto thisTheta = prevTheta;
          |        ^~~~~~~~~   ~~~~~~~~~
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:715:8: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'cost' during its initialization is never read

      715 |   auto cost = scheduleRemaining(v, circuit, subproblemGraph, baseNode, nQubits,
          |        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      716 |                                 config_.checkFinalCond, memo);
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/qmap/qmap/src/na/zoned/decomposer/NativeGateDecomposer.cpp:715:8: note: Value stored to 'cost' during its initialization is never read
      715 |   auto cost = scheduleRemaining(v, circuit, subproblemGraph, baseNode, nQubits,
          |        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      716 |                                 config_.checkFinalCond, memo);
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/na/zoned/decomposer/NativeGateDecomposer.cpp:715:8: warning: [clang-diagnostic-unused-variable]

    unused variable 'cost'

      715 |   auto cost = scheduleRemaining(v, circuit, subproblemGraph, baseNode, nQubits,
          |        ^~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:270:72: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      270 |   std::array<qc::fp, 4> q12 = NativeGateDecomposer::combineQuaternions(q1, q2);
          |                                                                        ^~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:100:52: note: passing argument to parameter 'q1' here
      100 |   static auto combineQuaternions(const Quaternion& q1, const Quaternion& q2)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:277:72: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      277 |   std::array<qc::fp, 4> q13 = NativeGateDecomposer::combineQuaternions(q12, q3);
          |                                                                        ^~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:100:52: note: passing argument to parameter 'q1' here
      100 |   static auto combineQuaternions(const Quaternion& q1, const Quaternion& q2)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:288:72: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      288 |   std::array<qc::fp, 4> q12 = NativeGateDecomposer::combineQuaternions(q1, q2);
          |                                                                        ^~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:100:52: note: passing argument to parameter 'q1' here
      100 |   static auto combineQuaternions(const Quaternion& q1, const Quaternion& q2)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:295:72: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      295 |   std::array<qc::fp, 4> q13 = NativeGateDecomposer::combineQuaternions(q12, q3);
          |                                                                        ^~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:100:52: note: passing argument to parameter 'q1' here
      100 |   static auto combineQuaternions(const Quaternion& q1, const Quaternion& q2)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:306:25: error: [clang-diagnostic-error]

    no viable conversion from 'Quaternion' to 'std::array<qc::fp, 4>' (aka 'array<double, 4>')

      306 |   std::array<qc::fp, 4> q = NativeGateDecomposer::convertGateToQuaternion(
          |                         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      307 |       std::reference_wrapper<const qc::Operation>(*op));
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Quaternion' to 'const array<double, 4> &' for 1st argument
      100 |     struct array
          |            ^~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Quaternion' to 'array<double, 4> &&' for 1st argument
      100 |     struct array
          |            ^~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:308:63: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      308 |   EXPECT_THAT(NativeGateDecomposer::getU3AnglesFromQuaternion(q),
          |                                                               ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:109:59: note: passing argument to parameter 'quat' here
      109 |   static auto getU3AnglesFromQuaternion(const Quaternion& quat) -> Angles;
          |                                                           ^
  • test/na/zoned/test_native_gate_decomposer.cpp:317:25: error: [clang-diagnostic-error]

    no viable conversion from 'Quaternion' to 'std::array<qc::fp, 4>' (aka 'array<double, 4>')

      317 |   std::array<qc::fp, 4> q = NativeGateDecomposer::convertGateToQuaternion(
          |                         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      318 |       std::reference_wrapper<const qc::Operation>(*op));
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Quaternion' to 'const array<double, 4> &' for 1st argument
      100 |     struct array
          |            ^~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Quaternion' to 'array<double, 4> &&' for 1st argument
      100 |     struct array
          |            ^~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:326:63: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      326 |   EXPECT_THAT(NativeGateDecomposer::getU3AnglesFromQuaternion(q),
          |                                                               ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:109:59: note: passing argument to parameter 'quat' here
      109 |   static auto getU3AnglesFromQuaternion(const Quaternion& quat) -> Angles;
          |                                                           ^
  • test/na/zoned/test_native_gate_decomposer.cpp:335:25: error: [clang-diagnostic-error]

    no viable conversion from 'Quaternion' to 'std::array<qc::fp, 4>' (aka 'array<double, 4>')

      335 |   std::array<qc::fp, 4> q = NativeGateDecomposer::convertGateToQuaternion(
          |                         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      336 |       std::reference_wrapper<const qc::Operation>(*op));
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Quaternion' to 'const array<double, 4> &' for 1st argument
      100 |     struct array
          |            ^~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Quaternion' to 'array<double, 4> &&' for 1st argument
      100 |     struct array
          |            ^~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:343:55: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      343 |       NativeGateDecomposer::getU3AnglesFromQuaternion(q),
          |                                                       ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:109:59: note: passing argument to parameter 'quat' here
      109 |   static auto getU3AnglesFromQuaternion(const Quaternion& quat) -> Angles;
          |                                                           ^
  • test/na/zoned/test_native_gate_decomposer.cpp:352:25: error: [clang-diagnostic-error]

    no viable conversion from 'Quaternion' to 'std::array<qc::fp, 4>' (aka 'array<double, 4>')

      352 |   std::array<qc::fp, 4> q = NativeGateDecomposer::convertGateToQuaternion(
          |                         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      353 |       std::reference_wrapper<const qc::Operation>(*op));
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Quaternion' to 'const array<double, 4> &' for 1st argument
      100 |     struct array
          |            ^~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/array:100:12: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Quaternion' to 'array<double, 4> &&' for 1st argument
      100 |     struct array
          |            ^~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:361:55: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion'

      361 |       NativeGateDecomposer::getU3AnglesFromQuaternion(q),
          |                                                       ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'const Quaternion &' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:34:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 4>' (aka 'array<double, 4>') to 'Quaternion &&' for 1st argument
       34 |   struct Quaternion {
          |          ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:109:59: note: passing argument to parameter 'quat' here
      109 |   static auto getU3AnglesFromQuaternion(const Quaternion& quat) -> Angles;
          |                                                           ^
  • test/na/zoned/test_native_gate_decomposer.cpp:369:60: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles'

      369 |   EXPECT_THAT(NativeGateDecomposer::getDecompositionAngles(rx, qc::PI),
          |                                                            ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles &' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'Angles &&' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:145:52: note: passing argument to parameter 'angles' here
      145 |   auto static getDecompositionAngles(const Angles& angles, qc::fp thetaMax)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:378:52: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles'

      378 |       NativeGateDecomposer::getDecompositionAngles(u3, qc::PI_4),
          |                                                    ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles &' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'Angles &&' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:145:52: note: passing argument to parameter 'angles' here
      145 |   auto static getDecompositionAngles(const Angles& angles, qc::fp thetaMax)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:387:60: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles'

      387 |   EXPECT_THAT(NativeGateDecomposer::getDecompositionAngles(x1, qc::PI),
          |                                                            ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles &' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'Angles &&' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:145:52: note: passing argument to parameter 'angles' here
      145 |   auto static getDecompositionAngles(const Angles& angles, qc::fp thetaMax)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:391:60: error: [clang-diagnostic-error]

    no viable conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles'

      391 |   EXPECT_THAT(NativeGateDecomposer::getDecompositionAngles(z2, qc::PI),
          |                                                            ^
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googlemock/include/gmock/gmock-matchers.h:5713:72: note: expanded from macro 'EXPECT_THAT'
     5713 |       ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
          |                                                                        ^~~~~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:109:36: note: expanded from macro 'EXPECT_PRED_FORMAT1'
      109 |   GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
          |                                    ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:100:34: note: expanded from macro 'GTEST_PRED_FORMAT1_'
      100 |   GTEST_ASSERT_(pred_format(#v1, v1), on_failure)
          |                                  ^~
    /home/runner/work/qmap/qmap/build/_deps/googletest-src/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
       79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
          |                                                    ^~~~~~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'const Angles &' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:48:10: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::array<qc::fp, 3>' (aka 'array<double, 3>') to 'Angles &&' for 1st argument
       48 |   struct Angles {
          |          ^~~~~~
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:145:52: note: passing argument to parameter 'angles' here
      145 |   auto static getDecompositionAngles(const Angles& angles, qc::fp thetaMax)
          |                                                    ^
  • test/na/zoned/test_native_gate_decomposer.cpp:405:63: error: [clang-diagnostic-error]

    too few arguments to function call, expected 3, have 2

      405 |   auto decomp = decomposer.decompose(qc.getNqubits(), schedule);
          |                 ~~~~~~~~~~~~~~~~~~~~                          ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:149:3: note: 'decompose' declared here
      149 |   decompose(size_t nQubits,
          |   ^         ~~~~~~~~~~~~~~~
      150 |             const std::vector<SingleQubitGateRefLayer>& singleQubitGateLayers,
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |             const std::vector<TwoQubitGateLayer>& twoQubitGateLayers) const
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:434:60: error: [clang-diagnostic-error]

    too few arguments to function call, expected 3, have 2

      434 |   auto decomp = decomposer.decompose(qc.getNqubits(), sched);
          |                 ~~~~~~~~~~~~~~~~~~~~                       ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:149:3: note: 'decompose' declared here
      149 |   decompose(size_t nQubits,
          |   ^         ~~~~~~~~~~~~~~~
      150 |             const std::vector<SingleQubitGateRefLayer>& singleQubitGateLayers,
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |             const std::vector<TwoQubitGateLayer>& twoQubitGateLayers) const
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • test/na/zoned/test_native_gate_decomposer.cpp:465:60: error: [clang-diagnostic-error]

    too few arguments to function call, expected 3, have 2

      465 |   auto decomp = decomposer.decompose(qc.getNqubits(), sched);
          |                 ~~~~~~~~~~~~~~~~~~~~                       ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:149:3: note: 'decompose' declared here
      149 |   decompose(size_t nQubits,
          |   ^         ~~~~~~~~~~~~~~~
      150 |             const std::vector<SingleQubitGateRefLayer>& singleQubitGateLayers,
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |             const std::vector<TwoQubitGateLayer>& twoQubitGateLayers) const
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • test/na/zoned/test_theta_opt_scheduler.cpp:79:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

       79 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:81:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

       81 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:83:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

       83 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(0)).qubit, 0);
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:85:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

       85 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(0)).angles,
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:104:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

      104 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(2)).qubit, 0);
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:106:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

      106 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(2)).angles,
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:117:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

      117 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(3)).qubit, 1);
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:119:38: error: [clang-diagnostic-error]

    'StructU3' is a private member of 'na::zoned::NativeGateDecomposer'

      119 |       std::get<NativeGateDecomposer::StructU3>(graph.getNodeValue(3)).angles,
          |                                      ^
    /home/runner/work/qmap/qmap/include/na/zoned/decomposer/NativeGateDecomposer.hpp:58:10: note: implicitly declared private here
       58 |   struct StructU3 {
          |          ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:155:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      155 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:157:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

      157 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:206:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      206 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:208:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

      208 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:256:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      256 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:258:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

      258 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:299:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      299 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:301:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

      301 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:355:71: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      355 |   auto one_qubit_gates = NativeGateDecomposer::transformToU3(schedule.first, n);
          |                                                              ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:357:34: error: [clang-diagnostic-error]

    no member named 'second' in 'na::zoned::SchedulerResult'

      357 |       {one_qubit_gates, schedule.second}, n);
          |                         ~~~~~~~~ ^
  • test/na/zoned/test_theta_opt_scheduler.cpp:469:57: error: [clang-diagnostic-error]

    no member named 'first' in 'na::zoned::SchedulerResult'

      469 |       NativeGateDecomposer::transformToU3(asap_schedule.first, n);
          |                                           ~~~~~~~~~~~~~ ^

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code feature New feature or request minor Changes leading to a minor version increase python Anything related to Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants