Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

6.5 Change the actual machine and modified to use Pulse Gate #1541

Closed
wants to merge 5 commits into from

Conversation

kUmezawa
Copy link
Collaborator

Changes made

  1. Change the actual machine from armonk to manila and correct the value of the variable that depends on the actual machine.
  2. Modified to use Pulse Gate.

Justification

Relating issue: https://github.com/qiskit-community/qiskit-textbook/issues/1432

  1. With the end of service of the actual machine armonk, the code will not work as it is now.
  2. In order to experiment with pulses with manila device using the open provider, we have to write Pulse Gate.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kUmezawa
Copy link
Collaborator Author

@nkanazawa1989
I would like you to review this PR.

  • Change from armonk to manila.
  • Change to use Pulse Gate.

Thank you.

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #3.    frequencies_range = np.linspace(center_freq + 240e3, center_freq + 260e3, 41)

Why this scans only on positive side?


Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkanazawa1989
sorry for the late reply.
This is because the range is narrowed down because the noise is great overall.

This is the result of an experiment in the frequency domain below.

center_freq = backend_defaults.meas_freq_est[qubit]  # an estimate for the resonator frequency
freq_span = 0.2e6 # resonator scan span. The span should be larger than the resonator linewidth kappa
frequencies_range = np.linspace(center_freq-freq_span/2, center_freq+freq_span/2, 41)

image

This is the result of an experiment in the frequency positive side

center_freq = backend_defaults.meas_freq_est[qubit]  # an estimate for the resonator frequency
freq_span = 0.2e6 # resonator scan span. The span should be larger than the resonator linewidth kappa
frequencies_range = np.linspace(center_freq + 240e3, center_freq + 260e3, 41)

image

This is the result of an experiment in the frequency negative side

center_freq = backend_defaults.meas_freq_est[qubit]  # an estimate for the resonator frequency
freq_span = 0.2e6 # resonator scan span. The span should be larger than the resonator linewidth kappa
frequencies_range = np.linspace(center_freq - 260e3, center_freq - 240e3, 41)

image

I judged that the positive side has a peak. However, it cannot be denied that it is arbitrary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was running with amp=0.24. It may be too big.

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #9.        duration = get_closest_multiple_of_16(pulse.seconds_to_samples(readout_time))

You can use new function get_closest_multiple_of you implemented instead of this hard-coding the IBM number.


Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I will change .

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #5.    qc_meas_spect.add_calibration(meas_spect_gate, (0,), meas_spect_sched, [freq, amp])

This should use variable qubit number instead of hard-coded (0,). Since you provide meas_spect_gate knowing parameters in the first argument, you don't need to explicitly give [freq, amp] here. In addition, you need to transpile this circuit for qubit layout.

physical_qc = transpile(qc_meas_spect, initial_layout=[qubit], coupling_map=backend.configuration().coupling_map)

Without this lowering, you cannot use qubit other than 0.



Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment.
OK. I will change .

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this experiment doesn't work well. The amp=0.3 might be too strong for this device. Probably you can use backend calibrated measurement pulse parameters as a starting point. I have no idea to roughly estimate the amplitude beyond the critical photon limit for the following expeirment.


Reply via ReviewNB

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this a standard T1 experiment, you don't need to full-scratch the T1 experiment at pulse level. If the purpose of this section is to write everything with pulse, then this approach should be fine. Otherwise, you can use

qc = QuantumCircuit(1, 1)
qc.x(0)
qc.delay(delay, 0)
qc.measure(0, 0)

and transpile it with initial layout.


Reply via ReviewNB

@@ -66,36 +66,8 @@
"from qiskit.compiler import transpile, assemble\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any reason to use level1 measurement. The signal outcome may be sometime inverted depending on the calibration of the meas pulse. I'm also surprised that qubit T1 is really high.


Reply via ReviewNB

@frankharkins
Copy link
Collaborator

Thanks for your contribution. I'm closing this pull request as this repository is no longer used and is being archived. You can find the latest version of the Qiskit Textbook online at https://qiskit.org/learn/, and the new content repository at Qiskit/textbook. Please feel free to re-open this pull request there if it's still relevant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants