Phase

class Phase(num_modes, mu, label=None)[source]

Applying a local phase to individual tweezers through an external potential

The generating Hamiltonian of the local phase gate is

\(H = \sum_{i=1,\sigma}^{L} \mu_i n_{i,\sigma}\)

where \(i\) indexes the mode, \(\sigma\) indexes the spin, \(L\) gives the total number of sites and \(\mu_i\) are the local potentials that lead to local phases

Initialize a LocalPhase gate :type num_modes: int :param num_modes: number of modes on which the local potential acts :type mu: List[float] :param mu: list of parameters that tune the local phases, must be of length num_modes/2 :type label: :param label: optional

Raises:

QiskitColdAtomError – If the length of mu does not match the given wire count num_modes

Attributes

Phase.condition_bits

Get Clbits in condition.

Phase.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

Phase.definition

Return definition in terms of other basic gates.

Phase.duration

Get the duration.

Phase.generator

The generating Hamiltonian of the local phase gate.

Phase.label

Return instruction label

Phase.name

Return the name.

Phase.num_clbits

Return the number of clbits.

Phase.num_qubits

Return the number of qubits.

Phase.params

return instruction params.

Phase.unit

Get the time unit of duration.

Methods

Phase.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

Phase.assemble()

Assemble a QasmQobjInstruction

Phase.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

Phase.c_if(classical, val)

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

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

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

Phase.copy([name])

Copy of the instruction.

Phase.inverse()

Get inverse gate by reversing the sign of all potentials

Phase.is_parameterized()

Return True .IFF.

Phase.operator_to_mat(generator, num_species)

Compute the matrix representation of the fermion operator.

Phase.power(exponent)

Creates a fermionic gate as gate^exponent

Phase.qasm()

Return a default OpenQASM string for the instruction.

Phase.repeat(n)

Creates an instruction with gate repeated n amount of times.

Phase.reverse_ops()

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

Phase.soft_compare(other)

Soft comparison between gates.

Phase.to_matrix([num_species, basis])

Return a Numpy.array for the gate unitary matrix.

Phase.validate_parameter(parameter)

Gate parameters should be int, float, or ParameterExpression