use crate::instruction::Instruction;
#[derive(Clone)]
pub struct Circuit<'a> {
pub ins: Vec<Instruction<'a>>,
pub n: usize,
}
impl<'a> Circuit<'a> {
pub fn stitch(&self, other: &Self) -> Self {
Self {
ins: self.ins.iter().chain(other.ins.iter()).cloned().collect(),
n: self.n.max(other.n),
}
}
}