Skip to content

Challenge 2

Samanvay Sharma edited this page Nov 1, 2021 · 2 revisions

Why am I seeing "File Save Error for challenge-x.ipynb, Invalid Response: 403 Forbidden"?

This is caused by the interactive Javascript plot object ProgressPlot. If you see this error for challenge-2.ipynb, remove/comment out the sections in the notebook that is related to the ProgressPlot python object.

I am having an issue with the Challenge-2f provider.

You may see this message You have been not assigned to a challenge provider yet. Note that you need to pass at least one exercise, and it may take up to 12 hours to get assigned. Meanwhile, please proceed to other exercises and try again later. even though you have been assigned the challenge provider (you can verify on the bottom of this page or if you have received an email titled You have been added to a new project in IBM Quantum). Try running this cell twice more to get the provider:

from qc_grader.util import get_challenge_provider
provider = get_challenge_provider()
if provider:
    backend = provider.get_backend('ibmq_qasm_simulator')

You can verify that you got the challenge provider by using

print(provider)

As a result you should see something like this <AccountProvider for IBMQ(hub='iqc-fall-21-n', group='challenge-m', project='somerandomnumber')> where n and m are some small integers.

Why does my Runtime job keep failing?

If your runtime jobs failed, it’s likely due to an empty initial_point or mismatch of initial_point with the number of parameters in the ansatz. Please double check the dimension of initial_point correspond to anasatz.num_parameters.

We also notice that when using TwoLocal ansatz, the num_parameters can sometimes be 0 with unknown reason, which in turn making initial_point empty due to the cell containing this line: initial_point = np.random.random(ansatz.num_parameters). If you encounter this problem, please try EfficientSU2 or PauliTwoDeisgn ansatze instead.

Why Sum of amplitudes-squared does not equal one for Challenge-2e when using QEOM?

While running QEOM in Challenge-2e you may see an error when executing the line qeom_excited_state_solver.solve(es_problem), which says Sum of amplitudes-squared does not equal one.. This is a bug in Qiskit Nature. This happens when two qubit reduction is set as true. To solve this just avoid using two-qubit reduction for QEOM.