Skip to main content

RotationTwo

Trait RotationTwo 

Source
pub trait RotationTwo<T>
where T: Config,
{
Show 19 methods // Required method fn rotate_2( &mut self, axis_a: [u8; 2], axis_b: [u8; 2], a: usize, b: usize, theta: <T as Config>::Coeff, ); // Provided methods fn rxx( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rxx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rxy( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rxy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rxz( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rxz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryx( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryy( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryz( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ryz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzx( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzy( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzz( &mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rzz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, ) { ... }
}
Expand description

Two-qubit Pauli rotations, generated by P_a ⊗ P_b for any pair of non-identity Paulis. Provides the named convenience methods rxx, rxy, …, rzz on top of the generic rotate_2.

Required Methods§

Source

fn rotate_2( &mut self, axis_a: [u8; 2], axis_b: [u8; 2], a: usize, b: usize, theta: <T as Config>::Coeff, )

Two-qubit Pauli rotation: exp(-i * theta/2 * P_a ⊗ P_b).

Each axis is encoded as [x, z] bits: [0,0] = I, [1,0] = X, [0,1] = Z, [1,1] = Y.

Provided Methods§

Source

fn rxx(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · X_a X_b).

Source

fn rxx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rxx].

Source

fn rxy(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · X_a Y_b).

Source

fn rxy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rxy].

Source

fn rxz(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · X_a Z_b).

Source

fn rxz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rxz].

Source

fn ryx(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Y_a X_b).

Source

fn ryx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [ryx].

Source

fn ryy(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Y_a Y_b).

Source

fn ryy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [ryy].

Source

fn ryz(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Y_a Z_b).

Source

fn ryz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [ryz].

Source

fn rzx(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Z_a X_b).

Source

fn rzx_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rzx].

Source

fn rzy(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Z_a Y_b).

Source

fn rzy_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rzy].

Source

fn rzz(&mut self, a: usize, b: usize, theta: impl Into<<T as Config>::Coeff>)

exp(-i θ/2 · Z_a Z_b).

Source

fn rzz_many( &mut self, pairs: &[(usize, usize)], theta: impl Into<<T as Config>::Coeff>, )

Explicit batched form of [rzz].

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Config, I, C: SparseVector<Complex<T::Coeff>, I>> RotationTwo<T> for GeneralizedTableau<T, I, C>

Source§

impl<T> RotationTwo<T> for PauliSum<T>
where T: Config, <T as Config>::Coeff: MulAssign, <T as Config>::Map: ACMapInsert<<T as Config>::Storage, <T as Config>::Coeff, <T as Config>::BuildHasher, <T as Config>::PauliWordType> + ACMapConsume,