Skip to content

Challenge 4

kifumi edited this page Nov 2, 2021 · 16 revisions

Why am I seeing "BrokenProcessPool" error in prepare_ex4c?

This is likely due to memory issues when creating the job with a large and complex circuit. We are investigating the issues further. In the mean time, you can try to run the notebooks locally and grade locally.

Why am I seeing "Unable to obtain job URLs" error in grade_ex4c?

You can follow the steps mentioned by Yusheng Zhao in the challenge slack channel to resolve this issue. Alternatively, you can try re-run prepare_ex4c to submit another job and grade again.

Can I get more meaningful error messages than Oops 😕! Your answer is incorrect?

Yes, in fact we have implemented a few meaningful error messages but a bug has prevented the messages to come through when grade_ex4c(job) is run. Here's a work around:

from qc_grader.grade import grade_job
grade_job(job, '4c')

However, grade_job only checks your answer, it does NOT submit your answer. To submit your answer, please use grade_ex4c(job).

U1 formula in Challenge 4c -Step 1

The correct equation of U1 gate is; U1(-gamma*(L2-L1))=exp^(-i(gamma*(L2-L1))) Also, be careful to use the appropriate sign in the phase of U1, when creating phase_return function.

4c Rules Reminder

  1. You may not change the submission code in the “### DO NOT CHANGE THE CODE BELOW” section. We defined this code to ensure that the precision will be evaluated correctly by the grader. In order to judge everyone’s code fairly, please do not change the parameter (p, alpha, beta, gamma) and the function arguments.

  2. Additionally, you may not add new registers in the "### DO NOT CHANGE THE CODE BELOW” section.

  3. Please fix the seed to 42 in case you want to use the transpile option.

  4. Submissions from the top 10 scorers will be examined by the judges to make sure their implementations do not violate the rules. Judges will also verify the following:

    • In constraint_testing function, you need to set the flag to 1 if and only if the solution is infeasible.
    • By reinitialization function, the data_qubits and qr_f must be initialized to zero.
  5. If you just want to experiment your code, you can use the following code to check your solution without submission. The grade_job() function will also return more meaningful messages when your solution is not correct to guide you.

from qc_grader.grade import grade_job
grade_job(job, '4c')

However, grade_job only checks your answer, it does NOT submit your answer. To submit your answer, please use grade_ex4c(job).

  1. When you have solved the last exercise 4c, please DM your code to @Kifumi Numata! The challenge development team would like to have a head start on evaluating your code.
  2. We will also be creating a folder on our public github repo for our participants to share their solutions after the challenge concludes, including other approaches or methods for solving 4c, such as using Grover circuit, etc.
Clone this wiki locally