• CattyMpanorama_fish_eye
    17 posts
    4 years

    I wonder how I can plug in my own customized wavefunction form while using VQE in qiskit. Thanks in advance!

  • edit

    Thread title has been changed from Parameterizing wavefunciton in qiskit VQE.

  • JXWpanorama_fish_eye
    19 posts
    4 years

    You can parameterized your QuantumCircuit before plugging it into VQE. For example

    from qiskit.algorithms import VQE
    from qiskit.circuit.library import EfficientSU2
    
    # the rotation gates are chosen randomly, so we set a seed for reproducibility
    num_qubits = 4
    ansatz = EfficientSU2(num_qubits, reps=1, entanglement='linear', insert_barriers=True)
    
    vqe = VQE(ansatz=ansatz, ... )
    

    You can see a full example here: qiskit.org/documentation/partners/qiskit_runtime/tutorials/vqe.html

There are no more posts in this thread.

first_page
chevron_left
chevron_right
last_page