pub struct InteractionGraph {
pub num_qubits: u32,
pub edges: Vec<(u32, u32, usize)>,
pub adjacency: Vec<Vec<u32>>,
}Expand description
Qubit interaction graph extracted from a quantum circuit.
Nodes are qubits. Edges are two-qubit gates, weighted by the number of such gates between each pair.
Fields§
§num_qubits: u32Number of qubits (nodes) in the graph.
edges: Vec<(u32, u32, usize)>Edges as (qubit_a, qubit_b, gate_count).
adjacency: Vec<Vec<u32>>Adjacency list: adjacency[q] contains the neighbours of qubit q.
Trait Implementations§
Source§impl Clone for InteractionGraph
impl Clone for InteractionGraph
Source§fn clone(&self) -> InteractionGraph
fn clone(&self) -> InteractionGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InteractionGraph
impl RefUnwindSafe for InteractionGraph
impl Send for InteractionGraph
impl Sync for InteractionGraph
impl Unpin for InteractionGraph
impl UnsafeUnpin for InteractionGraph
impl UnwindSafe for InteractionGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more