Skip to content

Commit

Permalink
refactor!: remove quantum extension (#670)
Browse files Browse the repository at this point in the history
move test operations to test-only extension


BREAKING_CHANGES: angle types now moved to CQCL/tket2 repo
CQCL/tket2#231
Closes #646
  • Loading branch information
ss2165 authored Nov 9, 2023
1 parent d0499ad commit cf933f6
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 379 deletions.
2 changes: 1 addition & 1 deletion src/builder/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ mod test {
},
extension::prelude::BOOL_T,
ops::{custom::OpaqueOp, LeafOp},
std_extensions::quantum::test::{cx_gate, h_gate, measure},
type_row,
types::FunctionType,
utils::test_quantum_extension::{cx_gate, h_gate, measure},
};

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/builder/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ pub(crate) mod test {
use crate::ops::{handle::NodeHandle, LeafOp, OpTag};

use crate::std_extensions::logic::test::and_op;
use crate::std_extensions::quantum::test::h_gate;
use crate::types::Type;
use crate::utils::test_quantum_extension::h_gate;
use crate::{
builder::{
test::{n_identity, BIT, NAT, QB},
Expand Down
2 changes: 1 addition & 1 deletion src/hugr/rewrite/simple_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ pub(in crate::hugr::rewrite) mod test {
use crate::ops::OpTag;
use crate::ops::{OpTrait, OpType};
use crate::std_extensions::logic::test::and_op;
use crate::std_extensions::quantum::test::{cx_gate, h_gate};
use crate::type_row;
use crate::types::{FunctionType, Type};
use crate::utils::test_quantum_extension::{cx_gate, h_gate};
use crate::{IncomingPort, Node};

use super::SimpleReplacement;
Expand Down
2 changes: 1 addition & 1 deletion src/hugr/views/descendants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ pub(super) mod test {
use crate::{
builder::{Container, Dataflow, DataflowSubContainer, HugrBuilder, ModuleBuilder},
ops::handle::NodeHandle,
std_extensions::quantum::test::h_gate,
type_row,
types::{FunctionType, Type},
utils::test_quantum_extension::h_gate,
};

use super::*;
Expand Down
6 changes: 2 additions & 4 deletions src/hugr/views/sibling_subgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ mod tests {
use cool_asserts::assert_matches;

use crate::extension::PRELUDE_REGISTRY;
use crate::utils::test_quantum_extension::cx_gate;
use crate::{
builder::{
BuildError, DFGBuilder, Dataflow, DataflowHugr, DataflowSubContainer, HugrBuilder,
Expand All @@ -696,10 +697,7 @@ mod tests {
handle::{DfgID, FuncID, NodeHandle},
OpType,
},
std_extensions::{
logic::test::{and_op, not_op},
quantum::test::cx_gate,
},
std_extensions::logic::test::{and_op, not_op},
type_row,
};

Expand Down
2 changes: 1 addition & 1 deletion src/hugr/views/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::{
builder::{BuildError, DFGBuilder, Dataflow, DataflowHugr},
extension::prelude::QB_T,
ops::handle::NodeHandle,
std_extensions::quantum::test::cx_gate,
type_row,
types::FunctionType,
utils::test_quantum_extension::cx_gate,
HugrView,
};

Expand Down
1 change: 0 additions & 1 deletion src/std_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
pub mod arithmetic;
pub mod collections;
pub mod logic;
pub mod quantum;
Loading

0 comments on commit cf933f6

Please sign in to comment.