Skip to main content

s_gate

Function s_gate 

Source
pub fn s_gate<T: BitOps>(z: T, x: T) -> (T, T, T)
Expand description

Apply S gate (S P Sdg) on bit-packed Pauli operators.

This function transforms Pauli operators:

  • X -> Y
  • Y -> -X
  • Z -> Z

§Arguments

  • z - A T containing the Z component bits of the packed Pauli operators.
  • x - A T containing the X component bits of the packed Pauli operators.

§Returns

A tuple containing:

  • T: The new Z component bits.
  • T: The new X component bits.
  • T: The sign flip bits.