Skip to main content

Crate bitpacked

Crate bitpacked 

Source
Expand description

This crate implements Clifford conjugation on bit-packed representations of Pauli operators. The unstable_simd feature enables the use of the nightly portable_simd API.

Constants§

I_U8
U8 encoding for Pauli I
XX_U8
U8 encoding for TQE gate XX
XY_U8
U8 encoding for TQE gate XY
XZ_U8
U8 encoding for TQE gate XZ
X_U8
U8 encoding for Pauli X
YX_U8
U8 encoding for TQE gate YX
YY_U8
U8 encoding for TQE gate YY
YZ_U8
U8 encoding for TQE gate YZ
Y_U8
U8 encoding for Pauli Y
ZX_U8
U8 encoding for TQE gate ZX
ZY_U8
U8 encoding for TQE gate ZY
ZZ_U8
U8 encoding for TQE gate ZZ
Z_U8
U8 encoding for Pauli Z

Traits§

BitOps
A trait for types that support bitwise operations and can be used in the conjugation functions.

Functions§

apply_enum_tqe_slice
Apply TQE gate where the gate type is encoded in two Pauli enums.
apply_half_pi_gate_slice
Apply half pi Pauli rotation gate
apply_u8_tqe
Apply TQE gate where the gate type is base-3 encoded in a u8. The encoding is as follows:
apply_u8_tqe_slice
Apply TQE gate where the gate type is encoded in a u8.
bits_to_u8_pauli
Converts a pair of bits (z, x) into a u8 representing the corresponding Pauli operator.
bools_to_u64_vec
Converts a slice of boolean values into a vector of u64 values, where each u64 represents up to 64 boolean values packed as bits.
h_gate
Apply H gate (H P H) on bit-packed Pauli operators.
paulis_to_u64s
Converts a vector of Pauli values into two vectors of u64 bit-packed representations.
rx90_gate
Apply Rx(pi/2) gate (Rx(pi/2) P Rx(-pi/2)) on bit-packed Pauli operators. Equivalent to Vdg gate.
rx270_gate
Apply Rx(-pi/2) gate (Rx(-pi/2) P Rx(pi/2)) on bit-packed Pauli operators. Equivalent to V gate.
ry90_gate
Apply Ry(pi/2) gate (Ry(pi/2) P Ry(-pi/2)) on bit-packed Pauli operators.
ry270_gate
Apply Ry(-pi/2) gate (Ry(-pi/2) P Ry(pi/2)) on bit-packed Pauli operators.
rz90_gate
Apply Rz(pi/2) gate (Rz(pi/2) P Rz(-pi/2)) on bit-packed Pauli operators. Equivalent to Sdg gate.
rz270_gate
Apply Rz(-pi/2) gate (Rz(-pi/2) P Rz(pi/2)) on bit-packed Pauli operators. Equivalent to S gate.
s_gate
Apply S gate (S P Sdg) on bit-packed Pauli operators.
sdg_gate
Apply Sdg gate (Sdg P S) on bit-packed Pauli operators.
sign_flips_to_u64s
Converts a vector of boolean sign flip values into a bit-packed u64 representation.
slice_h_gate
Scalar slice version of h_gate, applied in-place.
slice_rx90_gate
Scalar slice version of rx90_gate, applied in-place.
slice_rx270_gate
Scalar slice version of rx270_gate, applied in-place.
slice_ry90_gate
Scalar slice version of ry90_gate, applied in-place.
slice_ry270_gate
Scalar slice version of ry270_gate, applied in-place.
slice_rz90_gate
Scalar slice version of rz90_gate, applied in-place.
slice_rz270_gate
Scalar slice version of rz270_gate, applied in-place.
slice_s_gate
Scalar slice version of s_gate, applied in-place.
slice_sdg_gate
Scalar slice version of sdg_gate, applied in-place.
slice_v_gate
Scalar slice version of v_gate, applied in-place.
slice_vdg_gate
Scalar slice version of vdg_gate, applied in-place.
slice_x_gate
Scalar slice version of x_gate, applied in-place.
slice_xx_gate
Scalar slice version of xx_gate, applied in-place.
slice_xy_gate
Scalar slice version of xy_gate, applied in-place.
slice_xz_gate
Scalar slice version of xz_gate, applied in-place.
slice_y_gate
Scalar slice version of y_gate, applied in-place.
slice_yy_gate
Scalar slice version of yy_gate, applied in-place.
slice_yz_gate
Scalar slice version of yz_gate, applied in-place.
slice_z_gate
Scalar slice version of z_gate, applied in-place.
slice_zz_gate
Scalar slice version of zz_gate, applied in-place.
u8_tqe_to_u64
Converts a U8 encoding of a TQE gate into a tuple of four u64 values.
u64s_to_paulis
Converts two vectors of u64 bit-packed representations back into a vector of Pauli values.
u64s_to_sign_flips
Converts a vector of u64 bit-packed representations back into a vector of boolean sign flip values.
v_gate
Apply V gate (V P Vdg) on bit-packed Pauli operators.
vdg_gate
Apply Vdg gate (Vdg P V) on bit-packed Pauli operators.
x_gate
Apply X gate (X P X) on bit-packed Pauli operators.
xx_gate
Apply XX gate (XX P XX) on bit-packed Pauli operators.
xy_gate
Apply XY (XY P XY) gate on bit-packed Pauli operators.
xz_gate
Apply XZ (XZ P XZ) gate on bit-packed Pauli operators.
y_gate
Apply Y gate (Y P Y) on bit-packed Pauli operators.
yy_gate
Apply YY (YY P YY) gate on bit-packed Pauli operators.
yz_gate
Apply YZ (YZ P YZ) gate on bit-packed Pauli operators.
z_gate
Apply Z gate (Z P Z) on bit-packed Pauli operators.
zz_gate
Apply ZZ (ZZ P ZZ) gate on bit-packed Pauli operators.