2

This is code from Chapter 6.1 of the qiskit textbook, which shows a job being run. How would you change the first line of the backend.run() command, the schedules parameter, in order to use it for a measurement for a constant pulse shape. The schedules parameter from the given code represents a frequency sweep that was defined earlier in the qiskit textbook. I want to keep the other parameters of backend.run the same and change the schedules part to something else and use this command on a constant pulse shape. I don't know exactly how to modify the schedules part of the command properly.

num_shots_per_frequency = 1024
job = backend.run(schedules, meas_level=1, meas_return='avg', shots=num_shots_per_frequency)

1 Answers1

2

Example 1

The backend defaults provide a starting point for how to use the backend. It contains estimates for qubit frequencies and default programs to enact basic quantum operators. We can access them with the following:

backend_defaults = backend.defaults()

As you can see backend itself is a command. You can change it with loading parameters (here defaults() parameters).


Example 2

Or another example, backend_config equals backend.configuration(). The configuration() is a method within the backend. The given name is backend_config. In the second line you see that the object assert will be defined by the backend_config.open_pulse. That's how you change the backends parameter. Just normal programming. I suggest to get more familiar with python.

backend_config = backend.configuration()
assert backend_config.open_pulse, "Backend doesn't support Pulse"

In conclusion you modify the backend with a method (configuration()) and change the methods parameter applied on the backend.

PS: run() is just a method also.

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33