Skip to content

Commit

Permalink
Merge branch main into bench
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Bot committed Jan 20, 2025
2 parents d687229 + 2bfbc2a commit fc6339c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ path = "src/lib.rs"
[dependencies]
bimap = "0.6.2"
bitvec = "1.0.1"
portgraph = { git = "https://github.com/CQCL/portgraph", rev = "b6e266c45f82fc378ad0ff3365a1f02b88d91693", features = [
"petgraph",
], optional = true }
portgraph = { version = "0.13", features = ["petgraph"], optional = true }
serde = { version = "1.0.152", features = ["derive"], optional = true }
smallvec = "1.10.0"
itertools = "0.10.5"
Expand Down Expand Up @@ -71,8 +69,7 @@ auto_enums = "0.8.6"

[dev-dependencies.portgraph]
features = ["proptest", "serde"]
git = "https://github.com/CQCL/portgraph"
rev = "b6e266c45f82fc378ad0ff3365a1f02b88d91693"
version = "*"

[profile.dev.package]
insta.opt-level = 3
Expand Down
4 changes: 2 additions & 2 deletions src/concrete.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Example implementations for various data types.
pub mod matrix;
// #[cfg(feature = "portgraph")]
// pub mod portgraph;
#[cfg(feature = "portgraph")]
pub mod portgraph;
pub mod string;
8 changes: 4 additions & 4 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#[cfg(feature = "portgraph")]
pub(crate) mod portgraph;
// #[cfg(all(feature = "portgraph", feature = "proptest"))]
// pub mod test;
#[cfg(all(feature = "portgraph", feature = "proptest"))]
pub mod test;

use itertools::Itertools;
// #[cfg(all(feature = "portgraph", feature = "proptest"))]
// pub use test::gen_portgraph_connected;
#[cfg(all(feature = "portgraph", feature = "proptest"))]
pub use test::gen_portgraph_connected;

/// Sort a vector and return a vector of pairs of the original value and its position.
#[allow(dead_code)]
Expand Down
22 changes: 0 additions & 22 deletions src/utils/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,8 @@ impl<S: BindMap<Key = PGIndexKey, Value = NodeIndex>> From<PatternMatch<S>> for
}
}

// pub(crate) fn graph() -> PortGraph {
// let mut g = PortGraph::new();
// let v0 = g.add_node(2, 2);
// let v1 = g.add_node(2, 3);
// let vlol = g.add_node(3, 4);
// let v2 = g.add_node(2, 1);
// let v3 = g.add_node(2, 2);
// let v0_out0 = g.port_index(v0, PortOffset::new_outgoing(0)).unwrap();
// let v1_out1 = g.port_index(v1, PortOffset::new_outgoing(1)).unwrap();
// let v2_in0 = g.port_index(v2, PortOffset::new_incoming(0)).unwrap();
// let v2_in1 = g.port_index(v2, PortOffset::new_incoming(1)).unwrap();
// let v2_out0 = g.port_index(v2, PortOffset::new_outgoing(0)).unwrap();
// let v3_in1 = g.port_index(v3, PortOffset::new_incoming(1)).unwrap();
// g.link_ports(v0_out0, v2_in1).unwrap();
// g.link_ports(v1_out1, v2_in0).unwrap();
// g.link_ports(v2_out0, v3_in1).unwrap();
// g.remove_node(vlol);
// g
// }

#[cfg(feature = "proptest")]
pub use self::proptests::*;

#[cfg(feature = "proptest")]
mod proptests {
use super::*;
use portgraph::proptest::{gen_multiportgraph, gen_portgraph};
Expand Down

0 comments on commit fc6339c

Please sign in to comment.