Trait qmc::sse::qmc_traits::op_container::Op[][src]

pub trait Op: Clone + Debug {
    type Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Debug;
    type SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Debug;
Show methods fn diagonal<A, B>(vars: A, bond: usize, state: B, constant: bool) -> Self
    where
        A: Into<Self::Vars>,
        B: Into<Self::SubState>
;
fn offdiagonal<A, B, C>(
        vars: A,
        bond: usize,
        inputs: B,
        outputs: C,
        constant: bool
    ) -> Self
    where
        A: Into<Self::Vars>,
        B: Into<Self::SubState>,
        C: Into<Self::SubState>
;
fn index_of_var(&self, var: usize) -> Option<usize>;
fn get_vars(&self) -> &[usize];
fn get_bond(&self) -> usize;
fn get_inputs(&self) -> &[bool];
fn get_outputs(&self) -> &[bool];
fn clone_and_edit_in_out<F>(&self, f: F) -> Self
    where
        F: Fn(&mut [bool], &mut [bool])
;
fn clone_and_edit_in_out_symmetric<F>(&self, f: F) -> Self
    where
        F: Fn(&mut [bool])
;
fn edit_in_out<F>(&mut self, f: F)
    where
        F: Fn(&mut [bool], &mut [bool])
;
fn edit_in_out_symmetric<F>(&mut self, f: F)
    where
        F: Fn(&mut [bool])
;
fn clone_inputs(&self) -> Self::SubState;
fn clone_outputs(&self) -> Self::SubState;
fn is_constant(&self) -> bool; fn make_vars<V>(vars: V) -> Self::Vars
    where
        V: IntoIterator<Item = usize>
, { ... }
fn make_substate<S>(state: S) -> Self::SubState
    where
        S: IntoIterator<Item = bool>
, { ... }
fn is_diagonal(&self) -> bool { ... }
}
Expand description

Ops for holding SSE graph state.

Associated Types

The list of op variables.

The list of op input and output states.

Required methods

Make a diagonal op.

Make an offdiagonal op.

Get the relative index of a variable.

Get the set of variables used for this op.

Get the associated bond number for the op.

Get the input state for the op.

Get the output state for the op.

Clone the op and edit inputs and outputs.

Clone the op and edit inputs and outputs. Must edit states symmetrically (diagonal stays diagonal, offdiagonal stays offdiagonal).

Edit inputs and outputs.

Edit inputs and outputs. Must edit states symmetrically (diagonal stays diagonal, offdiagonal stays offdiagonal).

Get the input state for the op.

Get the output state for the op.

If the op is always a constant under any bit flip in input or output, then it can be used to mark the edges of clusters.

Provided methods

Make vars (this is here mostly due to rust bug 38078)

Make substate (this is here mostly due to rust bug 38078)

Check if the op is diagonal (makes no state changes).

Implementors