# Method to mark only when certain conditions are satisfied in the superposition states of qubits

I am Newbie in Quantum Computing World.

While studying on my own, I was curious about one thing, so I asked this question.

My question is as follows:

1. When I configure the superposition states of qubits through Hadamard gate and input this to a certain function, for output superposition states of qubits, is there a way to mark only two cases that meet certain conditions through checker qubits?

For example, consider the superposition states with the number of $$2^{128}$$ cases composed of 128 qubits (meaning after passing through the Hadamard gate).

Let's say we input this to a certain function (running on the quantum circuit) and get the output as superposition states. At this time, I want to mark in checker qubit(or ancill qubit) only two inputs that satisfy a specific value by performing xor (exclusive or) among the outputs. Are there any algorithms that can do this?

All the best!

• Welcome! Please only include one question per post :) Apr 13 at 13:44
• @met927 I edited it! Apr 13 at 14:56