Repository: HQSquantumsimulations/qoqo (language: python)

Issue:
qoqo Circuit from_ methods are not classmethods
from_json and from_bincode in qoqo.Circuit are not implemeted as classmethods.

We need to change that so we can call `Circuit.from_json(...)` directly


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 42daeb51..4a22e882 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,9 +2,13 @@
 
 This changelog track changes to the qoqo project starting at version v0.5.0
 
+## 1.1.0-beta.6
+
+* Fixed github pipeline deploy
+
 ## 1.1.0-beta.5
 
-* Fixed github pipelines
+* Fixed github pipeline deploy qoqo coverage
 
 ## 1.1.0-beta.4
 
diff --git a/Cargo.lock b/Cargo.lock
index 22ccd230..4cdaa7c5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -550,7 +550,7 @@ dependencies = [
 
 [[package]]
 name = "qoqo"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
  "bincode",
  "nalgebra",
@@ -564,7 +564,7 @@ dependencies = [
  "qoqo_calculator",
  "qoqo_calculator_pyo3",
  "quote",
- "roqoqo 1.1.0-beta.5",
+ "roqoqo 1.1.0-beta.6",
  "serde",
  "serde_json",
  "syn",
@@ -574,7 +574,7 @@ dependencies = [
 
 [[package]]
 name = "qoqo-macros"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -692,7 +692,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
  "async-trait",
  "bincode",
@@ -709,7 +709,7 @@ dependencies = [
  "rand_distr",
  "roqoqo 1.0.0",
  "roqoqo-derive 1.0.0",
- "roqoqo-derive 1.1.0-beta.5",
+ "roqoqo-derive 1.1.0-beta.6",
  "serde",
  "serde_json",
  "serde_test",
@@ -732,7 +732,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo-derive"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -741,7 +741,7 @@ dependencies = [
 
 [[package]]
 name = "roqoqo-test"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
  "nalgebra",
  "ndarray",
@@ -749,7 +749,7 @@ dependencies = [
  "qoqo_calculator",
  "quote",
  "rand",
- "roqoqo 1.1.0-beta.5",
+ "roqoqo 1.1.0-beta.6",
  "syn",
 ]
 
diff --git a/qoqo-macros/Cargo.toml b/qoqo-macros/Cargo.toml
index dac5cc2a..c30f7c0f 100644
--- a/qoqo-macros/Cargo.toml
+++ b/qoqo-macros/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "qoqo-macros"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 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 c1c0b574..4405e457 100644
--- a/qoqo/Cargo.toml
+++ b/qoqo/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "qoqo"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 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.1.0-beta.5", path="../qoqo-macros"}
-roqoqo = {version="1.1.0-beta.5", path="../roqoqo", features=["serialize", "overrotate"]}
+qoqo-macros = {version="1.1.0-beta.6", path="../qoqo-macros"}
+roqoqo = {version="1.1.0-beta.6", path="../roqoqo", features=["serialize", "overrotate"]}
 numpy = "0.17"
 bincode = "1.3"
 serde_json = "1.0"
diff --git a/qoqo/pyproject.toml b/qoqo/pyproject.toml
index 85d17f7b..1766eaa1 100644
--- a/qoqo/pyproject.toml
+++ b/qoqo/pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "qoqo"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 dependencies = [
   'numpy',
   'qoqo_calculator_pyo3>=1.1.0',
diff --git a/qoqo/qoqo/DEPENDENCIES b/qoqo/qoqo/DEPENDENCIES
index 6478302f..161b2c86 100644
--- a/qoqo/qoqo/DEPENDENCIES
+++ b/qoqo/qoqo/DEPENDENCIES
@@ -8777,7 +8777,7 @@ LICENSE:
 
 
 ====================================================
-qoqo 1.1.0-beta.5
+qoqo 1.1.0-beta.6
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Quantum computing circuit toolkit. Python interface of roqoqo
@@ -8989,7 +8989,7 @@ LICENSE:
 
 
 ====================================================
-qoqo-macros 1.1.0-beta.5
+qoqo-macros 1.1.0-beta.6
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Macros for the qoqo crate
 License: Apache-2.0
@@ -11273,7 +11273,7 @@ LICENSE:
 
 
 ====================================================
-roqoqo 1.1.0-beta.5
+roqoqo 1.1.0-beta.6
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Rust Quantum Computing Toolkit by HQS
@@ -11696,7 +11696,7 @@ LICENSE:
 
 
 ====================================================
-roqoqo-derive 1.1.0-beta.5
+roqoqo-derive 1.1.0-beta.6
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Macros for the roqoqo crate
 License: Apache-2.0
@@ -11907,7 +11907,7 @@ LICENSE:
 
 
 ====================================================
-roqoqo-test 1.1.0-beta.5
+roqoqo-test 1.1.0-beta.6
 https://github.com/HQSquantumsimulations/qoqo
 by HQS Quantum Simulations <info@quantumsimulations.de>
 Testing helper functions for roqoqo toolkit
diff --git a/roqoqo-derive/Cargo.toml b/roqoqo-derive/Cargo.toml
index 345f3011..ed674a3a 100644
--- a/roqoqo-derive/Cargo.toml
+++ b/roqoqo-derive/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo-derive"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 authors = ["HQS Quantum Simulations <info@quantumsimulations.de>"]
 license = "Apache-2.0"
 edition = "2021"
diff --git a/roqoqo/Cargo.toml b/roqoqo/Cargo.toml
index 8da6e82c..e19ca48a 100644
--- a/roqoqo/Cargo.toml
+++ b/roqoqo/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 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.1.0-beta.5", path="../roqoqo-derive"}
+roqoqo-derive = {version="1.1.0-beta.6", path="../roqoqo-derive"}
 typetag = {version="0.2", optional=true}
 nalgebra = "0.31"
 # schemars = { version="0.8", features = ["num-complex", "ndarray"], optional=true }
@@ -43,8 +43,8 @@ petgraph = {version = "0.6.2", optional=true}
 serde_test = "1.0"
 test-case = "2.0"
 serde_json = "1.0"
-test_roqoqo_derive_1_0 = {package= "roqoqo-derive", version="1.0.0"}
-test_qoqo_1_0 = {package= "roqoqo", version="1.0.0"}
+test_roqoqo_derive_1_0 = {package= "roqoqo-derive", version="=1.0.0"}
+test_roqoqo_1_0 = {package= "roqoqo", version="=1.0.0"}
 bincode = {version="1.3", optional=false}
 
 [build-dependencies]


Test patch:
diff --git a/roqoqo-test/Cargo.toml b/roqoqo-test/Cargo.toml
index dfa4225c..a75d072f 100644
--- a/roqoqo-test/Cargo.toml
+++ b/roqoqo-test/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "roqoqo-test"
-version = "1.1.0-beta.5"
+version = "1.1.0-beta.6"
 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.1.0-beta.5", path="../roqoqo", features=["serialize"]}
+roqoqo = {version="1.1.0-beta.6", path="../roqoqo", features=["serialize"]}
 rand = "0.8"
 nalgebra = "0.31"
 ndarray = { version = "0.15" }
diff --git a/roqoqo/tests/integration/compatability.rs b/roqoqo/tests/integration/compatability.rs
index 56ee7a7a..6b407e40 100644
--- a/roqoqo/tests/integration/compatability.rs
+++ b/roqoqo/tests/integration/compatability.rs
@@ -10,26 +10,30 @@
 // express or implied. See the License for the specific language governing permissions and
 // limitations under the License.
 
-use bincode;
-use roqoqo;
+// use bincode;
+// use roqoqo;
+#[cfg(feature = "serialize")]
 use test_case::test_case;
-use test_qoqo_1_0;
+// use test_roqoqo_1_0;
 
-#[test_case(test_qoqo_1_0::operations::Hadamard::new(0).into(); "Hadamard")]
-#[test_case(test_qoqo_1_0::operations::ControlledPhaseShift::new(0,1, 0.1.into()).into(); "ControlledPhase")]
-#[test_case(test_qoqo_1_0::operations::VariableMSXX::new(0,1, 0.1.into()).into(); "VariableMSXX")]
 #[cfg(feature = "serialize")]
-fn test_bincode_compatability(operation: test_qoqo_1_0::operations::Operation) {
-    let mut test_circuit = test_qoqo_1_0::Circuit::new();
+#[test_case(test_roqoqo_1_0::operations::Hadamard::new(0).into(); "Hadamard")]
+#[cfg(feature = "serialize")]
+#[test_case(test_roqoqo_1_0::operations::ControlledPhaseShift::new(0,1, 0.1.into()).into(); "ControlledPhase")]
+#[cfg(feature = "serialize")]
+#[test_case(test_roqoqo_1_0::operations::VariableMSXX::new(0,1, 0.1.into()).into(); "VariableMSXX")]
+#[cfg(feature = "serialize")]
+fn test_bincode_compatability(operation: test_roqoqo_1_0::operations::Operation) {
+    let mut test_circuit = test_roqoqo_1_0::Circuit::new();
     test_circuit += operation;
 
-    let test_measurement_input = test_qoqo_1_0::measurements::PauliZProductInput::new(3, false);
-    let test_measurement = test_qoqo_1_0::measurements::PauliZProduct {
+    let test_measurement_input = test_roqoqo_1_0::measurements::PauliZProductInput::new(3, false);
+    let test_measurement = test_roqoqo_1_0::measurements::PauliZProduct {
         constant_circuit: Some(test_circuit.clone()),
         circuits: vec![test_circuit],
         input: test_measurement_input,
     };
-    let test_program = test_qoqo_1_0::QuantumProgram::PauliZProduct {
+    let test_program = test_roqoqo_1_0::QuantumProgram::PauliZProduct {
         measurement: test_measurement,
         input_parameter_names: vec!["test".to_string()],
     };