Skip to main content

z_gate

Function z_gate 

Source
pub fn z_gate<T: BitOps>(_z: T, x: T) -> T
Expand description

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

This function transforms Pauli operators:

  • X -> -X
  • Y -> -Y
  • 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

The sign flip bits.