openqemist.tests.quantum_solvers.microsoft_qsharp package

Submodules

openqemist.tests.quantum_solvers.microsoft_qsharp.test_microsoft_qsharp_parametric_solver module

class openqemist.tests.quantum_solvers.microsoft_qsharp.test_microsoft_qsharp_parametric_solver.MicrosoftQSharpParametricSolverTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_mf_H2()[source]

Tests that all the values are set correctly in the constructor.

test_no_mf_H2()[source]

Tests number of amplitudes as well as simulate and get_RDM methods

test_no_mf_H4()[source]

Tests number of amplitudes as well as simulate and get_RDM methods

test_no_mf_LiH()[source]

Tests get_RDM methods: assume energy is correct and reconstruct from RDM

test_simulate_dimension_throw()[source]

Tests that all the values are set correctly in the constructor.

openqemist.tests.quantum_solvers.microsoft_qsharp.test_microsoft_qsharp_parametric_solver.get_file_path_stub()[source]

Gets the path of the test files from anywhere in the test tree.”

The direcory structure should be $SOMETHING/QEMIST/qemist/tests/$SOMETHINGELSE so we trim after “tests”, then add the path to the results files so we can run the tests from anywhere in the tree.

openqemist.tests.quantum_solvers.microsoft_qsharp.test_microsoft_qsharp_parametric_solver.matricize_2rdm(two_rdm, n_electrons, n_orbitals)[source]

Turns the two_rdm tensor into a matrix for test purposes

Module contents