pygsti.single_qubit_gate¶
-
pygsti.
single_qubit_gate
(hx, hy, hz, noise=0)¶ Construct the single-qubit gate matrix.
Build the gate matrix given by exponentiating -i * (hx*X + hy*Y + hz*Z), where X, Y, and Z are the sigma matrices. Thus, hx, hy, and hz correspond to rotation angles divided by 2. Additionally, a uniform depolarization noise can be applied to the gate.
Parameters: - hx (float) – Coefficient of sigma-X matrix in exponent.
- hy (float) – Coefficient of sigma-Y matrix in exponent.
- hz (float) – Coefficient of sigma-Z matrix in exponent.
- noise (float, optional) – The amount of uniform depolarizing noise.
Returns: 4x4 gate matrix which operates on a 1-qubit density matrix expressed as a vector in the Pauli basis ( {I,X,Y,Z}/sqrt(2) ).
Return type: numpy array