I'm a beginner with Qiskit and the Python language at all.
Here is my question:
One of the VQE function arguments is qubit operator (qubitOp
).
I saw some examples where the qubitOp
object was produced by some already existing Qiskit
module.
For example, in the following fragment:
qubitOp, offset = max_cut.get_max_cut_qubitops(w)
qubitOp
is an Ising Hamiltonian produced from the connection weights matrix.
But how can I define the qubitOp
entirely by myself, from the very beginning?
(My actual goal is to enrich the Ising Hamiltonian with spin's interactions with the external magnetic field).
Thanks!
qubitOp
by yourself by having a look at the source code forget_max_cut_qubitops
, which you can find here. But a minimal working example would help me get a quick example working more quickly $\endgroup$