RLZ2Gate

class RLZ2Gate(chi, label=None)[source]

Evolution of a coherent spin under the twisting dynamic generated by Lz^2’.

The generating Hamiltonian of the LZ2 gate is

\(H = \chi L_z^2\)

where \(\chi\) is the free gate parameter.

Circuit symbol:

     ┌───────────┐
q_0: ┤ RLZ2(chi) ├
     └───────────┘

Create new rz2 gate.

Attributes

RLZ2Gate.condition_bits

Get Clbits in condition.

RLZ2Gate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

RLZ2Gate.definition

Return definition in terms of other basic gates.

RLZ2Gate.duration

Get the duration.

RLZ2Gate.generator

The generating Hamiltonian of the LZ gate.

RLZ2Gate.label

Return instruction label

RLZ2Gate.name

Return the name.

RLZ2Gate.num_clbits

Return the number of clbits.

RLZ2Gate.num_qubits

Return the number of qubits.

RLZ2Gate.params

return instruction params.

RLZ2Gate.unit

Get the time unit of duration.

Methods

RLZ2Gate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

RLZ2Gate.assemble()

Assemble a QasmQobjInstruction

RLZ2Gate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

RLZ2Gate.c_if(classical, val)

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

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

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

RLZ2Gate.copy([name])

Copy of the instruction.

RLZ2Gate.inverse()

Invert this instruction.

RLZ2Gate.is_parameterized()

Return True .IFF.

RLZ2Gate.power(exponent)

Creates a spin gate as gate^exponent.

RLZ2Gate.qasm()

Return a default OpenQASM string for the instruction.

RLZ2Gate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RLZ2Gate.reverse_ops()

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

RLZ2Gate.soft_compare(other)

Soft comparison between gates.

RLZ2Gate.to_matrix([spin])

Return a Numpy.array for the gate unitary matrix.

RLZ2Gate.validate_parameter(parameter)

Gate parameters should be int, float, or ParameterExpression