RSU3Gate

class RSU3Gate[source]

Bases: QutritGate, DifferentiableUnitary, CachedClass

Rotation by SU3 generator for a single qutrit gate.

\exp(i * \theta * \lambda_j)

where lambda_j is the j-th generator of the SU(3) Lie algebra. We use the physics notation, so each generator is Hermitian and not necessarily unitary. See See compute_su_generators() for more info on the generators. There are N^2-1 = 3^2-1 = 8 generators and N-1 = 3-1 = 2 mutually commute.

References

  • “Lie algebras in particle physics : from isospin to unified theories”, Howard Georgi

__init__(index)[source]

Construct a RSU3Gate.

Parameters:

index (int) – The index of the generator to use. See compute_su_generators() for more info on the generators.

Raises:

ValueError – If index is less than 0 or greater than 7

Attributes

dim

The matrix dimension for this unitary.

name

The name of this gate.

num_params

The number of real parameters this unitary-valued function takes.

num_qudits

The number of qudits this unitary can act on.

qasm_name

The qasm identifier for this gate.

radixes

The number of orthogonal states for each qudit.

Methods

check_parameters(params)

Check parameters are valid and match the unitary.

get_grad([params])

Return the gradient for this gate.

get_inverse()

Return the gate's inverse as a gate.

get_inverse_params([params])

Return the parameters that invert the gate.

get_qasm(params, location)

Returns the qasm string for this gate.

get_qasm_gate_def()

Returns a qasm gate definition block for this gate.

get_unitary([params])

Return the unitary for this gate, see Unitary for more.

get_unitary_and_grad([params])

Return a tuple combining the outputs of get_unitary and get_grad.

is_constant()

Return true if this unitary doesn't take parameters.

is_parameterized()

Return true if this unitary is parameterized.

is_qubit_only()

Return true if this unitary can only act on qubits.

is_qudit_only(radix)

Return true if this unitary can only act on radix-qudits.

is_qutrit_only()

Return true if this unitary can only act on qutrits.

is_self_inverse([params])

Checks whether the unitary is its own inverse.

with_all_frozen_params(params)

Freeze all of a gate's parameters so they don't change from optimization.

with_frozen_params(frozen_params)

Freeze some of a gate's parameters so they don't change from optimization.