0

Im not at all sure how to word this question, but I will try my best. Im wanting to have examples of quantum algorithms that can complete logical parallel tasks. It extends beyond simply summation, for example multiplication, or finding the highest value, or a value closest to a given fixed value.

I know quantum algorithms can very easily "input" multiple states into a function/circuit and get a superposition of all answers, and even select specific desired outputs with grover's algorithm, but is it possible to incorporate multiple superposition into a final classical answer? Since there is no order to each "probability", obviously operations that depend on sequence are not possible.

Im trying to get into the mindset of how to make use of a quantum computer, and design circuits for it. Im not interested in theory or equations, just raw circuit/qasm diagrams.

Such examples that Im trying to refer to can be written as pseduo code like below

struct possibility {
  float weight;
  int value;
};

int summation(possibility[] input) {
  int result = 0;
  for (int i = 0; i < sizeof(input); i++) {
    result += input[i].value * input[i].weight;
  }
  return result;
}
int multiplication(possibility[] input) {
  int result = 1;
  for (int i = 0; i < sizeof(input); i++) {
    result *= input[i].value * input[i].weight;
  }
  return result;
}
int findClosest(possibility[] input, int toValue) {
  int result = input[0].value;
  int resultDistance = abs(toValue - result) * input[0].weight;
  for (int i = 1; i < sizeof(input); i++) {
    int distance = abs(toValue - input[i].value) * input[i].weight;
    if (distance < resultDistance) {
      result = input[i].value;
      resultDistance = distance;
    }
  }
  return result;
}

Sorry for my poor wording. Im not at all sure how to word this question better with my tiny knowledge in this subject. Any help at all is appreciated!

  • This is an extremely open ended question about a specialized topic. Perhaps https://cstheory.stackexchange.com/ is a better place to ask. As for myself, I'd look to someone like Scott Aaronson for recommendations about where to begin. – btilly Apr 10 '20 at 00:31
  • As a start to the weirdness, the logical operation "if" is not available within quantum computing. (All operations have to be reversible.) But superpositions of answers can interact with each other. However in the end you only get one answer out and you cannot get the superposition. Those are random things that I know, but they will get you no closer to actually understanding it. – btilly Apr 10 '20 at 00:32

0 Answers0