-
Operating with Quantum Integers: an Efficient 'Multiples of' Oracle
Authors:
Javier Sanchez-Rivero,
Daniel Talaván,
Jose Garcia-Alonso,
Antonio Ruiz-Cortés,
Juan Manuel Murillo
Abstract:
Quantum algorithms are a very promising field. However, creating and manipulating these kind of algorithms is a very complex task, specially for software engineers used to work at higher abstraction levels. The work presented here is part of a broader research focused on providing operations of a higher abstraction level to manipulate integers codified as a superposition. These operations are desi…
▽ More
Quantum algorithms are a very promising field. However, creating and manipulating these kind of algorithms is a very complex task, specially for software engineers used to work at higher abstraction levels. The work presented here is part of a broader research focused on providing operations of a higher abstraction level to manipulate integers codified as a superposition. These operations are designed to be composable and efficient, so quantum software developers can reuse them to create more complex solutions. Specifically, in this paper we present a 'multiples of' operation. To validate this operation we show several examples of quantum circuits and their simulations, including its composition possibilities. A theoretical analysis proves that both the complexity of the required classical calculations and the depth of the circuit scale linearly with the number of qubits. Hence, the 'multiples of' oracle is efficient in terms of complexity and depth. Finally, an empirical study of the circuit depth is conducted to further reinforce the theoretical analysis.
△ Less
Submitted 10 April, 2023;
originally announced April 2023.
-
Some Initial Guidelines for Building Reusable Quantum Oracles
Authors:
Javier Sanchez-Rivero,
Daniel Talaván,
Jose Garcia-Alonso,
Antonio Ruiz-Cortés,
Juan Manuel Murillo
Abstract:
The evolution of quantum hardware is highlighting the need for advances in quantum software engineering that help developers create quantum software with good quality attributes. Specifically, reusability has been traditionally considered an important quality attribute in terms of efficiency of cost and effort. Increasing the reusability of quantum software will help developers create more complex…
▽ More
The evolution of quantum hardware is highlighting the need for advances in quantum software engineering that help developers create quantum software with good quality attributes. Specifically, reusability has been traditionally considered an important quality attribute in terms of efficiency of cost and effort. Increasing the reusability of quantum software will help developers create more complex solutions, by reusing simpler components, with better quality attributes, as long as the reused components have also these attributes. This work focuses on the reusability of oracles, a well-known pattern of quantum algorithms that can be used to perform functions used as input by other algorithms. In particular, in this work, we present several guidelines for making reusable quantum oracles. These guidelines include three different levels for oracle reuse: the ideas inspiring the oracle, the function which creates the oracle, and the oracle itself. To demonstrate these guidelines, two different implementations of a range of integers oracle have been built by reusing simpler oracles. The quality of these implementations is evaluated in terms of functionality and quantum circuit depth. Then, we provide an example of documentation following the proposed guidelines for both implementations to foster reuse of the provided oracles. This work aims to be a first point of discussion towards quantum software reusability. Additional work is needed to establish more specific criteria for quantum software reusability.
△ Less
Submitted 27 March, 2023;
originally announced March 2023.
-
Automatic Generation of an Efficient Less-Than Oracle for Quantum Amplitude Amplification
Authors:
Javier Sanchez-Rivero,
Daniel Talaván,
Jose Garcia-Alonso,
Antonio Ruiz-Cortés,
Juan Manuel Murillo
Abstract:
Grover's algorithm is a well-known contribution to quantum computing. It searches one value within an unordered sequence faster than any classical algorithm. A fundamental part of this algorithm is the so-called oracle, a quantum circuit that marks the quantum state corresponding to the desired value. A generalization of it is the oracle for Amplitude Amplification, that marks multiple desired sta…
▽ More
Grover's algorithm is a well-known contribution to quantum computing. It searches one value within an unordered sequence faster than any classical algorithm. A fundamental part of this algorithm is the so-called oracle, a quantum circuit that marks the quantum state corresponding to the desired value. A generalization of it is the oracle for Amplitude Amplification, that marks multiple desired states. In this work we present a classical algorithm that builds a phase-marking oracle for Amplitude Amplification. This oracle performs a less-than operation, marking states representing natural numbers smaller than a given one. Results of both simulations and experiments are shown to prove its functionality. This less-than oracle implementation works on any number of qubits and does not require any ancilla qubits. Regarding depth, the proposed implementation is compared with the one generated by Qiskit automatic method, UnitaryGate. We show that the depth of our less-than oracle implementation is always lower. This difference is significant enough for our method to outperform UnitaryGate on real quantum hardware.
△ Less
Submitted 13 March, 2023;
originally announced March 2023.