Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON serializable error #51

Open
atul20027 opened this issue Jun 14, 2024 · 5 comments
Open

JSON serializable error #51

atul20027 opened this issue Jun 14, 2024 · 5 comments

Comments

@atul20027
Copy link

when i m submitting the option_0 and option_1 to the grade_lab4_ex7 ... it is giving the error

TypeError: Object of type UnsetType is not JSON serializable

@jgs03177
Copy link

The grader checks the following parameters:

options.resilience_level,
options.dynamical_decoupling.enable,
options.dynamical_decoupling.sequence_type,
options.default_shots,
options.optimization_level

However, some parameters are Unset, which the grader cannot read. Try setting all the parameters.

@HavokSahil
Copy link

@jgs03177 Considering I turn options.dynamical_decoupling.enable to False, what should I put in options.dynamical_decoupling.sequence_type, it seems it's required anyway

@vantnprof
Copy link

I tried set all required parameters, but the answer was incorrrect. Do you guys know what wrong in my case?
Thank you for your reading.

# Submit your answer using following code
options_0 = EstimatorOptions()
options_0.default_shots = 5000
options_0.optimization_level = 0
options_0.resilience_level = 0
options_0.dynamical_decoupling.enable = False
options_0.dynamical_decoupling.sequence_type = "XX"
options_0.resilience.measure_mitigation = False
# options_0.twirling.enable_gates = False
options_0.twirling.enable_measure = False
options_0.resilience.zne_mitigation = False

options_1 = EstimatorOptions()
options_1.default_shots = 5000
options_1.optimization_level = 0
options_1.resilience_level = 1
options_1.dynamical_decoupling.enable = True
options_1.dynamical_decoupling.sequence_type = "XpXm"
options_1.resilience.measure_mitigation = False
# options_1.twirling.enable_gates = False
options_1.twirling.enable_measure = False
options_1.resilience.zne_mitigation = False

grade_lab4_ex7(options_0, options_1) # Expected answer type: EstimatorOptions, EstimatorOptions

@HavokSahil
Copy link

@vantnprof "XpXm" in dd sequence type for option_0 worked for me

@vantnprof
Copy link

Thanks for your sharing. It worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants