Repository: HQSquantumsimulations/qoqo (language: python)

Issue:
fixing building docs



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd4424aa..7b4fc5e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 This changelog track changes to the qoqo project starting at version v0.5.0
 
+## 1.6.0-alpha.1
+
+* Renamed the PNRDetection operation to PhotonDetection.
+
 ## 1.6.0-alpha.0
 
 ### Added in 1.6.0-alpha.0
@@ -17,6 +21,16 @@ This changelog track changes to the qoqo project starting at version v0.5.0
 
 * pyo3 updated to 0.19
 
+## 1.5.1
+
+### Fixed in 1.5.1
+
+* Fixed wrong minimum required roqoqo version when serializing circuits with some operations from versions 1.3, 1.4. and 1.5.
+
+### Updated in 1.5.1
+
+* pyo3 updated to 0.19
+
 ## 1.5.0
 
 ### Added in 1.5.0
diff --git a/Cargo.lock b/Cargo.lock
index 953d26fe..9cc95420 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -515,7 +515,7 @@ dependencies = [
 
 [[package]]
 name = "qoqo"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
  "bincode",
  "nalgebra",
@@ -539,7 +539,7 @@ dependencies = [
 
 [[package]]
 name = "qoqo-macros"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -637,7 +637,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
  "async-trait",
  "bincode",
@@ -664,7 +664,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo-derive"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -673,7 +673,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo-test"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
  "nalgebra",
  "ndarray",
diff --git a/qoqo-macros/Cargo.toml b/qoqo-macros/Cargo.toml
index 3800d81f..a0cd3bc9 100644
--- a/qoqo-macros/Cargo.toml
+++ b/qoqo-macros/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "qoqo-macros"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 readme = "../README.md"
diff --git a/qoqo/Cargo.toml b/qoqo/Cargo.toml
index f27fd6bd..73587919 100644
--- a/qoqo/Cargo.toml
+++ b/qoqo/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "qoqo"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 homepage = "https://github.com/HQSquantumsimulations/qoqo"
@@ -32,8 +32,8 @@ num-complex = "0.4"
 thiserror = "1.0"
 qoqo_calculator = { version="1.1" }
 qoqo_calculator_pyo3 = {version="1.1", default-features=false}
-qoqo-macros = {version="1.6.0-alpha.0", path="../qoqo-macros"}
-roqoqo = {version="1.6.0-alpha.0", path="../roqoqo", features=["serialize", "overrotate"]}
+qoqo-macros = {version="1.6.0-alpha.1", path="../qoqo-macros"}
+roqoqo = {version="1.6.0-alpha.1", path="../roqoqo", features=["serialize", "overrotate"]}
 numpy = "0.19"
 bincode = "1.3"
 serde_json = "1.0"
diff --git a/qoqo/pyproject.toml b/qoqo/pyproject.toml
index 1b05be9f..35f63dfe 100644
--- a/qoqo/pyproject.toml
+++ b/qoqo/pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "qoqo"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 dependencies = [
   'numpy',
   'qoqo_calculator_pyo3>=1.1',
diff --git a/qoqo/qoqo/DEPENDENCIES b/qoqo/qoqo/DEPENDENCIES
index 3ee75929..672d1d24 100644
--- a/qoqo/qoqo/DEPENDENCIES
+++ b/qoqo/qoqo/DEPENDENCIES
@@ -8432,7 +8432,7 @@ LICENSE:
 
 
 ====================================================
-qoqo 1.6.0-alpha.0
+qoqo 1.6.0-alpha.1
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Quantum computing circuit toolkit. Python interface of roqoqo
@@ -8644,7 +8644,7 @@ LICENSE:
 
 
 ====================================================
-qoqo-macros 1.6.0-alpha.0
+qoqo-macros 1.6.0-alpha.1
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Macros for the qoqo crate
 License: Apache-2.0
@@ -10689,7 +10689,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 ====================================================
-roqoqo 1.6.0-alpha.0
+roqoqo 1.6.0-alpha.1
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Rust Quantum Computing Toolkit by HQS
@@ -10901,7 +10901,7 @@ LICENSE:
 
 
 ====================================================
-roqoqo-derive 1.6.0-alpha.0
+roqoqo-derive 1.6.0-alpha.1
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Macros for the roqoqo crate
 License: Apache-2.0
@@ -11112,7 +11112,7 @@ LICENSE:
 
 
 ====================================================
-roqoqo-test 1.6.0-alpha.0
+roqoqo-test 1.6.0-alpha.1
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Testing helper functions for roqoqo toolkit
diff --git a/qoqo/src/operations/bosonic_operations.rs b/qoqo/src/operations/bosonic_operations.rs
index 72054b79..52a02857 100644
--- a/qoqo/src/operations/bosonic_operations.rs
+++ b/qoqo/src/operations/bosonic_operations.rs
@@ -100,7 +100,7 @@ pub struct BeamSplitter {
 ///     mode (int): The mode the detector (measurement) is applied to.
 ///     readout (str): The register for the readout.
 ///     readout_index (int): The index in the readout the result is saved to.
-pub struct PNRDetection {
+pub struct PhotonDetection {
     mode: usize,
     readout: String,
     readout_index: usize,
diff --git a/qoqo/src/operations/mod.rs b/qoqo/src/operations/mod.rs
index 2b6cd00a..9f89ba2a 100644
--- a/qoqo/src/operations/mod.rs
+++ b/qoqo/src/operations/mod.rs
@@ -140,6 +140,6 @@ pub fn operations(_py: Python, m: &PyModule) -> PyResult<()> {
     m.add_class::<SqueezingWrapper>()?;
     m.add_class::<PhaseShiftWrapper>()?;
     m.add_class::<BeamSplitterWrapper>()?;
-    m.add_class::<PNRDetectionWrapper>()?;
+    m.add_class::<PhotonDetectionWrapper>()?;
     Ok(())
 }
diff --git a/roqoqo-derive/Cargo.toml b/roqoqo-derive/Cargo.toml
index 96337f58..de566a13 100644
--- a/roqoqo-derive/Cargo.toml
+++ b/roqoqo-derive/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo-derive"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
diff --git a/roqoqo/Cargo.toml b/roqoqo/Cargo.toml
index 230ff071..6d23cb73 100644
--- a/roqoqo/Cargo.toml
+++ b/roqoqo/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -28,7 +28,7 @@ num-complex = { version = "0.4"}
 thiserror = "1.0"
 dyn-clone = {version="1.0", optional=true}
 qoqo_calculator = { version="1.1"}
-roqoqo-derive = {version="1.6.0-alpha.0", path="../roqoqo-derive"}
+roqoqo-derive = {version="1.6.0-alpha.1", path="../roqoqo-derive"}
 typetag = {version="0.2", optional=true}
 nalgebra = "0.32"
 # schemars = { version="0.8", features = ["num-complex", "ndarray"], optional=true }
diff --git a/roqoqo/src/operations/bosonic_operations.rs b/roqoqo/src/operations/bosonic_operations.rs
index bb4c03a8..5f647f17 100644
--- a/roqoqo/src/operations/bosonic_operations.rs
+++ b/roqoqo/src/operations/bosonic_operations.rs
@@ -183,7 +183,7 @@ impl SupportedVersion for BeamSplitter {
     roqoqo_derive::OperateSingleMode,
 )]
 #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
-pub struct PNRDetection {
+pub struct PhotonDetection {
     /// The mode the detector (measurement) is applied to.
     mode: usize,
     /// The register for the readout.
@@ -193,9 +193,9 @@ pub struct PNRDetection {
 }
 
 #[allow(non_upper_case_globals)]
-const TAGS_PNRDetection: &[&str; 3] = &["Operation", "Measurement", "PNRDetection"];
+const TAGS_PhotonDetection: &[&str; 3] = &["Operation", "Measurement", "PhotonDetection"];
 
-impl InvolveQubits for PNRDetection {
+impl InvolveQubits for PhotonDetection {
     /// Returns all qubits involved in operation.
     fn involved_qubits(&self) -> InvolvedQubits {
         InvolvedQubits::None
@@ -208,9 +208,9 @@ impl InvolveQubits for PNRDetection {
     }
 }
 
-impl ImplementedIn1point6 for PNRDetection {}
+impl ImplementedIn1point6 for PhotonDetection {}
 
-impl SupportedVersion for PNRDetection {
+impl SupportedVersion for PhotonDetection {
     fn minimum_supported_roqoqo_version(&self) -> (u32, u32, u32) {
         (1, 6, 0)
     }
diff --git a/roqoqo/src/operations/mod.rs b/roqoqo/src/operations/mod.rs
index de83d8d1..14600c2d 100644
--- a/roqoqo/src/operations/mod.rs
+++ b/roqoqo/src/operations/mod.rs
@@ -911,10 +911,10 @@ pub enum InvolvedModes {
 ///
 /// # Example
 /// ```
-/// use roqoqo::operations::{InvolveModes, InvolvedModes, PNRDetection, BeamSplitter};
+/// use roqoqo::operations::{InvolveModes, InvolvedModes, PhotonDetection, BeamSplitter};
 /// use std::collections::HashSet;
 ///
-/// let measurement = PNRDetection::new(1, "ro".into(), 0);
+/// let measurement = PhotonDetection::new(1, "ro".into(), 0);
 /// let operation = BeamSplitter::new(0, 1, 0.1.into(), 0.2.into());
 ///
 /// let mut modes: HashSet<usize> = HashSet::new();
@@ -974,9 +974,9 @@ pub trait OperateModeGate:
 ///
 /// # Example
 /// ```
-/// use roqoqo::operations::{OperateSingleMode, PNRDetection};
+/// use roqoqo::operations::{OperateSingleMode, PhotonDetection};
 ///
-/// let op = PNRDetection::new(0, "ro".into(), 0);
+/// let op = PhotonDetection::new(0, "ro".into(), 0);
 /// assert_eq!(op.mode(), &0_usize);
 /// ```
 ///


Test patch:
diff --git a/.compatibility_tests/compatibility_test_1_0/Cargo.toml b/.compatibility_tests/compatibility_test_1_0/Cargo.toml
index 9557a585..e4de72ee 100644
--- a/.compatibility_tests/compatibility_test_1_0/Cargo.toml
+++ b/.compatibility_tests/compatibility_test_1_0/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "compatibility_test_1_0"
-version ="1.6.0-alpha.0"
+version ="1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -22,7 +22,7 @@ publish = false
 test_roqoqo_1_0 = {package = "roqoqo", version="=1.0.0"}
 test_roqoqo_derive_1_0 = {package = "roqoqo-derive", version="=1.0.0"}
 qoqo_calculator = { version="1.1" }
-roqoqo = {version="1.6.0-alpha.0", path="../../roqoqo", features=["serialize", "overrotate"]}
+roqoqo = {version="1.6.0-alpha.1", path="../../roqoqo", features=["serialize", "overrotate"]}
 bincode = {version="1.3"}
 ndarray = "0.15"
 
diff --git a/.compatibility_tests/compatibility_test_1_3/Cargo.toml b/.compatibility_tests/compatibility_test_1_3/Cargo.toml
index c11973e1..aff23efe 100644
--- a/.compatibility_tests/compatibility_test_1_3/Cargo.toml
+++ b/.compatibility_tests/compatibility_test_1_3/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "compatibility_test_1_3"
-version ="1.6.0-alpha.0"
+version ="1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -22,7 +22,7 @@ publish = false
 test_roqoqo_1_3 = {package = "roqoqo", version="=1.3.2"}
 test_roqoqo_derive_1_3 = {package = "roqoqo-derive", version="=1.3.2"}
 qoqo_calculator = { version="1.1" }
-roqoqo = {version="1.6.0-alpha.0", path="../../roqoqo", features=["serialize", "overrotate"]}
+roqoqo = {version="1.6.0-alpha.1", path="../../roqoqo", features=["serialize", "overrotate"]}
 bincode = {version="1.3"}
 ndarray = "0.15"
 
diff --git a/.compatibility_tests/compatibility_test_1_4/Cargo.toml b/.compatibility_tests/compatibility_test_1_4/Cargo.toml
index ef8f33ca..fececf48 100644
--- a/.compatibility_tests/compatibility_test_1_4/Cargo.toml
+++ b/.compatibility_tests/compatibility_test_1_4/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "compatibility_test_1_4"
-version ="1.6.0-alpha.0"
+version ="1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -22,7 +22,7 @@ publish = false
 test_roqoqo_1_4 = {package = "roqoqo", version="=1.4.0"}
 test_roqoqo_derive_1_4 = {package = "roqoqo-derive", version="=1.4.0"}
 qoqo_calculator = { version="1.1" }
-roqoqo = {version="1.6.0-alpha.0", path="../../roqoqo", features=["serialize", "overrotate"]}
+roqoqo = {version="1.6.0-alpha.1", path="../../roqoqo", features=["serialize", "overrotate"]}
 bincode = {version="1.3"}
 ndarray = "0.15"
 
diff --git a/.compatibility_tests/compatibility_test_1_5/Cargo.toml b/.compatibility_tests/compatibility_test_1_5/Cargo.toml
index 831b6586..0727c1d6 100644
--- a/.compatibility_tests/compatibility_test_1_5/Cargo.toml
+++ b/.compatibility_tests/compatibility_test_1_5/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "compatibility_test_1_5"
-version ="1.6.0-alpha.0"
+version ="1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -22,7 +22,7 @@ publish = false
 test_roqoqo_1_5 = {package = "roqoqo", version="=1.5.0"}
 test_roqoqo_derive_1_5 = {package = "roqoqo-derive", version="=1.5.0"}
 qoqo_calculator = { version="1.1" }
-roqoqo = {version="1.6.0-alpha.0", path="../../roqoqo", features=["serialize", "overrotate"]}
+roqoqo = {version="1.6.0-alpha.1", path="../../roqoqo", features=["serialize", "overrotate"]}
 bincode = {version="1.3"}
 ndarray = "0.15"
 
diff --git a/.compatibility_tests/compatibility_test_1_5/tests/integration/compatibility_1_5.rs b/.compatibility_tests/compatibility_test_1_5/tests/integration/compatibility_1_5.rs
index 73f7f3ec..05b0c962 100644
--- a/.compatibility_tests/compatibility_test_1_5/tests/integration/compatibility_1_5.rs
+++ b/.compatibility_tests/compatibility_test_1_5/tests/integration/compatibility_1_5.rs
@@ -104,7 +104,7 @@ use test_roqoqo_1_5;
 // #[test_case(test_roqoqo_1_6::operations::Squeezing::new(0, 0.1.into()).into(); "Squeezing")]
 // #[test_case(test_roqoqo_1_6::operations::PhaseShift::new(0, 0.1.into()).into(); "PhaseShift")]
 // #[test_case(test_roqoqo_1_6::operations::BeamSplitter::new(0, 1, 0.1.into(), 0.2.into()).into(); "BeamSplitter")]
-// #[test_case(test_roqoqo_1_6::operations::PNRDetection::new(0, "ro".into(), 0).into(); "PNRDetection")]
+// #[test_case(test_roqoqo_1_6::operations::PhotonDetection::new(0, "ro".into(), 0).into(); "PhotonDetection")]
 fn test_bincode_compatibility_1_5(operation: test_roqoqo_1_5::operations::Operation) {
     let mut test_circuit = test_roqoqo_1_5::Circuit::new();
     test_circuit += operation;
diff --git a/.compatibility_tests/compatibility_test_sim/Cargo.toml b/.compatibility_tests/compatibility_test_sim/Cargo.toml
index 015c282e..a96516e4 100644
--- a/.compatibility_tests/compatibility_test_sim/Cargo.toml
+++ b/.compatibility_tests/compatibility_test_sim/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "compatibility_test_sim"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
diff --git a/qoqo/tests/integration/operations/bosonic_operations.rs b/qoqo/tests/integration/operations/bosonic_operations.rs
index 2f5c76dd..6467a6aa 100644
--- a/qoqo/tests/integration/operations/bosonic_operations.rs
+++ b/qoqo/tests/integration/operations/bosonic_operations.rs
@@ -14,7 +14,7 @@ use pyo3::prelude::*;
 use pyo3::Python;
 use qoqo::operations::convert_operation_to_pyobject;
 use qoqo::operations::{
-    BeamSplitterWrapper, PNRDetectionWrapper, PhaseShiftWrapper, SqueezingWrapper,
+    BeamSplitterWrapper, PhaseShiftWrapper, PhotonDetectionWrapper, SqueezingWrapper,
 };
 use qoqo_calculator::Calculator;
 use qoqo_calculator::CalculatorFloat;
@@ -243,18 +243,22 @@ fn test_new_beamsplitter(
     })
 }
 
-/// Test new() function for PNRDetection
-#[test_case(Operation::from(PNRDetection::new(1, "ro".into(), 0)), (1, "ro".into(), 0,), "__eq__"; "PNRDetection_eq")]
-#[test_case(Operation::from(PNRDetection::new(1, "ro".into(), 0)), (0, "ro".into(), 0,), "__ne__"; "PNRDetection_ne")]
-fn test_new_pnrdetection(input_operation: Operation, arguments: (u32, String, u32), method: &str) {
+/// Test new() function for PhotonDetection
+#[test_case(Operation::from(PhotonDetection::new(1, "ro".into(), 0)), (1, "ro".into(), 0,), "__eq__"; "PhotonDetection_eq")]
+#[test_case(Operation::from(PhotonDetection::new(1, "ro".into(), 0)), (0, "ro".into(), 0,), "__ne__"; "PhotonDetection_ne")]
+fn test_new_photondetection(
+    input_operation: Operation,
+    arguments: (u32, String, u32),
+    method: &str,
+) {
     let operation = convert_operation_to_pyobject(input_operation).unwrap();
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
-        let operation_type = py.get_type::<PNRDetectionWrapper>();
+        let operation_type = py.get_type::<PhotonDetectionWrapper>();
         let operation_py = operation_type
             .call1(arguments)
             .unwrap()
-            .downcast::<PyCell<PNRDetectionWrapper>>()
+            .downcast::<PyCell<PhotonDetectionWrapper>>()
             .unwrap();
 
         let comparison = bool::extract(
@@ -266,13 +270,13 @@ fn test_new_pnrdetection(input_operation: Operation, arguments: (u32, String, u3
         .unwrap();
         assert!(comparison);
 
-        let def_wrapper = operation_py.extract::<PNRDetectionWrapper>().unwrap();
+        let def_wrapper = operation_py.extract::<PhotonDetectionWrapper>().unwrap();
         let new_op_diff = operation_type
             .call1((2, "ro", 0))
             .unwrap()
-            .downcast::<PyCell<PNRDetectionWrapper>>()
+            .downcast::<PyCell<PhotonDetectionWrapper>>()
             .unwrap();
-        let def_wrapper_diff = new_op_diff.extract::<PNRDetectionWrapper>().unwrap();
+        let def_wrapper_diff = new_op_diff.extract::<PhotonDetectionWrapper>().unwrap();
         let helper_ne: bool = def_wrapper_diff != def_wrapper;
         assert!(helper_ne);
         let helper_eq: bool = def_wrapper == def_wrapper.clone();
@@ -280,7 +284,7 @@ fn test_new_pnrdetection(input_operation: Operation, arguments: (u32, String, u3
 
         assert_eq!(
             format!("{:?}", def_wrapper_diff),
-            "PNRDetectionWrapper { internal: PNRDetection { mode: 2, readout: \"ro\", readout_index: 0 } }"
+            "PhotonDetectionWrapper { internal: PhotonDetection { mode: 2, readout: \"ro\", readout_index: 0 } }"
         );
 
         let comparison_copy = bool::extract(
@@ -333,7 +337,7 @@ fn test_pyo3_is_parametrized(input_operation: Operation) {
 #[test_case(Operation::from(Squeezing::new(1, CalculatorFloat::from(1.3), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(0.1))); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_is_not_parametrized(input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -351,7 +355,7 @@ fn test_pyo3_is_not_parametrized(input_operation: Operation) {
 /// Test mode() function for SingleMode Operations
 #[test_case(0, Operation::from(Squeezing::new(0, CalculatorFloat::from(0), 0.0.into())); "Squeezing")]
 #[test_case(0, Operation::from(PhaseShift::new(0, CalculatorFloat::from(0))); "PhaseShift")]
-#[test_case(0, Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(0, Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_mode(mode: usize, input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -381,7 +385,7 @@ fn test_pyo3_mode0_mode_1(mode_0: usize, mode_1: usize, input_operation: Operati
 #[test_case("Squeezing", Operation::from(Squeezing::new(0, CalculatorFloat::from(0), 0.0.into())); "Squeezing")]
 #[test_case("PhaseShift", Operation::from(PhaseShift::new(0, CalculatorFloat::from(0))); "PhaseShift")]
 #[test_case("BeamSplitter", Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0), CalculatorFloat::from(0))); "BeamSplitter")]
-#[test_case("PNRDetection", Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case("PhotonDetection", Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -421,13 +425,13 @@ fn test_pyo3_hqslang(name: &'static str, input_operation: Operation) {
         ];
     "BeamSplitter")]
 #[test_case(
-    Operation::from(PNRDetection::new(0, "ro".into(), 0)),
+    Operation::from(PhotonDetection::new(0, "ro".into(), 0)),
     vec![
         "Operation",
         "Measurement",
-        "PNRDetection",
+        "PhotonDetection",
         ];
-    "PNRDetection")]
+    "PhotonDetection")]
 fn test_pyo3_tags(input_operation: Operation, tags: Vec<&str>) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -445,7 +449,7 @@ fn test_pyo3_tags(input_operation: Operation, tags: Vec<&str>) {
 #[test_case(Operation::from(Squeezing::new(0, CalculatorFloat::from(1.3), 0.0.into())), HashSet::<usize>::from([0]); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))), HashSet::<usize>::from([0]); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(1.3))), HashSet::<usize>::from([0, 1]); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)), HashSet::<usize>::from([0]); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)), HashSet::<usize>::from([0]); "PhotonDetection")]
 fn test_pyo3_involved_modes(input_operation: Operation, modes: HashSet<usize>) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -466,7 +470,7 @@ fn test_pyo3_involved_modes(input_operation: Operation, modes: HashSet<usize>) {
 #[test_case(Operation::from(Squeezing::new(0, CalculatorFloat::from(1.3), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(1.3))); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_remapqubits(input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -499,7 +503,7 @@ fn test_pyo3_remapqubits(input_operation: Operation) {
 /// Test remap_modes() function for SingleModeGate Operations
 #[test_case(Operation::from(Squeezing::new(0, CalculatorFloat::from(1.3), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))); "PhaseShift")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_remapmodes_single(input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -561,7 +565,7 @@ fn test_pyo3_remapmodes_two(input_operation: Operation) {
 #[test_case(Operation::from(Squeezing::new(0, CalculatorFloat::from(1.3), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(1.3))); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_remapmodes_error(input_operation: Operation) {
     // preparation
     pyo3::prepare_freethreaded_python();
@@ -580,7 +584,7 @@ fn test_pyo3_remapmodes_error(input_operation: Operation) {
 #[test_case(Operation::from(Squeezing::new(1, CalculatorFloat::from(1.3), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(0, CalculatorFloat::from(1.3))); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(1.3))); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_copy_deepcopy(input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -622,9 +626,9 @@ fn test_pyo3_copy_deepcopy(input_operation: Operation) {
     Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0), CalculatorFloat::from(0)));
     "BeamSplitter")]
 #[test_case(
-    "PNRDetection { mode: 0, readout: \"ro\", readout_index: 0 }",
-    Operation::from(PNRDetection::new(0, "ro".into(), 0));
-    "PNRDetection")]
+    "PhotonDetection { mode: 0, readout: \"ro\", readout_index: 0 }",
+    Operation::from(PhotonDetection::new(0, "ro".into(), 0));
+    "PhotonDetection")]
 fn test_pyo3_format_repr(format_repr: &str, input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -748,7 +752,7 @@ fn test_pyo3_substitute_params_error(input_operation: Operation) {
 #[test_case(Operation::from(Squeezing::new(1, 0.1.into(), 0.0.into())); "Squeezing")]
 #[test_case(Operation::from(PhaseShift::new(1, 0.1.into())); "PhaseShift")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0.1), CalculatorFloat::from(0.1))); "BeamSplitter")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)); "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)); "PhotonDetection")]
 fn test_ineffective_substitute_parameters(input_operation: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
@@ -781,8 +785,8 @@ fn test_ineffective_substitute_parameters(input_operation: Operation) {
     Operation::from(BeamSplitter::new(0, 1, CalculatorFloat::from(0), CalculatorFloat::from(0))),
     Operation::from(BeamSplitter::new(1, 2, CalculatorFloat::from(0), CalculatorFloat::from(0))); "BeamSplitter")]
 #[test_case(
-    Operation::from(PNRDetection::new(0, "ro".into(), 0)),
-    Operation::from(PNRDetection::new(1, "ro".into(), 0)); "PNRDetection")]
+    Operation::from(PhotonDetection::new(0, "ro".into(), 0)),
+    Operation::from(PhotonDetection::new(1, "ro".into(), 0)); "PhotonDetection")]
 fn test_pyo3_richcmp(definition_1: Operation, definition_2: Operation) {
     pyo3::prepare_freethreaded_python();
     Python::with_gil(|py| {
diff --git a/roqoqo-test/Cargo.toml b/roqoqo-test/Cargo.toml
index 33024e99..adb1088e 100644
--- a/roqoqo-test/Cargo.toml
+++ b/roqoqo-test/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo-test"
-version = "1.6.0-alpha.0"
+version = "1.6.0-alpha.1"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
@@ -19,7 +19,7 @@ crate-type = ["rlib"]
 
 [dependencies]
 qoqo_calculator = { version="1.1" }
-roqoqo = {version="1.6.0-alpha.0", path="../roqoqo", features=["serialize"]}
+roqoqo = {version="1.6.0-alpha.1", path="../roqoqo", features=["serialize"]}
 rand = "0.8"
 nalgebra = "0.32"
 ndarray = { version = "0.15" }
diff --git a/roqoqo/tests/integration/operations/bosonic_operations.rs b/roqoqo/tests/integration/operations/bosonic_operations.rs
index aa729044..050f5d66 100644
--- a/roqoqo/tests/integration/operations/bosonic_operations.rs
+++ b/roqoqo/tests/integration/operations/bosonic_operations.rs
@@ -48,8 +48,8 @@ fn beamsplitter_inputs() {
 
 /// Test Squeezing inputs
 #[test]
-fn pnrdetection_inputs() {
-    let op = PNRDetection::new(1, "ro".into(), 0);
+fn photondetection_inputs() {
+    let op = PhotonDetection::new(1, "ro".into(), 0);
     assert_eq!(op.mode(), &1_usize);
     assert_eq!(op.readout(), &String::from("ro"));
     assert_eq!(op.readout_index(), &0_usize)
@@ -58,7 +58,7 @@ fn pnrdetection_inputs() {
 #[test_case(Operation::from(Squeezing::new(0, 0.5.into(), 0.0.into())))]
 #[test_case(Operation::from(PhaseShift::new(0, 0.5.into())))]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, 0.1.into(), 0.5.into())))]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)))]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)))]
 fn clone(op: Operation) {
     assert_eq!(op.clone(), op);
 }
@@ -66,7 +66,7 @@ fn clone(op: Operation) {
 #[test_case(Operation::from(Squeezing::new(0, 0.5.into(), 0.0.into())), "Squeezing(Squeezing { mode: 0, squeezing: Float(0.5), phase: Float(0.0) })")]
 #[test_case(Operation::from(PhaseShift::new(0, 0.5.into())), "PhaseShift(PhaseShift { mode: 0, phase: Float(0.5) })")]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, 0.1.into(), 0.5.into())), "BeamSplitter(BeamSplitter { mode_0: 0, mode_1: 1, theta: Float(0.1), phi: Float(0.5) })")]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)), "PNRDetection(PNRDetection { mode: 0, readout: \"ro\", readout_index: 0 })")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)), "PhotonDetection(PhotonDetection { mode: 0, readout: \"ro\", readout_index: 0 })")]
 fn debug(op: Operation, string: &str) {
     assert_eq!(format!("{:?}", op), string);
 }
@@ -74,7 +74,7 @@ fn debug(op: Operation, string: &str) {
 #[test_case(Operation::from(Squeezing::new(0, 0.5.into(), 0.0.into())), Operation::from(Squeezing::new(0, 0.5.into(), 0.0.into())), Operation::from(Squeezing::new(1, 0.5.into(), 0.0.into())))]
 #[test_case(Operation::from(PhaseShift::new(0, 0.5.into())), Operation::from(PhaseShift::new(0, 0.5.into())), Operation::from(PhaseShift::new(1, 0.5.into())))]
 #[test_case(Operation::from(BeamSplitter::new(0, 1, 0.1.into(), 0.5.into())), Operation::from(BeamSplitter::new(0, 1, 0.1.into(), 0.5.into())), Operation::from(BeamSplitter::new(1, 2, 0.1.into(), 0.5.into())))]
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)), Operation::from(PNRDetection::new(0, "ro".into(), 0)), Operation::from(PNRDetection::new(1, "ro".into(), 0)))]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)), Operation::from(PhotonDetection::new(0, "ro".into(), 0)), Operation::from(PhotonDetection::new(1, "ro".into(), 0)))]
 fn partial_eq(op: Operation, op_0: Operation, op_1: Operation) {
     assert!(op_0 == op);
     assert!(op == op_0);
@@ -96,7 +96,7 @@ fn involved_qubits_classical_modes(
     assert_eq!(op.involved_modes(), modes);
 }
 
-#[test_case(SingleModeOperation::from(PNRDetection::new(0, "ro".into(), 0)), InvolvedQubits::None, InvolvedClassical::Set(HashSet::from([("ro".into(), 0_usize)])), InvolvedModes::Set(HashSet::from([0_usize])))]
+#[test_case(SingleModeOperation::from(PhotonDetection::new(0, "ro".into(), 0)), InvolvedQubits::None, InvolvedClassical::Set(HashSet::from([("ro".into(), 0_usize)])), InvolvedModes::Set(HashSet::from([0_usize])))]
 fn involved_qubits_classical_modes_measurement(
     op: SingleModeOperation,
     qubits: InvolvedQubits,
@@ -133,7 +133,7 @@ fn substitute_subsitutemodes(op: ModeGateOperation, op_test: ModeGateOperation)
     assert_eq!(result, op_test);
 }
 
-#[test_case(SingleModeOperation::from(PNRDetection::new(2, "ro".into(), 0)), SingleModeOperation::from(PNRDetection::new(0, "ro".into(), 0)))]
+#[test_case(SingleModeOperation::from(PhotonDetection::new(2, "ro".into(), 0)), SingleModeOperation::from(PhotonDetection::new(0, "ro".into(), 0)))]
 fn substitute_subsitutemodes_measurement(op: SingleModeOperation, op_test: SingleModeOperation) {
     let mut mapping_test: HashMap<usize, usize> = HashMap::new();
     mapping_test.insert(0, 1);
@@ -195,7 +195,7 @@ fn operate_two_modes(op: Operation, op_param: Operation, name: &str) {
     assert!(op_param.is_parametrized());
 }
 
-#[test_case(Operation::from(PNRDetection::new(0, "ro".into(), 0)), "PNRDetection")]
+#[test_case(Operation::from(PhotonDetection::new(0, "ro".into(), 0)), "PhotonDetection")]
 fn operate_measurement(op: Operation, name: &str) {
     // (1) Test tags function
     let tags: &[&str; 3] = &["Operation", "Measurement", name];
@@ -210,7 +210,7 @@ fn operate_measurement(op: Operation, name: &str) {
 
 #[test_case(SingleModeOperation::from(Squeezing::new(0, 0.5.into(), 0.0.into())))]
 #[test_case(SingleModeOperation::from(PhaseShift::new(0, 0.5.into())))]
-#[test_case(SingleModeOperation::from(PNRDetection::new(0, "ro".into(), 0)))]
+#[test_case(SingleModeOperation::from(PhotonDetection::new(0, "ro".into(), 0)))]
 fn single_mode_op(op: SingleModeOperation) {
     assert_eq!(op.mode(), &0_usize);
 }
@@ -373,14 +373,14 @@ fn beamsplitter_serde() {
 
 #[cfg(feature = "serialize")]
 #[test]
-fn pnrdetection_serde() {
-    let op = PNRDetection::new(0, "ro".into(), 0);
+fn photondetection_serde() {
+    let op = PhotonDetection::new(0, "ro".into(), 0);
 
     assert_tokens(
         &op.clone().readable(),
         &[
             Token::Struct {
-                name: "PNRDetection",
+                name: "PhotonDetection",
                 len: 3,
             },
             Token::Str("mode"),
@@ -397,7 +397,7 @@ fn pnrdetection_serde() {
         &op.compact(),
         &[
             Token::Struct {
-                name: "PNRDetection",
+                name: "PhotonDetection",
                 len: 3,
             },
             Token::Str("mode"),
diff --git a/roqoqo/tests/integration/operations/supported_version.rs b/roqoqo/tests/integration/operations/supported_version.rs
index 5dbafe18..25f04397 100644
--- a/roqoqo/tests/integration/operations/supported_version.rs
+++ b/roqoqo/tests/integration/operations/supported_version.rs
@@ -125,7 +125,7 @@ fn test_version_1_6_0_two_mode_gate(operation: operations::TwoModeGateOperation)
     assert_eq!(op.minimum_supported_roqoqo_version(), (1, 6, 0));
 }
 
-#[test_case(operations::SingleModeOperation::from(operations::PNRDetection::new(0, "ro".into(), 1)); "PNRDetection")]
+#[test_case(operations::SingleModeOperation::from(operations::PhotonDetection::new(0, "ro".into(), 1)); "PhotonDetection")]
 fn test_version_1_6_0_measurement_mode_gate(operation: operations::SingleModeOperation) {
     assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 6, 0));
     let op = operations::Operation::try_from(operation).unwrap();