Skip to content

Commit a073417

Browse files
authored
chore: Remove TODO in test (#536)
Updates a test that was waiting for a new hugr release
1 parent 0196fdd commit a073417

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

tket2/src/circuit.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,8 @@ fn update_signature(
595595
#[cfg(test)]
596596
mod tests {
597597
use cool_asserts::assert_matches;
598+
use hugr::std_extensions::arithmetic::float_types::ConstF64;
599+
use hugr::CircuitUnit;
598600
use rstest::{fixture, rstest};
599601

600602
use hugr::types::Signature;
@@ -627,22 +629,17 @@ mod tests {
627629
.unwrap()
628630
}
629631

630-
/// 2-qubit circuit with a Hadamard, a CNOT, and a X gate.
632+
/// 2-qubit circuit with a Hadamard, a CNOT, and an Rz gate.
631633
#[fixture]
632634
fn simple_circuit() -> Circuit {
633635
build_simple_circuit(2, |circ| {
634636
circ.append(Tk2Op::H, [0])?;
635637
circ.append(Tk2Op::CX, [0, 1])?;
636-
circ.append(Tk2Op::X, [1])?;
637-
638-
// TODO: Replace the `X` with the following once Hugr adds `CircuitBuilder::add_constant`.
639-
// See https://github.com/CQCL/hugr/pull/1168
640-
641-
//let angle = circ.add_constant(ConstF64::new(0.5));
642-
//circ.append_and_consume(
643-
// Tk2Op::RzF64,
644-
// [CircuitUnit::Linear(1), CircuitUnit::Wire(angle)],
645-
//)?;
638+
let angle = circ.add_constant(ConstF64::new(0.5));
639+
circ.append_and_consume(
640+
Tk2Op::RzF64,
641+
[CircuitUnit::Linear(1), CircuitUnit::Wire(angle)],
642+
)?;
646643
Ok(())
647644
})
648645
.unwrap()

0 commit comments

Comments
 (0)