UCCSDAnsatz

class UCCSDAnsatz[source]

Bases: Ansatz

Unitary Coupled Cluster Singles and Doubles (UCCSD) ansatz.

This ansatz is specifically designed for quantum chemistry calculations, implementing the UCCSD approximation which includes all single and double electron excitations from a reference state.

Methods Summary

build(params, n_qubits, n_layers, **kwargs)

Builds the ansatz circuit and returns a list of operations.

n_params_per_layer(n_qubits, **kwargs)

len(s_wires) + len(d_wires) from qp.qchem.excitations for the given n_electrons (required kwarg).

Methods Documentation

build(params, n_qubits, n_layers, **kwargs)[source]

Builds the ansatz circuit and returns a list of operations.

Parameters:
  • params – Parameter array for the ansatz.

  • n_qubits (int) – Number of qubits in the circuit.

  • n_layers (int) – Number of ansatz layers.

  • **kwargs – Additional arguments specific to the ansatz.

Returns:

The ansatz circuit on n_qubits qubits.

Return type:

QuantumCircuit

static n_params_per_layer(n_qubits, **kwargs)[source]

len(s_wires) + len(d_wires) from qp.qchem.excitations for the given n_electrons (required kwarg).

Return type:

int