How Ketcode checks your circuits

November 16, 2026

Every challenge asks you to write a function that returns a quantum circuit. Here is what Ketcode does with it.

Two sandboxes, not one

Your code first runs in an isolated sandbox with no network access and strict time and memory limits. That run calls your functions with each test input and records the circuits they return as plain data. A second, fresh sandbox, one that never sees your code, rebuilds those circuits and checks them against the tests. Your code can only influence the result through the circuits it builds, which keeps grading fair for everyone.

Correct solutions earn points

A correct solution earns points for its difficulty: 100 for Easy, 200 for Medium and 300 for Hard. Each challenge counts once, and your best recorded score is kept.

The leaderboard ranks by total score, then problems solved. Time, attempts and code length never count against you.

Run before you submit

Run checks your code without recording anything, so experiment freely. When everything passes, submit to record the solve. Your best recorded score for each challenge is the one that counts.

← All posts