q-optimize/c3

Custom qiskit gates for parameter update

lazyoracle opened this issue · 0 comments

Describe the missing feature

Currently updating experiment parameters while using the c3.qiskit interface is made possible either through directly accessing the underlying c3.experiment object (ref: #169) or by passing the params and opt_map arguments to the backend.run() call (ref: #194). This works fine but prevents easy serialisation of the qiskit jobs to be run on a remote simulator. Also, when interfacing with hardware, updating control options (eg pulse amplitudes or detuning frequencies etc) through custom gates is an approach that has worked well with the qccs stack in PGI-13-FZJ. The simulator should have an identical interface to allow seamless switching back and forth between hardware and simulator.

Describe the solution you'd like

from c3.qiskit.c3_gates import RX90pGate, SetParamsGate
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
qc.append(RX90pGate(), [0])
qc.append(SetParamsGate(), {'params': params, 'opt_map': opt_map})

Describe alternatives you've considered

See above

Additional context

See also: #199, there has to be a check to trigger propagator recomputation at the correct point when there exists a SetParamsGate in one of the circuits of a multi-circuit qiskit job.