pygsti.models.qutrit

Routines for building qutrit gates and models

Module Contents

Functions

_x_2qubit(theta)

Returns X(theta)^otimes 2 (2-qubit 'XX' unitary)

_y_2qubit(theta)

Returns Y(theta)^otimes 2 (2-qubit 'YY' unitary)

_ms_2qubit(theta, phi)

Returns Molmer-Sorensen gate for two qubits

_remove_from_matrix(input_arr, columns, rows, output_type=_np.matrix)

to_qutrit_space(input_mat)

Projects a 2-qubit unitary matrix onto the symmetric "qutrit space"

_ms_qutrit(theta, phi)

Returns Qutrit Molmer-Sorenson unitary on the qutrit space

_xx_qutrit(theta)

Returns Qutrit XX unitary

_yy_qutrit(theta)

Returns Qutrit YY unitary

_random_rot(scale, rand_state, arr_type=_np.array)

create_qutrit_model(error_scale, x_angle=_np.pi / 2, y_angle=_np.pi / 2, ms_global=_np.pi / 2, ms_local=0, similarity=False, seed=None, basis='qt', evotype='default')

Constructs a standard qutrit Model.

Attributes

A

X

Y

pygsti.models.qutrit.A
pygsti.models.qutrit.X
pygsti.models.qutrit.Y
pygsti.models.qutrit._x_2qubit(theta)

Returns X(theta)^otimes 2 (2-qubit ‘XX’ unitary)

Parameters

theta (float) – rotation angle: U = exp(-i/2 * theta * sigmaX)

Returns

numpy.ndarray

pygsti.models.qutrit._y_2qubit(theta)

Returns Y(theta)^otimes 2 (2-qubit ‘YY’ unitary)

Parameters

theta (float) – rotation angle: U = exp(-i/2 * theta * sigmaY)

Returns

numpy.ndarray

pygsti.models.qutrit._ms_2qubit(theta, phi)

Returns Molmer-Sorensen gate for two qubits

Returns the unitary given by: U = exp(i/2 * theta * A otimes A) where A = cos(phi)*sigmaX + sin(phi)*sigmaY

Parameters
  • theta (float) – global rotation angle

  • phi (float) – local rotation angle

Returns

numpy.ndarray

pygsti.models.qutrit._remove_from_matrix(input_arr, columns, rows, output_type=_np.matrix)
pygsti.models.qutrit.to_qutrit_space(input_mat)

Projects a 2-qubit unitary matrix onto the symmetric “qutrit space”

Parameters

input_mat (numpy.ndarray) – the unitary matrix to project.

Returns

numpy.ndarray

pygsti.models.qutrit._ms_qutrit(theta, phi)

Returns Qutrit Molmer-Sorenson unitary on the qutrit space

Parameters
  • theta (float) – rotation angle

  • phi (float) – rotation angle

Returns

numpy.ndarray

pygsti.models.qutrit._xx_qutrit(theta)

Returns Qutrit XX unitary

Parameters

theta (float) – rotation angle.

Returns

numpy.ndarray

pygsti.models.qutrit._yy_qutrit(theta)

Returns Qutrit YY unitary

Parameters

theta (float) – rotation angle

Returns

numpy.ndarray

pygsti.models.qutrit._random_rot(scale, rand_state, arr_type=_np.array)
pygsti.models.qutrit.create_qutrit_model(error_scale, x_angle=_np.pi / 2, y_angle=_np.pi / 2, ms_global=_np.pi / 2, ms_local=0, similarity=False, seed=None, basis='qt', evotype='default')

Constructs a standard qutrit Model.

This model contains the identity, XX, YY, and Molmer-Sorenson gates.

Parameters
  • error_scale (float) – Magnitude of random rotations to apply to the returned model. If zero, then perfect “ideal” gates are constructed.

  • x_angle (float, optional) – The rotation angle of each X in the XX gate.

  • y_angle (float, optional) – The rotation angle of each Y in the YY gate.

  • ms_global (float, optional) – The global Molmer-Sorenson angle (theta)

  • ms_local (float, optional) – The local Molmer-Sorenson angle (theta)

  • similarity (bool, optional) – If true, then apply the random rotations (whose strengths are given by error_scale) as similarity transformations rather than just as post-multiplications to the ideal operation matrices.

  • seed (int, optional) – The seed used to generate random rotations.

  • basis (str, optional) – The string abbreviation of the basis of the returned vector. Allowed values are Matrix-unit (std), Gell-Mann (gm) and Qutrit (qt). A Basis object may also be used.

  • evotype (Evotype or str, optional) – The evolution type. The special value “default” is equivalent to specifying the value of pygsti.evotypes.Evotype.default_evotype.

Returns

Model