PennyLane Challenge: Noisy QAOA

Use this topic to ask your questions about the PennyLane Challenge: Noisy QAOA.

I am not sure why only my first public test set and all private tests work. My step variable ‘steps = 250’
Running submission…

          Running on public test set

                Test 1 of 2 passed! ✅
                    Input: [1, 0.003]
                    Expected output: 0.1307
                    Solution output: 0.13011411675043585

                Test 2 of 2 failed! 🚫
                    Input: [2,0.005]
                    Expected output: 0.4875
                    Solution output: 0.46662334164166946
                    Failure message: Assertion Error.

          Running on private test set

                Success! 🎉 

I changed it to 249 and it worked! :smile:

That’s great @Hanah_Rahman !

I am a bit confused. When I look at the tutorial, the depth of qaoa_larer is used in the cost function, but in the challenge problem, it only appears as an argument of the approximation_ratio function. Should the cost function be defined in approximation_ratio instead of qaoa_circuit ?

Hey @Mayu! Welcome back :rocket:

In the “Intro to QAOA” tutorial, depth was just taken to be a fixed value (depth = 2). In the challenge, qaoa_depth (same purpose as depth in the tutorial) is used within approximation_ratio to create parameters for the qaoa_circuit (they need to be optimized). Let me know if that clears things up!

1 Like

Hi, @isaacdevlugt ! I’ve misunderstood! I thought the qml.layer function would repeat the same parameter for the number of depths. Thanks for your hint! :raised_hands:

1 Like

Awesome! Glad I could help :slight_smile:

1 Like