openqemist.quantum_solvers package¶
Subpackages¶
- openqemist.quantum_solvers.microsoft_qsharp package
- Submodules
- openqemist.quantum_solvers.microsoft_qsharp.broombridge_dummy module
- openqemist.quantum_solvers.microsoft_qsharp.generate_uccsd_operators module
- openqemist.quantum_solvers.microsoft_qsharp.integrals_pyscf module
- openqemist.quantum_solvers.microsoft_qsharp.microsoft_qsharp_parametric_solver module
- Module contents
- openqemist.quantum_solvers.qiskit package
- openqemist.quantum_solvers.rigetti package
Submodules¶
openqemist.quantum_solvers.parametric_quantum_solver module¶
-
class
openqemist.quantum_solvers.parametric_quantum_solver.
ParametricQuantumSolver
(molecule, anstatz, mean_field=None, backend_options=None)[source]¶ Bases:
abc.ABC
Performs energy estimations for a molecule with a parametric circuit.
Performs energy estimations for a given molecule and a choice of ansatz circuit that is supported by the hardware. A concrete class will contain a nested Enum class that exposes the supported ansatze to the users. The state of the class is created in the costructor so that the simulate function can just accept an amplitude array and return an energy.
-
amplitude_dimension
¶ The size of the amplitudes list that should be provided to the solver.
- Type
int
-
initial_wavefunction
¶ The initial wavefuntion for the simulations.
- Type
numpy.array
-
n_qubits
¶ The number of qubits in the circuit.
- Type
int
-
abstract
default_initial_var_parameters
()[source]¶ Returns reasonably good initial parameters for a VQE simulation.
The construction of the object should set the state so that this function can produce its output.
-
abstract
get_rdm
()[source]¶ Returns the RDM from the simulation.
This is intended to be called after the simulation loop of the calling code has converged to be passed on to problem decompositions. In a concrete implementation, the simulate function would set the necessary internal state for the class so that this function can return the reduced density matrix.
- Returns
The one- and two-element RDMs (float64).
- Return type
(numpy.array, numpy.array)
- Raises
RuntimeError – If no simulation has been run.
-