Interaction

class Interaction(num_modes, u, label=None)[source]

On-site interaction of particles of opposite spin species on the same site.

The generating Hamiltonian of the interaction gate is

\(H = U \sum_{i=1}^{L} n_{i,\uparrow} n_{i,\downarrow}\)

where \(i\) indexes the mode, \(L\) gives the total number of sites and \(U\) is the interaction strength

Initialize interaction gate.

Parameters:
  • num_modes (int) – number of modes on which the gate acts

  • u (float) – global interaction strength parameter

  • label – optional

Raises:

QiskitColdAtomError – If the number of wires the gate acts on is uneven

Attributes

Interaction.condition_bits

Get Clbits in condition.

Interaction.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

Interaction.definition

Return definition in terms of other basic gates.

Interaction.duration

Get the duration.

Interaction.generator

The generating Hamiltonian of the interaction gate.

Interaction.label

Return instruction label

Interaction.name

Return the name.

Interaction.num_clbits

Return the number of clbits.

Interaction.num_qubits

Return the number of qubits.

Interaction.params

return instruction params.

Interaction.unit

Get the time unit of duration.

Methods

Interaction.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

Interaction.assemble()

Assemble a QasmQobjInstruction

Interaction.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

Interaction.c_if(classical, val)

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

Interaction.control([num_ctrl_qubits, ...])

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

Interaction.copy([name])

Copy of the instruction.

Interaction.inverse()

Get inverse gate by reversing the sign of the interaction parameter

Interaction.is_parameterized()

Return True .IFF.

Interaction.operator_to_mat(generator, ...)

Compute the matrix representation of the fermion operator.

Interaction.power(exponent)

Creates a fermionic gate as gate^exponent

Interaction.qasm()

Return a default OpenQASM string for the instruction.

Interaction.repeat(n)

Creates an instruction with gate repeated n amount of times.

Interaction.reverse_ops()

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

Interaction.soft_compare(other)

Soft comparison between gates.

Interaction.to_matrix([num_species, basis])

Return a Numpy.array for the gate unitary matrix.

Interaction.validate_parameter(parameter)

Gate parameters should be int, float, or ParameterExpression