pub struct GeneralUnitary2Q {
pub support: [u32; 2],
pub table: [[Complex64; 16]; 16],
}Expand description
Generic 2-qubit unitary, stored as a 16x16 Pauli-expansion table.
Fields§
§support: [u32; 2]The two qubits this gate acts on.
table: [[Complex64; 16]; 16]16x16 table: rows indexed by the 4-bit packed input Pauli on the two support qubits, columns by the output Pauli, entries are complex coefficients.
Trait Implementations§
Source§impl Channel<1> for GeneralUnitary2Q
impl Channel<1> for GeneralUnitary2Q
Source§fn max_fanout(&self) -> usize
fn max_fanout(&self) -> usize
Maximum number of output terms produced per input term. Used by the
engine to size the scratch buffer up-front.
Source§fn support(&self) -> &[u32]
fn support(&self) -> &[u32]
Qubits this channel acts on. Outputs differ from inputs only at these
bit positions; the engine uses this for bucket layout (§5).
Source§fn apply(
&self,
_input_x: &[u64; 1],
_input_z: &[u64; 1],
_coeff: Complex64,
_out: &mut OutputBuffer<'_, 1>,
)
fn apply( &self, _input_x: &[u64; 1], _input_z: &[u64; 1], _coeff: Complex64, _out: &mut OutputBuffer<'_, 1>, )
Apply the channel to a single input term, writing outputs to
out.Source§fn apply_adjoint(
&self,
input_x: &[u64; W],
input_z: &[u64; W],
coeff: Complex64,
out: &mut OutputBuffer<'_, W>,
)
fn apply_adjoint( &self, input_x: &[u64; W], input_z: &[u64; W], coeff: Complex64, out: &mut OutputBuffer<'_, W>, )
Apply the channel’s adjoint to a single input term, writing outputs
to
out. Used by the engine in Direction::Heisenberg mode for
backpropagating observables. Read moreAuto Trait Implementations§
impl Freeze for GeneralUnitary2Q
impl RefUnwindSafe for GeneralUnitary2Q
impl Send for GeneralUnitary2Q
impl Sync for GeneralUnitary2Q
impl Unpin for GeneralUnitary2Q
impl UnwindSafe for GeneralUnitary2Q
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
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