Skip to content

Commit 6e42675

Browse files
committed
Actually compile the wire tracker module
1 parent 5e26e5c commit 6e42675

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

tket/src/serialize/pytket/decoder.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22
33
mod op;
44
mod param;
5+
mod tracked_elem;
6+
mod wires;
57

68
#[expect(
79
unused_imports,
810
reason = "Temporarily unused while we refactor the pytket decoder"
911
)]
1012
pub use param::{LoadedParameter, LoadedParameterType};
13+
pub use tracked_elem::{TrackedBit, TrackedQubit};
14+
#[expect(
15+
unused_imports,
16+
reason = "Temporarily unused while we refactor the pytket decoder"
17+
)]
18+
pub use wires::{TrackedWires, WireData, WireTracker};
1119

1220
use std::collections::{HashMap, HashSet};
1321

@@ -19,6 +27,7 @@ use hugr::ops::{OpType, Value};
1927
use hugr::std_extensions::arithmetic::float_types::ConstF64;
2028
use hugr::types::Signature;
2129
use hugr::{Hugr, Wire};
30+
use tracked_elem::{TrackedBitId, TrackedQubitId};
2231

2332
use indexmap::IndexMap;
2433
use itertools::{EitherOrBoth, Itertools};

tket/src/serialize/pytket/decoder/param.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ impl LoadedParameter {
4848
}
4949

5050
/// Returns the hugr type for the parameter.
51-
#[expect(
52-
dead_code,
53-
reason = "Temporarily unused while we refactor the pytket decoder"
54-
)]
5551
pub fn wire_type(&self) -> &Type {
5652
static FLOAT_TYPE: LazyLock<Type> = LazyLock::new(float64_type);
5753
static ROTATION_TYPE: LazyLock<Type> = LazyLock::new(rotation_type);

tket/src/serialize/pytket/decoder/tracked_elem.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
//! Pytket qubit and bit elements that we track during decoding.
2+
#![allow(
3+
dead_code,
4+
reason = "Temporarily unused while we refactor the pytket decoder"
5+
)]
26

37
use std::sync::{Arc, LazyLock};
48

tket/src/serialize/pytket/decoder/wires.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
//! Structures to keep track of pytket [`ElementId`][tket_json_rs::register::ElementId]s and
22
//! their correspondence to wires in the hugr being defined.
3+
#![expect(
4+
dead_code,
5+
reason = "Temporarily unused while we refactor the pytket decoder"
6+
)]
37

48
use std::collections::VecDeque;
59
use std::sync::Arc;
@@ -763,7 +767,6 @@ fn check_register(register: &PytketRegister) -> Result<(), Tk1DecodeError> {
763767
#[cfg(test)]
764768
mod tests {
765769
use super::*;
766-
use crate::serialize::pytket::decoder::Tk1DecodeError;
767770
use hugr::extension::prelude::{bool_t, qb_t};
768771
use hugr::types::SumType;
769772
use hugr::Node;

0 commit comments

Comments
 (0)