diff --git a/Cargo.lock b/Cargo.lock index 6a4649cf..517e6a95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -923,7 +923,8 @@ dependencies = [ [[package]] name = "hugr" version = "0.14.3" -source = "git+https://github.com/CQCL/hugr?branch=doug/un-non-local#cd2348d576a7d45ff576677a3a7d262273f100d3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e8fb919d87dd5b9c1ba077a289c765b6e184c832768fb4a5dc9e1e05793564" dependencies = [ "hugr-core", "hugr-passes", @@ -932,7 +933,8 @@ dependencies = [ [[package]] name = "hugr-cli" version = "0.14.3" -source = "git+https://github.com/CQCL/hugr?branch=doug/un-non-local#cd2348d576a7d45ff576677a3a7d262273f100d3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "207ce216fc76a3f2e56bb27483502468d6b8758e6c7a8a777cdf8d64459043cf" dependencies = [ "clap", "clap-verbosity-flag", @@ -945,7 +947,8 @@ dependencies = [ [[package]] name = "hugr-core" version = "0.14.3" -source = "git+https://github.com/CQCL/hugr?branch=doug/un-non-local#cd2348d576a7d45ff576677a3a7d262273f100d3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79da6020b18a6c63bd81acb9b86370820ba63062519b9d10ed75a0561f3143d1" dependencies = [ "bitvec", "bumpalo", @@ -977,10 +980,10 @@ dependencies = [ [[package]] name = "hugr-passes" version = "0.14.3" -source = "git+https://github.com/CQCL/hugr?branch=doug/un-non-local#cd2348d576a7d45ff576677a3a7d262273f100d3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86dff9354c0133cddd4f9060af2f4ec531dc479c1a65ed5474785f5b39478422" dependencies = [ "ascent", - "derive_more 1.0.0", "hugr-core", "itertools 0.14.0", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index eb9fe593..ab8c62b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,10 +26,10 @@ missing_docs = "warn" [patch.crates-io] # Uncomment to use unreleased versions of hugr -hugr = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"} -hugr-core = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"} -hugr-passes = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"} -hugr-cli = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"} +# hugr = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" } +# hugr-core = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" } +# hugr-passes = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" } +# hugr-cli = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" } # hugr-model = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" } # portgraph = { git = "https://github.com/CQCL/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" } diff --git a/devenv.lock b/devenv.lock index 216137da..7b0123a1 100644 --- a/devenv.lock +++ b/devenv.lock @@ -51,31 +51,10 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737465171, - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ - "git-hooks", + "pre-commit-hooks", "nixpkgs" ] }, @@ -122,16 +101,34 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735882644, + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "devenv": "devenv", "fenix": "fenix", - "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", "nixpkgs-2305": "nixpkgs-2305", - "pre-commit-hooks": [ - "git-hooks" - ] + "pre-commit-hooks": "pre-commit-hooks" } }, "rust-analyzer-src": { diff --git a/tket2-hseries/src/lib.rs b/tket2-hseries/src/lib.rs index 4df394b5..c378f888 100644 --- a/tket2-hseries/src/lib.rs +++ b/tket2-hseries/src/lib.rs @@ -4,7 +4,10 @@ use derive_more::{Display, Error, From}; use hugr::{ algorithms::{ - const_fold::{ConstFoldError, ConstantFoldPass}, force_order, non_local::{NonLocalEdgesError, UnNonLocalPass}, validation::{ValidatePassError, ValidationLevel}, MonomorphizeError, MonomorphizePass, RemoveDeadFuncsError, RemoveDeadFuncsPass + const_fold::{ConstFoldError, ConstantFoldPass}, + force_order, + validation::{ValidatePassError, ValidationLevel}, + MonomorphizeError, MonomorphizePass, RemoveDeadFuncsError, RemoveDeadFuncsPass, }, hugr::HugrError, Hugr, HugrView, @@ -34,7 +37,6 @@ pub struct QSystemPass { monomorphize: bool, force_order: bool, lazify: bool, - unnonlocal: bool, } impl Default for QSystemPass { @@ -45,7 +47,6 @@ impl Default for QSystemPass { monomorphize: true, force_order: true, lazify: true, - unnonlocal: true, } } } @@ -71,8 +72,6 @@ pub enum QSystemPassError { /// /// [RemoveDeadFuncsPass]: hugr::algorithms::RemoveDeadFuncsError DCEError(RemoveDeadFuncsError), - /// TODO docs - UnNonLocalError(NonLocalEdgesError), /// No [FuncDefn] named "main" in [Module]. /// /// [FuncDefn]: hugr::ops::FuncDefn @@ -85,10 +84,6 @@ impl QSystemPass { /// Run `QSystemPass` on the given [Hugr]. `registry` is used for /// validation, if enabled. pub fn run(&self, hugr: &mut Hugr) -> Result<(), QSystemPassError> { - if self.unnonlocal { - self.unnonlocal().run(hugr)?; - } - if self.monomorphize { self.monomorphization().run(hugr)?; @@ -177,12 +172,6 @@ impl QSystemPass { MonomorphizePass::default().validation_level(self.validation_level) } - fn unnonlocal(&self) -> UnNonLocalPass { - UnNonLocalPass::default().validation_level(self.validation_level) - } - - - /// Returns a new `QSystemPass` with the given [ValidationLevel]. pub fn with_validation_level(mut self, level: ValidationLevel) -> Self { self.validation_level = level; @@ -229,14 +218,6 @@ impl QSystemPass { self.lazify = lazify; self } - - /// TODO docs - pub fn with_unnonlocal(self, unnonlocal: bool) -> Self { - Self { - unnonlocal, - ..self - } - } } #[cfg(test)]