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
u64values, where eachu64represents 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
Paulivalues into two vectors ofu64bit-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
u64representation. - 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
u64bit-packed representations back into a vector ofPaulivalues. - u64s_
to_ sign_ flips - Converts a vector of
u64bit-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.