• Members 22 posts
    Oct. 27, 2021, 11:01 p.m.

    I am working on portfolio optimization problem using VQE in qiskit. In their tutorial it use some two local quantum circuit as the ansatz.

    algorithm_globals.random_seed = 1234
    backend = Aer.get_backend('statevector_simulator')
    
    cobyla = COBYLA()
    cobyla.set_options(maxiter=500)
    ry = TwoLocal(num_assets, 'ry', 'cz', reps=3, entanglement='full')
    quantum_instance = QuantumInstance(backend=backend, seed_simulator=seed, seed_transpiler=seed)
    vqe_mes = VQE(ry, optimizer=cobyla, quantum_instance=quantum_instance)
    vqe = MinimumEigenOptimizer(vqe_mes)
    result = vqe.solve(qp)
    

    Is there any other choice of ansatz for VQE that I could try?

  • Members 11 posts
    Oct. 28, 2021, 9:55 a.m.

    You can change the candidate of 1 or 2 qubit gates from ry,cz to something else. You may also change the entanglement type from full to linear, circular etc. I believe there are ways to construct other more custom ansatz.