Skip to main content

RzRyCX

Type Alias RzRyCX 

Source
pub type RzRyCX = ();
Expand description

The {RZ, RY, CNOT} native gateset.

For single-qubit gates the 2×2 unitary is decomposed via the ZYZ Euler decomposition, emitting rz and ry native gates (near-zero rotations are dropped). For CNOT it emits a single cnot gate. For SWAP it emits three cnot gates.

Used automatically when no NativeGateSet is configured in QuantumExecution::Batch.

Trait Implementations§

Source§

impl NativeGateSet for RzRyCX

Source§

fn translate( &self, matrix: &[[Complex<f64>; 2]; 2], target: usize, ) -> Result<Vec<NativeGate>, KetError>

Translates the 2×2 complex unitary matrix acting on target into zero or more native single-qubit gate instructions. Read more
Source§

fn cnot(&self, c: usize, t: usize) -> Result<Vec<NativeGate>, KetError>

Translates a CNOT gate into native gate instructions. Read more