New answers tagged

6 votes
Accepted

How to simulate low-rank hamiltonian?

Let's assume that we know the circuit $V$ the constructs $|u\rangle$, i.e. $$ V|0\rangle=|u\rangle. $$ So, this reduces our problem to creating the evolution $$ V^\dagger UV=e^{-it|0\rangle\langle 0|}....
DaftWullie's user avatar
  • 57.9k
0 votes

Creating a uniform superposition of a subset of basis states

Please refer to Algorithm 1 in https://arxiv.org/abs/2306.11747. This is the most efficient deterministic method of preparing the uniform superposition states. Instead of using the probabilistic ...
Quantum_Brains's user avatar
1 vote

Exponentiating a tensor product of operators acting on disjoint qubit registers

I think the following would work: Perform phase estimation individually against each $O_j$, creating phase estimate registers $a_j$. Compute the superposed product $t = \prod_j a_j$. Phase by an ...
Craig Gidney's user avatar
  • 36.7k
1 vote

Getting rid of extra qubits without changing phase

Just apply $\text{CNOT}$ from the first qubit to every other qubit. Let $|\psi\rangle$ be the initial state. $$|\psi\rangle = \frac{1}{\sqrt{2}}|0000\rangle + \frac{e^{i\phi}}{\sqrt{2}}|1111\rangle\,.$...
FDGod's user avatar
  • 2,391
3 votes

What goes above this code fragment?

Here's the full code First make sure you have all libraries installed, like qiskit, matplotlib, pylatexenc ...
Yet another Random Guy's user avatar
3 votes

What goes above this code fragment?

First, it holds $TT=T^2=S$. Then we have gate $S$ and its transpose conjugate $S^\dagger$ next to each other. These gates are inverse of each other (because the gates are unitary matrices), so we have ...
Martin Vesely's user avatar
1 vote
Accepted

Appending a gate to a Stim circuit in C++

My best guess is that you're interacting different versions of the C++ code, and they disagree on the indexing of the GateType enum (since this has not been kept ...
Craig Gidney's user avatar
  • 36.7k
1 vote

Identifying mistake when working through the action of the following circuit

After the second $H\otimes H$ operator, once the mistake with the CNOT is corrected, the qubits should be in this state: $$\alpha\left|00\right\rangle + \beta\omega\left|01\right\rangle + \alpha\omega\...
AG47's user avatar
  • 439
2 votes
Accepted

Identifying mistake when working through the action of the following circuit

When applying the CNOT(1 $\rightarrow$ 2) you got confused in the last row. The $(1-\omega)|1\rangle$ flips the second qubit so $(\alpha+\beta)|0\rangle$ turns into $(\alpha+\beta)|1\rangle$ (and the ...
David Dentelski's user avatar
2 votes

Hello world program in Qiskit 1.0

I am not pretty sure about"Hello World" program as you stated. However, if you want to run a simple circuit on one of the backends that requires minimum time to be executed, then you can ...
physicino's user avatar
  • 111
1 vote

How to retrieve a phase gate from a circuit made out of $CX$ and $T$

If you've got a bit with value $x_1$ and you apply a $T$ gate to it, you're going to get a phase of angle $x_1\pi/4$. Do another $T$ gate on a bit with value $x_2$ and you're up to a total phase of $(...
DaftWullie's user avatar
  • 57.9k
4 votes
Accepted

Is it possible to implement the controlled-S gate, such that the inner gate between the CNOTs belongs to the Clifford?

TL;DR: After sending $D$ across the equals sign, the right hand side is similar to a controlled Pauli operator and the left hand side is a diagonal operator. Their spectra turn out to be incompatible, ...
Adam Zalcman's user avatar
  • 22.3k

Top 50 recent answers are included