Skip to content

Commit

Permalink
Merge branch 'main' into move-equivalence
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss authored Jul 12, 2024
2 parents 82a456e + 2a2b806 commit 41764f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions crates/circuit/src/circuit_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,4 +1167,9 @@ impl CircuitData {
py_op: RefCell::new(inst.py_op.clone()),
})
}

/// Returns an iterator over all the instructions present in the circuit.
pub fn iter(&self) -> impl Iterator<Item = &PackedInstruction> {
self.data.iter()
}
}
2 changes: 1 addition & 1 deletion crates/circuit/src/circuit_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct ExtraInstructionAttributes {

/// Private type used to store instructions with interned arg lists.
#[derive(Clone, Debug)]
pub(crate) struct PackedInstruction {
pub struct PackedInstruction {
/// The Python-side operation instance.
pub op: OperationType,
/// The index under which the interner has stored `qubits`.
Expand Down

0 comments on commit 41764f2

Please sign in to comment.