openqemist.quantum_solvers.qiskit package

Submodules

openqemist.quantum_solvers.qiskit.qiskit_parametric_solver module

Functions to compute the energy of a system with a parametric circuit and extract the RDM values with IBM Qiskit package

class openqemist.quantum_solvers.qiskit.qiskit_parametric_solver.QiskitParametricSolver(ansatz, molecule, mean_field=None, backend_options=None)[source]

Bases: openqemist.quantum_solvers.parametric_quantum_solver.ParametricQuantumSolver

Performs an energy estimation for a molecule with a supprted parametric circuit. Can be initialized with PySCF objects (molecule and mean-field)

class Ansatze[source]

Bases: enum.Enum

Enumeration of the ansatz circuits that are supported.

UCCSD = 0
default_initial_var_parameters()[source]

Returns initial variational parameters for a VQE simulation.

Returns initial variational parameters for the circuit that is generated for a given ansatz.

Returns

Initial parameters.

Return type

list

get_rdm()[source]

Obtain the 1- and 2-RDM matrices for given variational parameters. This makes sense for problem decomposition methods if these amplitudes are the ones that minimizes energy.

Returns

One & two-particle RDMs (rdm1_np & rdm2_np, float64).

Return type

(numpy.array, numpy.array)

Raises

RuntimeError – If no simulation has been run before calling this method.

simulate(var_params)[source]

Evaluate the parameterized circuit for the input amplitudes.

Parameters

var_params (list) – The initial amplitudes (float64).

Returns

The total energy (energy).

Return type

float64

Raise:

ValueError: If the dimension of the amplitude list is incorrect.

Module contents