Skip to content

Commit

Permalink
Trying to fix deploy pipeline (#446)
Browse files Browse the repository at this point in the history
* Updated version number to prepare for next release

* Trying to update

* Fixing build

* Adding compatibility to pipeline

* Fixed cargo.toml

* Trying to fix pipeline

* Unstaging issues

* Reverting Implemented in 1_2

* Fixed typo

* Updated copyright year

* Added unittests for errors in devices

* Updating stack

* Updated version

* Fixed notebook link

* Fixed a clippy error

* Updated cargo.lock and simplified gitignore

* Fixed updated clippy test

* Updated dependencies

* Removed freehead pyo3 form source code

* updated version

* Updated with cargo update

* Fixed gitignore according to comments

* Fixing deploy pipeline

* Trying to fix pipeline
  • Loading branch information
kbarkhqs authored Feb 1, 2023
1 parent c2200ba commit 2148576
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- run: |
cd roqoqo
cargo llvm-cov --no-default-features --lcov --output-path lcov_roqoqo.info
cargo llvm-cov --no-default-features --lcov --output-path lcov_roqoqo.info --features="circuitdag"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This changelog track changes to the qoqo project starting at version v0.5.0

## 1.2.1
## 1.2.2

* Removed references to `pyo3::prepare_freethreaded_python();` outside of tests

Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions compatibility_test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "compatibility_test"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
Expand All @@ -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.2.1", path="../roqoqo", features=["serialize", "overrotate"]}
roqoqo = {version="1.2.2", path="../roqoqo", features=["serialize", "overrotate"]}
bincode = {version="1.3"}

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion qoqo-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qoqo-macros"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
readme = "../README.md"
Expand Down
6 changes: 3 additions & 3 deletions qoqo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qoqo"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
homepage = "https://github.com/HQSquantumsimulations/qoqo"
Expand Down Expand Up @@ -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.2.1", path="../qoqo-macros"}
roqoqo = {version="1.2.1", path="../roqoqo", features=["serialize", "overrotate"]}
qoqo-macros = {version="1.2.2", path="../qoqo-macros"}
roqoqo = {version="1.2.2", path="../roqoqo", features=["serialize", "overrotate"]}
numpy = "0.17"
bincode = "1.3"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion qoqo/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "qoqo"
version = "1.2.1"
version = "1.2.2"
dependencies = [
'numpy',
'qoqo_calculator_pyo3>=1.1',
Expand Down
10 changes: 5 additions & 5 deletions qoqo/qoqo/DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -8723,7 +8723,7 @@ LICENSE:


====================================================
qoqo 1.2.1
qoqo 1.2.2
https://github.com/HQSquantumsimulations/qoqo
by HQS Quantum Simulations <[email protected]>
Quantum computing circuit toolkit. Python interface of roqoqo
Expand Down Expand Up @@ -8935,7 +8935,7 @@ LICENSE:


====================================================
qoqo-macros 1.2.1
qoqo-macros 1.2.2
by HQS Quantum Simulations <[email protected]>
Macros for the qoqo crate
License: Apache-2.0
Expand Down Expand Up @@ -11005,7 +11005,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


====================================================
roqoqo 1.2.1
roqoqo 1.2.2
https://github.com/HQSquantumsimulations/qoqo
by HQS Quantum Simulations <[email protected]>
Rust Quantum Computing Toolkit by HQS
Expand Down Expand Up @@ -11217,7 +11217,7 @@ LICENSE:


====================================================
roqoqo-derive 1.2.1
roqoqo-derive 1.2.2
by HQS Quantum Simulations <[email protected]>
Macros for the roqoqo crate
License: Apache-2.0
Expand Down Expand Up @@ -11428,7 +11428,7 @@ LICENSE:


====================================================
roqoqo-test 1.2.1
roqoqo-test 1.2.2
https://github.com/HQSquantumsimulations/qoqo
by HQS Quantum Simulations <[email protected]>
Testing helper functions for roqoqo toolkit
Expand Down
2 changes: 1 addition & 1 deletion roqoqo-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "roqoqo-derive"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions roqoqo-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "roqoqo-test"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
Expand All @@ -19,7 +19,7 @@ crate-type = ["rlib"]

[dependencies]
qoqo_calculator = { version="1.1" }
roqoqo = {version="1.2.1", path="../roqoqo", features=["serialize"]}
roqoqo = {version="1.2.2", path="../roqoqo", features=["serialize"]}
rand = "0.8"
nalgebra = "0.31"
ndarray = { version = "0.15" }
Expand Down
4 changes: 2 additions & 2 deletions roqoqo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "roqoqo"
version = "1.2.1"
version = "1.2.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
Expand Down Expand Up @@ -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.2.1", path="../roqoqo-derive"}
roqoqo-derive = {version="1.2.2", path="../roqoqo-derive"}
typetag = {version="0.2", optional=true}
nalgebra = "0.31"
# schemars = { version="0.8", features = ["num-complex", "ndarray"], optional=true }
Expand Down
3 changes: 2 additions & 1 deletion roqoqo/src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::operations::{
use crate::operations::{Rotate, Rotation};
use crate::RoqoqoError;
use crate::RoqoqoVersion;
#[cfg(feature = "serialize")]
use crate::RoqoqoVersionSerializable;
use qoqo_calculator::Calculator;
#[cfg(feature = "overrotate")]
Expand Down Expand Up @@ -854,7 +855,7 @@ impl Iterator for OperationIterator {
}
}

impl crate::operations::SupportedVersion for Circuit {
impl SupportedVersion for Circuit {
fn minimum_supported_roqoqo_version(&self) -> (u32, u32, u32) {
let mut current_minimum_version = (1, 0, 0);
for op in self.iter() {
Expand Down
2 changes: 2 additions & 0 deletions roqoqo/src/circuitdag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct CircuitDagSerializable {
_roqoqo_version: RoqoqoVersionSerializable,
}

#[cfg(feature = "serialize")]
impl TryFrom<CircuitDagSerializable> for CircuitDag {
type Error = RoqoqoError;
fn try_from(value: CircuitDagSerializable) -> Result<Self, Self::Error> {
Expand All @@ -105,6 +106,7 @@ impl TryFrom<CircuitDagSerializable> for CircuitDag {
}
}

#[cfg(feature = "serialize")]
impl From<CircuitDag> for CircuitDagSerializable {
fn from(value: CircuitDag) -> Self {
let min_version = value.minimum_supported_roqoqo_version();
Expand Down
18 changes: 9 additions & 9 deletions roqoqo/tests/integration/operations/supported_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ use test_case::test_case;
#[test_case(operations::TwoQubitGateOperation::from(operations::PhaseShiftedControlledZ::new(1,0, 3.0.into())); "PhaseShifterControlledZ")]
fn test_version_1_0_0_two_qubit_gate(operation: operations::TwoQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 0, 0));
let op = operations::Operation::try_from(operation.clone()).unwrap();
let op = operations::Operation::try_from(operation).unwrap();
assert_eq!(op.minimum_supported_roqoqo_version(), (1, 0, 0));
}

#[test_case(operations::TwoQubitGateOperation::from(operations::PhaseShiftedControlledPhase::new(1,0, 3.0.into(), 2.0.into())); "PhaseShiftedControlledPhase")]
fn test_version_1_2_0_two_qubit_gate(operation: operations::TwoQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 2, 0));
let op = operations::Operation::try_from(operation.clone()).unwrap();
let op = operations::Operation::try_from(operation).unwrap();
assert_eq!(op.minimum_supported_roqoqo_version(), (1, 2, 0));
}

Expand All @@ -74,14 +74,14 @@ fn test_version_1_2_0_two_qubit_gate(operation: operations::TwoQubitGateOperatio
#[test_case(operations::SingleQubitGateOperation::from(operations::SingleQubitGate::new(0,0.5.into(), 0.5.into(), 0.5.into(), 0.5.into(), 0.5.into()));"SingleQubitGate")]
fn test_version_1_0_0_single_qubit_gate(operation: operations::SingleQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 0, 0));
let op = operations::Operation::try_from(operation.clone()).unwrap();
let op = operations::Operation::try_from(operation).unwrap();
assert_eq!(op.minimum_supported_roqoqo_version(), (1, 0, 0));
}

#[test_case(operations::MultiQubitGateOperation::from(operations::MultiQubitMS::new(vec![0,1,2,3], 1.0.into())); "MultiQubitMS")]
fn test_version_1_0_0_multi_qubit_gate(operation: operations::MultiQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 0, 0));
let op = operations::Operation::try_from(operation.clone()).unwrap();
let op = operations::Operation::try_from(operation).unwrap();
assert_eq!(op.minimum_supported_roqoqo_version(), (1, 0, 0));
}

Expand Down Expand Up @@ -150,7 +150,7 @@ fn test_version_circuit(circuit: roqoqo::Circuit, version: (u32, u32, u32)) {
assert_eq!(measurement.minimum_supported_roqoqo_version(), version);

let program = QuantumProgram::PauliZProduct {
measurement: measurement,
measurement,
input_parameter_names: vec![],
};
assert_eq!(program.minimum_supported_roqoqo_version(), version);
Expand All @@ -170,7 +170,7 @@ fn test_version_circuit(circuit: roqoqo::Circuit, version: (u32, u32, u32)) {
assert_eq!(measurement.minimum_supported_roqoqo_version(), version);

let program = QuantumProgram::CheatedPauliZProduct {
measurement: measurement,
measurement,
input_parameter_names: vec![],
};
assert_eq!(program.minimum_supported_roqoqo_version(), version);
Expand All @@ -190,7 +190,7 @@ fn test_version_circuit(circuit: roqoqo::Circuit, version: (u32, u32, u32)) {
assert_eq!(measurement.minimum_supported_roqoqo_version(), version);

let program = QuantumProgram::Cheated {
measurement: measurement,
measurement,
input_parameter_names: vec![],
};
assert_eq!(program.minimum_supported_roqoqo_version(), version);
Expand All @@ -202,12 +202,12 @@ fn test_version_circuit(circuit: roqoqo::Circuit, version: (u32, u32, u32)) {
assert_eq!(measurement.minimum_supported_roqoqo_version(), version);
let measurement = ClassicalRegister {
constant_circuit: None,
circuits: vec![circuit.clone()],
circuits: vec![circuit],
};
assert_eq!(measurement.minimum_supported_roqoqo_version(), version);

let program = QuantumProgram::ClassicalRegister {
measurement: measurement,
measurement,
input_parameter_names: vec![],
};
assert_eq!(program.minimum_supported_roqoqo_version(), version);
Expand Down

0 comments on commit 2148576

Please sign in to comment.