def test_swap_network_trotter_ansatz_parameters():

    ansatz = SwapNetworkTrotterAnsatz(hubbard_hamiltonian)
    assert (set(ansatz.param_names()) == set(ansatz.params.keys()) ==
            {symbol.name
             for symbol in ansatz.params.values()} == {
                 'T0_2', 'T4_6', 'T1_3', 'T5_7', 'T0_4', 'T2_6', 'T1_5',
                 'T3_7', 'V0_1', 'V2_3', 'V4_5', 'V6_7'
             })

    ansatz = SwapNetworkTrotterAnsatz(hubbard_hamiltonian, iterations=2)
    assert (set(ansatz.param_names()) == set(ansatz.params.keys()) ==
            {symbol.name
             for symbol in ansatz.params.values()} == {
                 'T0_2-0', 'T4_6-0', 'T1_3-0', 'T5_7-0', 'T0_4-0', 'T2_6-0',
                 'T1_5-0', 'T3_7-0', 'V0_1-0', 'V2_3-0', 'V4_5-0', 'V6_7-0',
                 'T0_2-1', 'T4_6-1', 'T1_3-1', 'T5_7-1', 'T0_4-1', 'T2_6-1',
                 'T1_5-1', 'T3_7-1', 'V0_1-1', 'V2_3-1', 'V4_5-1', 'V6_7-1'
             })
def test_swap_network_trotter_ansatz_param_bounds():

    ansatz = SwapNetworkTrotterAnsatz(hubbard_hamiltonian)
    assert ansatz.param_names() == [
        'V0_1', 'T0_2', 'T0_4', 'T1_3', 'T1_5', 'V2_3', 'T2_6', 'T3_7', 'V4_5',
        'T4_6', 'T5_7', 'V6_7'
    ]
    assert ansatz.param_bounds() == [(-1.0, 1.0), (-2.0, 2.0), (-2.0, 2.0),
                                     (-2.0, 2.0), (-2.0, 2.0), (-1.0, 1.0),
                                     (-2.0, 2.0), (-2.0, 2.0), (-1.0, 1.0),
                                     (-2.0, 2.0), (-2.0, 2.0), (-1.0, 1.0)]