New answers tagged

1

He generally refers to QRAM. But there are other ways to load data in a quantum computer, generally referred as quantum embeddings or quantum feature maps. They are generally more near-term oriented than QRAM. Yet with a QRAM, you can design an algorithm with the goal of obtaining a possible expression of a speedup against a classical version. This article, ...


2

Controlled version of $e^{iHt}$: Often in the algorithms (e.g. in HHL or PEA), we want to construct not the circuit for Hamiltonian simulation $e^{iHt}$, but the controlled version of it. For this, we will use the result obtained from the previous answer. First of all, note that if we have $ABC$ circuit, where $A$, $B$ and $C$ are operators, then the ...


0

You can use a method described in Transformation of quantum states using uniformly controlled rotations. Authors of the article introduced method how to change an arbitrary state $|a\rangle$ to state $|b\rangle$ with so-called uniformly controlled rotation, i.e. a rotation which rotational angle depends on combination of zeros and ones in controlling ...


0

What you seem to be asking for is the general construction of an arbitrary permutation. There’s nothing quantum about this; the equivalent question in classical is how to construct an arbitrary reversible circuit of n bits. There are $2^n!$ such circuits, from which it is hopefully obvious that there is not a compact description for the vast majority. I ...


4

An approach for Hamiltonian simulation: Any Hermitian (Hamiltonian) matrix $H$ can be decomposed by sum of Pauli products with real coefficients (see this thread). An example for 3 qubit Hamiltonian: $$H = 11 \sigma_z \otimes \sigma_z + 7 \sigma_z \otimes \sigma_x - 5\sigma_z \otimes \sigma_x \otimes \sigma_y$$ The final circuit for $e^{iHt}$ can be ...


1

I tried to simulate on IBM Q. I realized that input states $|01\rangle$ and $|10\rangle$ have oposite phase in comparison with others. This is desired behavior of the algorithm because these states have to be marked. Phase of other two states is intact. Because two states are marked and two do not, average amplitude is zero. When you rotate amplitudes around ...


1

I would recommend the following resources. Quantum annealing is about QUBO/Ising formulations. First thing would be to get familiar with the formulations, and see examples of how do you formulate a few problems: A Tutorial on Formulating and Using QUBO Models Ising formulations of many NP problems Then, if you have a specific problem you would like to ...


3

First it is instructive to ask oneself: "how does classical data get into my computer?" In a classical computer, your data is always stored in bits. Because calculations in base 2 are not very straightforward for most people there are abstractions like int types for integers and float types for rational numbers with the associated math operations readily ...


0

MD5 hashes are not that hard to crack classically, you probably don't need a quantum computer to do that (for your hash prefix, the pre-image is 2435435 with full hash 9a4f2e9567f170c5685b57d8a6c0af6f). In general, one can use Grover's search algorithm for breaking hash functions; you'd have to implement the hash calculation in a reversible manner (so that ...


2

You cannot deploy C# to Q# Azure platform; Q# Azure platform executes a Quantum Simulator. The C# host program calls Q# operations to be executed on the Quantum Simulator - the code you have here will execute on a traditional computing processor. Please read this link - https://docs.microsoft.com/en-us/quantum/quickstart And this link more about the ...


3

Designing a logical function for quantum computer is similar to same process for classical one. You can also use truth tables. But you have to design the function to be reversible. Assume you have truth table for logical function $f(x): \{0;1\}^n \rightarrow \{0,1\}$, then reversible equivalent can be build in this way: $$ |x_n\rangle |y\rangle \rightarrow |...


1

Regarding (c) - Too see what can go wrong, we'll need to take a step back and look at Shor's Algorithm assumptions. Basically, the algorithm says we need to pick a random $X$, find its order $r$, and finally calculate $X^\frac{r}{2} \pmod N$ to get information about $N$. $N$ is of the form $2P$, thus by Chinese Remainder Theorm it will only have two roots ...


2

I disagree. By no means is there a scarcity of quantum algorithms. Consider for example this review on Quantum Machine Learning. Therein the term qBLAS is contained for Quantum Linear Algebra Subroutines. This term describes all the quantum algorithms that exist for basic linear algebra tasks. Together with the (in)famous Grover Algorithm that gives a ...


2

Found by just trying stuff in Quirk:


Top 50 recent answers are included