apply_x_gate_simd

Function apply_x_gate_simd 

Source
pub fn apply_x_gate_simd(
    in_amps0: &[Complex64],
    in_amps1: &[Complex64],
    out_amps0: &mut [Complex64],
    out_amps1: &mut [Complex64],
)
Expand description

Apply X gate to multiple amplitudes using SIMD-like operations

This is a specialized implementation for the Pauli X gate, which simply swaps amplitudes, making it very efficient to implement.

ยงArguments

  • in_amps0 - The first set of input amplitudes (corresponding to bit=0)
  • in_amps1 - The second set of input amplitudes (corresponding to bit=1)
  • out_amps0 - Output buffer for the first set of amplitudes
  • out_amps1 - Output buffer for the second set of amplitudes