Flagvent 2025: Day 9
FV25.09 - Quantum Elves
Difficulty
hard
Categories
fun
Description
Oh no! Four of Santa's elves accidentally fell into a quantum transformer - a “gift” for a physicist. Now, the elves are in a strange quantum state: if we peek inside, either all of them are alive or all of them are… not. Luckily, you can program the machine using three magical operations:
Elf Inverter (X) – flips an elf from alive ↔ dead
Controlled Elf Inverter (CX) – flips one elf depending on the state of another
Elf Superpositioner (H) – puts an elf in a delicate “maybe alive, maybe dead” state
The elves are numbered 0 to 3. Input your operations like this: operation:elf_index For CX, separate the two elves with a comma: CX:control,target Chain multiple operations with pipes, for example: H:0|CX:3,1|X:2 Your mission: help Santa get all the elves into a state where they will be alive 100% of the time.
Author
villambarnaSolution
The challenge takes us to the Quantum Transformer Operator website:

Our goal is to make the probability of each Elf being alive equal to 1.
By experimenting and playing around with the available operators, we were able to quickly come up with a valid input that achieves this:
CX:0,1|X:1|CX:0,2|X:2|CX:0,3|X:3|H:0|X:0Entering this input into the website gives us the daily flag:
Elf index: 0 1 2 3
Probability of being alive: 1 1 1 1
Are all the elves alive? true
Flag: FV25{Qu4ntum_c0mput1ng_1s_fun!}Flag:
FV25{Qu4ntum_c0mput1ng_1s_fun!}