RLXLYGate

class RLXLYGate(gamma, label=None)[source]

The spin exchange gate of two collective spins.

The generating Hamiltonian of the LxLyGate is

\(H = \gamma (L_{x, i}L_{x,j} + L_{y, i} L_{y,j})\)

where \(\gamma\) is the free gate parameter and \(i\) and \(j\) index the wires the gate acts on. This gate is equivalently expressed through raising and lowering operators as:

\(H = 2\gamma (L_{+, i}L_{-,j} + L_{-, i} L_{+,j})\)

Create new RLXLY gate.

Attributes

RLXLYGate.condition_bits

Get Clbits in condition.

RLXLYGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

RLXLYGate.definition

Return definition in terms of other basic gates.

RLXLYGate.duration

Get the duration.

RLXLYGate.generator

The generating Hamiltonian of the LxLy gate.

RLXLYGate.label

Return instruction label

RLXLYGate.name

Return the name.

RLXLYGate.num_clbits

Return the number of clbits.

RLXLYGate.num_qubits

Return the number of qubits.

RLXLYGate.params

return instruction params.

RLXLYGate.unit

Get the time unit of duration.

Methods

RLXLYGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

RLXLYGate.assemble()

Assemble a QasmQobjInstruction

RLXLYGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

RLXLYGate.c_if(classical, val)

Set a classical equality condition on this instruction between the register or cbit classical and value val.

RLXLYGate.control([num_ctrl_qubits, label, ...])

Overwrite control method which is supposed to return a controlled version of the gate.

RLXLYGate.copy([name])

Copy of the instruction.

RLXLYGate.inverse()

Invert this instruction.

RLXLYGate.is_parameterized()

Return True .IFF.

RLXLYGate.power(exponent)

Creates a spin gate as gate^exponent.

RLXLYGate.qasm()

Return a default OpenQASM string for the instruction.

RLXLYGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RLXLYGate.reverse_ops()

For a composite instruction, reverse the order of sub-instructions.

RLXLYGate.soft_compare(other)

Soft comparison between gates.

RLXLYGate.to_matrix([spin])

Return a Numpy.array for the gate unitary matrix.

RLXLYGate.validate_parameter(parameter)

Gate parameters should be int, float, or ParameterExpression