Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quantum-kittens
GitHub Repository: quantum-kittens/platypus
Path: blob/main/notebooks/summer-school/2021/lab5.ipynb
3855 views
Kernel: Python 3

Lab 5: Introduction to Hardware Efficient Ansatze for Quantum Machine Learning

In this lab, you will see how noise affects a typical parameterized quantum circuit used in machine learning using quantum process tomography.

  • Graded Exercise 5-1: Build the quantum circuit

  • Graded Exercise 5-2: Quantum Process Tomography with only shot noise

  • Graded Exercise 5-3: Build a T1/T2 noise model

  • Graded Exercise 5-4: Quantum Process Tomography with T1/T2 noise

  • Graded Exercise 5-5: Quantum Process Tomography with mitigated T1/T2 noise

  • Exploratory Exercise: Quantum Process Tomography with varying CX gate durations

Lab Tips / Hints

  • For pi, one of the option available is np.pi

FAQ

Why I am getting such low fidelity? Make sure your target and target_unitary refer to the same circuit, and that if you are copying and pasting code, to check the variable names.
I'm getting this output `<NoiseModel on ['u2', 'reset', 'cx', 'u3', 'measure']> U1 is missing`. Did I do something wrong? No nothing is wrong! That is because the time for u1 `time_u1=0`. So U1 is merely a virtual gate.
I'm getting this QiskitError: "Unexpected state label '00 01', verify the fitter's state labels correspond to the input data" How many qubits are in your circuit? Make sure it matches how many you are measuring.
I'm getting this `QiskitError: "Object of type ProcessTomographyFitter is not JSON serializable"` The grader is expecting a float value called fidelity and not `ProcessTomographyFitter()` object.
My circuit seems to be right but isn't being accepted by the grader. Use `.draw()` to draw the circuit you made and check whether you have put all angles and syntax right or not.
I'm getting this QiskitError: "Result for (('Zp', 'Zp'), ('X', 'X')) not found". Make sure you are using right results in `meas_filter.apply()` and `ProcessTomographyFitter()`