This happens when your solution doesn’t work for all valid inputs. Private tests are secret and they’re used to ensure that your solution actually works as expected for any valid input. So for example if you tweak you solution to work only for the inputs in the public tests, your code might fail for other inputs such as the private ones.
You’re probably close to the answer if you already got your code to work for the public tests. You can make up your own test scenarios of input vs expected output to keep improving and testing your solution! This can help you find where you can improve your code.
I hope this helps and good luck with the challenge!
It looks like your solution isn’t correct.
In your particular case it looks like you’re using the word ‘level’ somewhere in your solution and this is causing the error.
Keep trying and you’ll succeed with the challenge!
If you’re stuck make sure to check the Codebook, the documentation, and the examples available at pennylane.ai.
Your W layer doesn’t look right. If you look closely at the instructions you’ll note that all of the RY gates are applied before all of the CNOT gates for each layer. In your case it looks like all of the RY and CNOT layers are alternating which is not the same.
From the image you shared it’s hard to know whether your implementation for S is correct or not.
Give the challenge a new try and you’ll surely succeed!
Hi there! I’ve almost completed the challenge, but am having issues with defining my device. My code passes the public tests when I set my device to 4 qubits. I am not sure how this can be made dynamic to pass all of the private tests.
So far, I have been defining the number of qubits within my functions based on the length of params[0] (for the W block) or param_set[0][0] (for the quantum_model circuit). However, these cannot be used to specify the number of qubits outside of the functions, as these matrices are not accessible prior to when the device needs to be defined. What could I try to make a device with the correct number of qubits?