Repository: qir-alliance/qir-runner (language: python)

Issue:
Adding joint rotation support
Adds support for the Rxx, Ryy, and Rzz joint rotations.


Discussion / hints:

Fix patch:
diff --git a/runner/src/lib.rs b/runner/src/lib.rs
index 841c6db0..16740985 100644
--- a/runner/src/lib.rs
+++ b/runner/src/lib.rs
@@ -319,10 +319,13 @@ fn bind_functions(module: &Module, execution_engine: &ExecutionEngine) -> Result
     bind!(__quantum__qis__reset__body, 1);
     bind!(__quantum__qis__rx__body, 2);
     bind!(__quantum__qis__rx__ctl, 2);
+    bind!(__quantum__qis__rxx__body, 3);
     bind!(__quantum__qis__ry__body, 2);
     bind!(__quantum__qis__ry__ctl, 2);
+    bind!(__quantum__qis__ryy__body, 3);
     bind!(__quantum__qis__rz__body, 2);
     bind!(__quantum__qis__rz__ctl, 2);
+    bind!(__quantum__qis__rzz__body, 3);
     bind!(__quantum__qis__s__adj, 1);
     bind!(__quantum__qis__s__body, 1);
     bind!(__quantum__qis__s__ctl, 2);


Test patch:
diff --git a/runner/tests/resources/cji.bc b/runner/tests/resources/cji.bc
index 7100f5b8..56dc5c73 100644
Binary files a/runner/tests/resources/cji.bc and b/runner/tests/resources/cji.bc differ
diff --git a/runner/tests/tests.rs b/runner/tests/tests.rs
index 11c08416..b714f374 100644
--- a/runner/tests/tests.rs
+++ b/runner/tests/tests.rs
@@ -98,6 +98,24 @@ mod cji_tests {
         run_bitcode(bitcode, Some("DecompositionTests__VerifyRz"), 1)
     }
 
+    #[test]
+    fn test_rxx_with_cji() -> Result<(), String> {
+        let bitcode = include_bytes!("resources/cji.bc");
+        run_bitcode(bitcode, Some("DecompositionTests__VerifyRxx"), 1)
+    }
+
+    #[test]
+    fn test_ryy_with_cji() -> Result<(), String> {
+        let bitcode = include_bytes!("resources/cji.bc");
+        run_bitcode(bitcode, Some("DecompositionTests__VerifyRyy"), 1)
+    }
+
+    #[test]
+    fn test_rzz_with_cji() -> Result<(), String> {
+        let bitcode = include_bytes!("resources/cji.bc");
+        run_bitcode(bitcode, Some("DecompositionTests__VerifyRzz"), 1)
+    }
+
     #[test]
     fn test_r_with_cji() -> Result<(), String> {
         let bitcode = include_bytes!("resources/cji.bc");