-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
What is the expected behavior?
In the current implementation of T1 experiment, delays
is passed to the constructor and becomes an immutable instance variable. This should be runtime option so that we can update scan range without creating new instance.
For me, in the experiment that scans some parameters, it is more preferable if we can check the parametrized circuit rather than list of circuits with assigned parameters. This can be implemented with
self._delay = Parameter('delay')
experiment_circuit = QuantumCircuit(1, 1)
experiment_circuit.x(0)
experiment_circuit.barrier(0)
experiment_circuit.delay(self._delay, 0, self._unit)
experiment_circuit.barrier(0)
experiment_circuit.measure(0, 0)
self._experiment_circuit = experiment_circuit # we have some property to show this, no setter
and in .circuits
method
t1_circuits = []
for delay in delays:
circ = self._experiment_circuit.assign_parameters({self._delay: delay}, inplace=False)
circ.metadata = ...
t1_circuits.append(circ)
This will allow us to check the circuit with parameter.
t1_exp.experiment_circuit.draw()
┌───┐ ░ ┌──────────────────┐ ░ ┌─┐
q_0: ┤ X ├─░─┤ DELAY(delay[dt]) ├─░─┤M├
└───┘ ░ └──────────────────┘ ░ └╥┘
c: 1/════════════════════════════════╩═
0
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request