Skip to main content

RotationTwo

Trait RotationTwo 

Source
pub trait RotationTwo<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::Coeff, ); // Provided methods fn rxx(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rxx_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn rxy(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rxy_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn rxz(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rxz_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn ryx(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn ryx_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn ryy(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn ryy_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn ryz(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn ryz_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn rzx(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rzx_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn rzy(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rzy_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::Coeff>) { ... } fn rzz(&mut self, a: usize, b: usize, theta: impl Into<T::Coeff>) { ... } fn rzz_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::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::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::Coeff>)

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

Source

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

Explicit batched form of [rxx].

Source

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

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

Source

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

Explicit batched form of [rxy].

Source

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

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

Source

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

Explicit batched form of [rxz].

Source

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

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

Source

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

Explicit batched form of [ryx].

Source

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

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

Source

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

Explicit batched form of [ryy].

Source

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

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

Source

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

Explicit batched form of [ryz].

Source

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

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

Source

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

Explicit batched form of [rzx].

Source

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

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

Source

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

Explicit batched form of [rzy].

Source

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

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

Source

fn rzz_many(&mut self, pairs: &[(usize, usize)], theta: impl Into<T::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§