pub struct QuboMatrix {
pub num_vars: u8,
pub linear: [f32; 64],
pub couplers: [QuboWeightEmit; 512],
pub coupler_count: usize,
pub index_map: [(u64, u8); 64],
pub index_count: usize,
}Fields§
§num_vars: u8§linear: [f32; 64]§couplers: [QuboWeightEmit; 512]§coupler_count: usize§index_map: [(u64, u8); 64]§index_count: usizeImplementations§
Source§impl QuboMatrix
impl QuboMatrix
Sourcepub fn emit_linear(
&mut self,
var: u8,
bias: f32,
) -> Result<(), QuboCompileError>
pub fn emit_linear( &mut self, var: u8, bias: f32, ) -> Result<(), QuboCompileError>
Emits a linear bias on var; QuboCompileError at capacity.
Sourcepub fn emit_coupler(
&mut self,
a: u8,
b: u8,
weight: f32,
) -> Result<(), QuboCompileError>
pub fn emit_coupler( &mut self, a: u8, b: u8, weight: f32, ) -> Result<(), QuboCompileError>
Emits a coupler (a,b) with weight.
Sourcepub fn wipe_index_map(&mut self)
pub fn wipe_index_map(&mut self)
Clears the var→index map.
Trait Implementations§
Source§impl Clone for QuboMatrix
impl Clone for QuboMatrix
Source§impl Debug for QuboMatrix
impl Debug for QuboMatrix
Auto Trait Implementations§
impl Freeze for QuboMatrix
impl RefUnwindSafe for QuboMatrix
impl Send for QuboMatrix
impl Sync for QuboMatrix
impl Unpin for QuboMatrix
impl UnsafeUnpin for QuboMatrix
impl UnwindSafe for QuboMatrix
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.