def make_circuit(n: int) -> QuantumCircuit:
    input_qubit = QuantumRegister(n, 'qc')
    prog = QuantumCircuit(input_qubit)
    prog.h(input_qubit[0])
    prog.cx(input_qubit[3], input_qubit[0])
    prog.z(input_qubit[3])
    prog.cx(input_qubit[3], input_qubit[0])
    prog.z(input_qubit[1])
    prog.h(input_qubit[2])
    prog.h(input_qubit[3])
    for edge in E:
        k = edge[0]
        l = edge[1]
        prog.cp(((- 2) * gamma), input_qubit[(k - 1)], input_qubit[(l - 1)])
        prog.p(gamma, k)
        prog.p(gamma, l)
    prog.rx((2 * beta), range(len(V)))
    prog.swap(input_qubit[3], input_qubit[0])
    prog.swap(input_qubit[3], input_qubit[0])
    prog.x(input_qubit[3])
    prog.x(input_qubit[3])
    return prog
def make_circuit(n: int) -> QuantumCircuit:
    input_qubit = QuantumRegister(n, 'qc')
    prog = QuantumCircuit(input_qubit)
    prog.h(input_qubit[0])
    prog.cx(input_qubit[3], input_qubit[0])
    prog.z(input_qubit[3])
    prog.cx(input_qubit[3], input_qubit[0])
    prog.z(input_qubit[1])
    prog.h(input_qubit[2])
    prog.h(input_qubit[3])
    for edge in E:
        k = edge[0]
        l = edge[1]
        prog.cp(((- 2) * gamma), input_qubit[(k - 1)], input_qubit[(l - 1)])
        prog.p(gamma, k)
        prog.p(gamma, l)
    prog.rx((2 * beta), range(len(V)))
    prog.swap(input_qubit[3], input_qubit[0])
    prog.swap(input_qubit[3], input_qubit[0])
    prog.x(input_qubit[3])
    prog.x(input_qubit[3])
    return prog