UVCC#

class UVCC(num_modals=None, excitations=None, qubit_mapper=None, *, reps=1, initial_state=None)[source]#

Bases: EvolvedOperatorAnsatz

This trial wavefunction is a Unitary Vibrational Coupled-Cluster ansatz.

This method constructs the requested excitations based on a VSCF reference state by default. When setting up a VQE algorithm using this ansatz and initial state, it is likely you will also want to use a VSCFInitialPoint that has been configured using the corresponding ansatz parameters. This can be done as follows:

qubit_mapper = JordanWignerMapper()
uvcc = UVCC([2, 2], 'sd', qubit_mapper)
vscf_initial_point = VSCFInitialPoint()
vscf_initial_point.ansatz = uvcc
initial_point = vscf_initial_point.to_numpy_array()
vqe = VQE(Estimator(), uvcc, SLSQP(), initial_point=initial_point)

For more information, see Ollitrault Pauline J., Chemical science 11 (2020): 6842-6855.

Parameters:
  • num_modals (list[int] | None) – A list defining the number of modals per mode. E.g. for a 3 modes system with 4 modals per mode num_modals = [4, 4, 4].

  • excitations (str | int | list[int] | Callable[[int, tuple[int, int]], list[tuple[tuple[int, ...], tuple[int, ...]]]] | None) –

    This can be any of the following types:

    str:

    Contains the types of excitations. Allowed characters are: 's' for singles, 'd' for doubles, 't' for triples, and 'q' for quadruples.

    int:

    A single, positive integer which denotes the number of excitations (1 == 's', 2 == 'd', etc.).

    list[int]:

    A list of positive integers generalizing the above to multiple numbers of excitations ([1, 2] == 'sd', etc.).

    Callable:

    A function which is used to generate the excitations. The callable must take the keyword argument num_modals (with identical type to that explained above) and must return a list[tuple[tuple[int, ...], tuple[int, ...]]]. For more information on how to write such a callable refer to the default method generate_vibration_excitations().

  • qubit_mapper (QubitMapper | None) – The QubitMapper which takes care of mapping to a qubit operator.

  • reps (int) – The number of repetitions of basic module.

  • initial_state (QuantumCircuit | None) – A QuantumCircuit object to prepend to the circuit. Note that this setting does not influence the excitations. When relying on the default generation method (i.e. not providing a Callable to excitations), these will always be constructed with respect to a VSCF reference state. When setting up a VQE algorithm using this ansatz and initial state, it is likely you will also want to use a VSCFInitialPoint that has been configured using the corresponding ansatz parameters.

Attributes

excitation_list#

The excitation list that UVCC is using.

excitations#

The excitations.

num_modals#

The number of modals.

operators#

The operators that are evolved in this circuit.

Returns:

The operators to be evolved contained in this ansatz or

None if the configuration is not complete

Return type:

list

qubit_mapper#

The qubit operator mapper.

Methods

excitation_ops()[source]#

Parses the excitations and generates the list of operators.

Raises:

QiskitNatureError – if invalid excitations are specified.

Returns:

The list of generated excitation operators.

Return type:

list[SparseLabelOp]