def test_split_operator_trotter_ansatz_param_bounds(): ansatz = SplitOperatorTrotterAnsatz(hubbard_hamiltonian) assert list(symbol.name for symbol in ansatz.params()) == [ 'U_0_0', 'U_1_0', 'U_6_0', 'U_7_0', 'V_0_1_0', 'V_2_3_0', 'V_4_5_0', 'V_6_7_0'] assert ansatz.param_bounds() == [ (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0)]
def test_split_operator_trotter_ansatz_param_bounds(): ansatz = SplitOperatorTrotterAnsatz(hubbard_hamiltonian) assert ansatz.param_names() == [ 'U0', 'U1', 'U6', 'U7', 'V0_1', 'V2_3', 'V4_5', 'V6_7' ] assert ansatz.param_bounds() == [(-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0), (-1.0, 1.0)]