As if the prospect of quantum computing being able to tackle challenges currently impossible by today’s supercomputers wasn’t enticing enough, it’s also proposed that quantum computing will enable us to address issues that would be unmanageable for any supercomputer conceivable.

In 2019, Google emerged as the pioneer in achieving quantum supremacy, with their Sycamore quantum computer completing an unattainable task for traditional computers. A few years later, in 2021, a Chinese research group announced that its quantum computer, Zuchongzhi, had resolved a problem in just an hour—a task that would have taken a classical supercomputer eight years.

However, the challenges that Sycamore and Zuchongzhi overcame were intentionally selected to showcase quantum computing’s superiority. Yet, these challenges need more practical significance.

The world is still awaiting proof that a quantum computer can outperform a classical computer in solving a significant problem more efficiently.

Regrettably, deploying quantum computing isn’t as simple as submitting a task to a quantum computer and expecting immediate success. Quantum computing introduces a fundamentally distinct method for processing information. Initially, we need to translate the problem into qubits. Subsequently, we must devise an algorithm that leverages superposition and entanglement to enhance computational speed.

This typically leads to discussions on quantum mechanics—the enigmatic behavior of subatomic particles understood by only an elite group of physicists.

We delve into concepts like quantum superposition—a sophisticated linear amalgamation of base states—and quantum entanglement, which describes the precise correlation between distant particles, a phenomenon that perplexes Einstein.

Grasping quantum mechanics requires a deep understanding of theoretical physics and a zeal for mathematics. Yet, as Richard Feynman, a Nobel Laureate renowned for his contributions to quantum mechanics, famously remarked, “If you think you understand quantum mechanics, you don’t understand quantum mechanics.”

Fortunately, utilizing a quantum computer doesn’t necessitate understanding quantum mechanics, much like using a classical computer, which doesn’t require knowledge of transistors. Nonetheless, quantum computing is predominantly taught by physicists, specifically theoretical physicists, who primarily employ mathematical approaches.

My feelings towards mathematics are mixed.

For many, including myself, mathematics poses a formidable challenge. It begins with deciphering the implicit meanings of symbols, making even basic formulas daunting unless one has a background in mathematics.

For those unacquainted with Dirac notation (|ψ⟩) or unfamiliar with vector operations, such formulas might as well be hieroglyphics:

However, it’s undeniable that mathematics is an effective medium for articulating technical ideas. It offers a language that is both concise and accurate. Conversely, our natural languages, like English, are verbose and need more precision. Explaining a set of mathematical formulas in natural language could fill an entire book.

Yet, most people find natural language more straightforward to comprehend than mathematics. This is attributed to learning our mother tongue from a young age and using it daily, even to the extent of dreaming. Whether some dream in mathematical equations remains to be determined.

Grasping an equation can be significantly more challenging when a student tackles it solo than reading a book. Given the inherent difficulty in understanding new concepts, it’s more natural to rely on our mother tongue when learning something new. This challenge escalates, becoming even more daunting, if not unfeasible, when instruction occurs in an unfamiliar language.

Indeed, mathematics serves as the foundational language of quantum mechanics and quantum computing. However, this raises the question: Why should instruction in quantum computing be confined solely to its native linguistic framework? Would it not be more beneficial to elucidate this subject in a manner more accessible to those endeavoring to comprehend it? The answer is a resounding yes!

Let me present an alternative elucidation of quantum computing—an explanation clarifying whether employing a quantum computer to tackle a specific problem is advisable.

Quantum computing functions as a tool for statistical modeling. We embed our statistical presumptions about the universe within an executable framework—the quantum circuit. This circuit facilitates our examination and deduction of the interrelations among variables, enabling us to uncover insights and formulate statistical forecasts about the world.

Quantum computing transcends mere software development that rigidly adheres to set instructions. It involves the construction of a statistical model, a process distinctly divergent from conventional software development. Thus, it is more apt to view this not as “software creation” or “programming” in the traditional sense but somewhat akin to the data science methodology of conducting statistical analyses on data sets, focusing on the dynamics between variables.

Initially, it is essential to identify (a) the explanatory (independent, predictive) variables that account for variances in (b) the response (dependent, outcome) variables.

Subsequently, one must ascertain the nature of the relationships between the explanatory and response variables and encode these relationships within your model.

The diagram below illustrates two variables, A and B. A represents an independent variable capable of assuming any value—for instance, if it is a Boolean variable, it could be either true or false. At this juncture, our understanding of it is limited. Conversely, B acts as a dependent variable, which likewise could represent any value. However, we recognize that its value is contingent upon the value of A.

The ensuing source code delineates the creation of such a statistical model in Python.

From the Qiskit library, import the QuantumCircuit and Aer and execute modules, along with the plot_histogram function for visualization. Also, include matplotlib—plot for plotting and mathematical functions like sin, sqrt, and pi from the math library.

Define a function run_circuit(qc, simulator=’qasm_simulator’, attempts=1000, histogram=True) that instructs Qiskit on simulating our quantum circuit. Select the backend with Aer’s get_backend method using the specified simulator. Execute the quantum circuit (qc) on the backend, limiting the number of attempts and obtaining the results. Plot the outcomes using a histogram if the histogram is accurate, or return the results directly otherwise.

Create another function, prob_to_angle(prob), to convert a given probability value (P(psi)) into an equivalent angle (theta) using the formula 2*asin(sqrt(prob)).

Set the marginal probability for variable A (var_a) to 0.4 and the conditional probability (var_ab) to 0.8. Initialize a QuantumCircuit with two qubits.

Apply the marginal probability to the first qubit using the ry gate, and implement the conditional probability using the cry gate when the condition for using the system is met. Measure all qubits at the end.

Execute the circuit without plotting the histogram to get the counts and then plan these counts using the histogram. The output reveals that the first qubit, at position 0, has a 60% chance of being either 0 or 1. At position 1, the second qubit has a 68% chance of being 0 and a 32% chance of being 1, yet it can only be one if the first qubit is also 1.

The qubits representing variables A and B are in a superposition state and are entangled, meaning they share a state regardless of distance. Observing one qubit immediately affects the state of the other, corresponding to the measurement of the first qubit.

Superposition and entanglement, fundamental quantum computing properties, are not focused on the physical processes but on their utility in computing. In the framework of statistical models, superposition indicates the various potential outcomes of our variables, each with a specific probability. Entanglement demonstrates conditional probabilities, highlighting the interactions between variables within a model. Such interactions are necessary to analyze independent variables, which offer less intriguing or helpful logic.

Mastering quantum computing entails understanding how to utilize superposition and entanglement, which requires some knowledge of linear algebra, though simple. It’s crucial to remember that qubits operate on a probabilistic basis, yielding measurements of either 0 or 1 based on the qubit’s unseen state and probability.

# Rienstra' Machine Learning Blog

Machine Learning, Machine Learning Ai, Machine Learning Tools, Machine Learning Course, Machine Learning Engineer