pygsti.tools.optools.rotation_gate_mx

pygsti.tools.optools.rotation_gate_mx#

rotation_gate_mx(r, mx_basis='gm')#

Construct a rotation operation matrix.

Build the operation matrix corresponding to the unitary

exp(-i * (r[0]/2*PP[0]*sqrt(d) + r[1]/2*PP[1]*sqrt(d) + …) )

where PP’ is the array of Pauli-product matrices obtained via `pp_matrices(d), where d = sqrt(len(r)+1). The division by 2 is for convention, and the sqrt(d) is to essentially un-normalise the matrices returned by pp_matrices() to they are equal to products of the standard Pauli matrices.

Parameters:
  • r (tuple) – A tuple of coefficients, one per non-identity Pauli-product basis element

  • mx_basis ({'std', 'gm', 'pp', 'qt'} or Basis object) – The source and destination basis, respectively. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp), and Qutrit (qt) (or a custom basis object).

Returns:

a d^2 x d^2 operation matrix in the specified basis.

Return type:

numpy array