Skip to main content

zz_gate

Function zz_gate 

Source
pub fn zz_gate<T: BitOps>(z0: T, x0: T, z1: T, x1: T) -> (T, T, T, T, T)
Expand description

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

§Arguments

  • z0 - A T containing the Z component bits of the packed Pauli operators on the first qubit.
  • x0 - A T containing the X component bits of the packed Pauli operators on the first qubit.
  • z1 - A T containing the Z component bits of the packed Pauli operators on the second qubit.
  • x1 - A T containing the X component bits of the packed Pauli operators on the second qubit.

§Returns

A tuple containing:

  • T: The new Z component bits on the first qubit.
  • T: The new X component bits on the first qubit.
  • T: The new Z component bits on the second qubit.
  • T: The new X component bits on the second qubit.
  • T: The sign flip bits.