@@ -401,13 +401,13 @@ TEST_F(QDMISpecificationTest, QueryDeviceLengthUnit) {
401
401
nullptr ),
402
402
QDMI_SUCCESS);
403
403
EXPECT_THAT (value, testing::AnyOf (" nm" , " um" , " mm" ));
404
- double scaleFactor = . 0 ;
404
+ double scaleFactor = 0 . ;
405
405
const auto result = MQT_NA_QDMI_device_session_query_device_property (
406
406
session, QDMI_DEVICE_PROPERTY_LENGTHSCALEFACTOR, sizeof (double ),
407
407
&scaleFactor, nullptr );
408
408
EXPECT_THAT (result, testing::AnyOf (QDMI_SUCCESS, QDMI_ERROR_NOTSUPPORTED));
409
409
if (result == QDMI_SUCCESS) {
410
- EXPECT_GT (scaleFactor, . 0 );
410
+ EXPECT_GT (scaleFactor, 0 . );
411
411
}
412
412
}
413
413
@@ -422,13 +422,13 @@ TEST_F(QDMISpecificationTest, QueryDeviceDurationUnit) {
422
422
nullptr ),
423
423
QDMI_SUCCESS);
424
424
EXPECT_THAT (value, testing::AnyOf (" ns" , " us" , " ms" ));
425
- double scaleFactor = . 0 ;
425
+ double scaleFactor = 0 . ;
426
426
const auto result = MQT_NA_QDMI_device_session_query_device_property (
427
427
session, QDMI_DEVICE_PROPERTY_DURATIONSCALEFACTOR, sizeof (double ),
428
428
&scaleFactor, nullptr );
429
429
EXPECT_THAT (result, testing::AnyOf (QDMI_SUCCESS, QDMI_ERROR_NOTSUPPORTED));
430
430
if (result == QDMI_SUCCESS) {
431
- EXPECT_GT (scaleFactor, . 0 );
431
+ EXPECT_GT (scaleFactor, 0 . );
432
432
}
433
433
}
434
434
@@ -595,6 +595,17 @@ TEST_F(NADeviceTest, QueryOperationData) {
595
595
std::vector<MQT_NA_QDMI_Operation> operations;
596
596
EXPECT_NO_THROW (operations = queryOperations (session));
597
597
for (auto * operation : operations) {
598
+ size_t nameSize = 0 ;
599
+ ASSERT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
600
+ session, operation, 0 , nullptr , 0 , nullptr ,
601
+ QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , &nameSize),
602
+ QDMI_SUCCESS);
603
+ std::string name (nameSize - 1 , ' \0 ' );
604
+ EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
605
+ session, operation, 0 , nullptr , 0 , nullptr ,
606
+ QDMI_OPERATION_PROPERTY_NAME, nameSize, name.data (), nullptr ),
607
+ QDMI_SUCCESS);
608
+ std::cout << " Querying operation: " << name << " \n " ;
598
609
auto result = MQT_NA_QDMI_device_session_query_operation_property (
599
610
session, operation, 0 , nullptr , 0 , nullptr ,
600
611
QDMI_OPERATION_PROPERTY_DURATION, sizeof (uint64_t ), &duration, nullptr );
@@ -609,8 +620,8 @@ TEST_F(NADeviceTest, QueryOperationData) {
609
620
EXPECT_THAT (result, testing::AnyOf (QDMI_SUCCESS, QDMI_ERROR_NOTSUPPORTED));
610
621
if (result == QDMI_SUCCESS) {
611
622
isFidelitySupported = true ;
612
- EXPECT_GT (fidelity, . 0 );
613
- EXPECT_THAT (fidelity, testing::IsBetween (. 0 , . 1 ));
623
+ EXPECT_GT (fidelity, 0 . );
624
+ EXPECT_THAT (fidelity, testing::IsBetween (0 ., 1 . ));
614
625
}
615
626
result = MQT_NA_QDMI_device_session_query_operation_property (
616
627
session, operation, 0 , nullptr , 0 , nullptr ,
@@ -633,10 +644,12 @@ TEST_F(NADeviceTest, QueryOperationData) {
633
644
EXPECT_EQ (isDurationSupported, isFidelitySupported);
634
645
// isMeanShuttlingSpeedSupported <==> not isDurationSupported
635
646
EXPECT_EQ (isMeanShuttlingSpeedSupported, !isDurationSupported);
636
- // isNumQubitsSupported ==> isMeanShuttlingSpeedSupported
637
- EXPECT_TRUE (!isNumQubitsSupported || isMeanShuttlingSpeedSupported );
647
+ // isMeanShuttlingSpeedSupported ==> not isNumQubitsSupported
648
+ EXPECT_TRUE (!isMeanShuttlingSpeedSupported || isNumQubitsSupported );
638
649
// isMeanShuttlingSpeedSupported ==> isZoned
639
650
EXPECT_TRUE (!isMeanShuttlingSpeedSupported || isZoned);
651
+ // not isZoned ==> isNumQubitsSupported
652
+ EXPECT_TRUE (!isZoned || isNumQubitsSupported);
640
653
EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
641
654
session, operation, 0 , nullptr , 0 , nullptr ,
642
655
QDMI_OPERATION_PROPERTY_PARAMETERSNUM, sizeof (size_t ),
@@ -655,20 +668,13 @@ TEST_F(NADeviceTest, QueryOperationData) {
655
668
if (numQubits == 1 ) {
656
669
std::unordered_set<MQT_NA_QDMI_Site> supportedSites;
657
670
for (const auto & site : sites) {
658
- size_t nameSize = 0 ;
659
671
result = MQT_NA_QDMI_device_session_query_operation_property (
660
672
session, operation, 1 , &site, 0 , nullptr ,
661
- QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , &nameSize );
673
+ QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , nullptr );
662
674
ASSERT_THAT (result,
663
675
testing::AnyOf (QDMI_SUCCESS, QDMI_ERROR_NOTSUPPORTED));
664
676
if (result == QDMI_SUCCESS) {
665
677
supportedSites.emplace (site);
666
- std::string name (nameSize - 1 , ' \0 ' );
667
- EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
668
- session, operation, 0 , nullptr , 0 , nullptr ,
669
- QDMI_OPERATION_PROPERTY_NAME, nameSize, name.data (),
670
- nullptr ),
671
- QDMI_SUCCESS);
672
678
bool isZone = false ;
673
679
EXPECT_EQ (MQT_NA_QDMI_device_session_query_site_property (
674
680
session, site, QDMI_SITE_PROPERTY_ISZONE, sizeof (bool ),
@@ -734,7 +740,8 @@ TEST_F(NADeviceTest, QueryOperationData) {
734
740
EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
735
741
session, operation, 0 , nullptr , 0 , nullptr ,
736
742
QDMI_OPERATION_PROPERTY_SITES, sitesSize,
737
- queriedSupportedSitesVec.data (), nullptr ),
743
+ static_cast <void *>(queriedSupportedSitesVec.data ()),
744
+ nullptr ),
738
745
QDMI_SUCCESS);
739
746
const std::unordered_set queriedSupportedSitesSet (
740
747
queriedSupportedSitesVec.cbegin (), queriedSupportedSitesVec.cend ());
@@ -763,11 +770,10 @@ TEST_F(NADeviceTest, QueryOperationData) {
763
770
for (const auto & site2 : sites) {
764
771
if (site1 != site2) {
765
772
const std::pair sitePair{site1, site2};
766
- size_t nameSize = 0 ;
767
773
result = MQT_NA_QDMI_device_session_query_operation_property (
768
774
session, operation, 2 ,
769
775
reinterpret_cast <const MQT_NA_QDMI_Site*>(&sitePair), 0 ,
770
- nullptr , QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , &nameSize );
776
+ nullptr , QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , nullptr );
771
777
ASSERT_THAT (result, testing::AnyOf (QDMI_SUCCESS,
772
778
QDMI_ERROR_NOTSUPPORTED));
773
779
if (result == QDMI_SUCCESS) {
@@ -778,12 +784,6 @@ TEST_F(NADeviceTest, QueryOperationData) {
778
784
} else {
779
785
supportedSites.emplace (sitePair.second , sitePair.first );
780
786
}
781
- std::string name (nameSize - 1 , ' \0 ' );
782
- EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
783
- session, operation, 0 , nullptr , 0 , nullptr ,
784
- QDMI_OPERATION_PROPERTY_NAME, nameSize,
785
- name.data (), nullptr ),
786
- QDMI_SUCCESS);
787
787
bool isZone = false ;
788
788
EXPECT_EQ (MQT_NA_QDMI_device_session_query_site_property (
789
789
session, sitePair.first ,
@@ -882,30 +882,23 @@ TEST_F(NADeviceTest, QueryOperationData) {
882
882
&blockingRadius, nullptr ),
883
883
QDMI_SUCCESS);
884
884
EXPECT_GE (blockingRadius, interactionRadius);
885
- double idlingFidelity = . 0 ;
885
+ double idlingFidelity = 0 . ;
886
886
EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
887
887
session, operation, 0 , nullptr , 0 , nullptr ,
888
- QDMI_OPERATION_PROPERTY_IDLINGFIDELITY, 0 , nullptr ,
889
- nullptr ),
888
+ QDMI_OPERATION_PROPERTY_IDLINGFIDELITY, sizeof ( double ) ,
889
+ &idlingFidelity, nullptr ),
890
890
QDMI_SUCCESS);
891
- EXPECT_GT (idlingFidelity, . 0 );
892
- EXPECT_THAT (idlingFidelity, testing::IsBetween (. 0 , . 1 ));
891
+ EXPECT_GT (idlingFidelity, 0 . );
892
+ EXPECT_THAT (idlingFidelity, testing::IsBetween (0 ., 1 . ));
893
893
std::unordered_set<MQT_NA_QDMI_Site> supportedSites;
894
894
for (const auto & site : sites) {
895
- size_t nameSize = 0 ;
896
895
result = MQT_NA_QDMI_device_session_query_operation_property (
897
896
session, operation, 1 , &site, 0 , nullptr ,
898
- QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , &nameSize );
897
+ QDMI_OPERATION_PROPERTY_NAME, 0 , nullptr , nullptr );
899
898
ASSERT_THAT (result,
900
899
testing::AnyOf (QDMI_SUCCESS, QDMI_ERROR_NOTSUPPORTED));
901
900
if (result == QDMI_SUCCESS) {
902
901
supportedSites.emplace (site);
903
- std::string name (nameSize - 1 , ' \0 ' );
904
- EXPECT_EQ (MQT_NA_QDMI_device_session_query_operation_property (
905
- session, operation, 0 , nullptr , 0 , nullptr ,
906
- QDMI_OPERATION_PROPERTY_NAME, nameSize, name.data (),
907
- nullptr ),
908
- QDMI_SUCCESS);
909
902
bool isZone = false ;
910
903
EXPECT_EQ (MQT_NA_QDMI_device_session_query_site_property (
911
904
session, site, QDMI_SITE_PROPERTY_ISZONE,
0 commit comments