From 60f1c214d09b3073060536c52c8bc68e54c8fc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:20:42 +0100 Subject: [PATCH] fix: Add missing `CnRx` `CnRz` ops (#49) Closes #46 drive-by: Fix clippy lint due to missing doc --- src/opbox.rs | 2 +- src/optype.rs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/opbox.rs b/src/opbox.rs index 10862a6..ae8f30e 100644 --- a/src/opbox.rs +++ b/src/opbox.rs @@ -117,7 +117,7 @@ pub enum OpBox { /// The phase polynomial definition. /// Represented by a map from bitstring to expression of coefficient. phase_polynomial: Vec>, - /// + /// The additional linear transformation. linear_transformation: Matrix, }, /// A user-defined assertion specified by a list of Pauli stabilisers. diff --git a/src/optype.rs b/src/optype.rs index f851393..9a9877e 100644 --- a/src/optype.rs +++ b/src/optype.rs @@ -364,11 +364,15 @@ pub enum OpType { // TODO: Matrix description PhasedISWAP, - /// Multiply-controlled [`OpType::Ry`] - /// - /// The phase parameter is defined modulo \f$ 4 \f$. + /// N-controlled [`OpType::Rx`] + CnRx, + + /// N-controlled [`OpType::Ry`] CnRy, + /// N-controlled [`OpType::Rz`] + CnRz, + /// Multiply-controlled [`OpType::X`] CnX,