12

Thanks for pointing this out! It turns out that this device was mis-calibrated in a way that was leading to that behavior. We just fixed the calibrations, so the problem should be gone now. I apologize for the trouble, and we will try to update our routine calibrations to detect and prevent this problem from coming up in the future :-).


6

This was a readout crosstalk error that has now been resolved.


4

Assuming you've got Toffoli and single-qubit rotations, you can implement the following: This basically works because if either of the controls is not $|1\rangle$, the Toffoli does nothing and the two single-qubit unitaries cancel each other. Whereas, if both controls are $|1\rangle$, then the net gate on the target qubit is $$ (\cos\frac{\pi}{8}I+i\sin\...


3

It seems like the skew is indeed high on qubit 0. I ran a single Hadamard followed by measure on this qubit, and see about 13% skew. The other qubits on this device seem fine (less than 2% skew). This is probably an error on the backend's discriminator (i.e. manifesting as high readout error). To see this, you can try applying readout error mitigation (code ...


3

Your expectation here is correct. c[0] should be 0 (well, modulo some small readout errors). The difference between backends is just due to a software bug on some of them. This will get fixed, thanks for reporting. As an aside, it is important to note that on current IBM devices, there is a constraint that all measurements are done simultaneously. So both ...


2

A brute force solution :). You can also obtain CCH via qiskit's basic gates with help of get_controlled_circuit method. from qiskit import * from qiskit.aqua.utils.controlled_circuit import get_controlled_circuit q_reg = QuantumRegister(3, 'q') qc_h = QuantumCircuit(q_reg) qc_ch = QuantumCircuit(q_reg) qc_cch = QuantumCircuit(q_reg) qc_h.h(q_reg[0]) ...


2

Of course if we have unitary evolution $$|\psi_1\rangle = U|\psi_0\rangle$$ then $$|\psi_0\rangle = U^\dagger|\psi_1\rangle$$ I did not read the paper, but evidently the authors do something different, based on the following: the Schrödinger equation $$i\hbar\frac{\partial\Psi}{\partial t}=\hat{H}\Psi$$ changes its form if we substitute $t\rightarrow -t$ to ...


2

According to comment provided by user gIS, there was no progress in implementing qRAM as proposed in the paper. However, some additional information on qRAM physical implementation can be found on this forum here.


2

Maybe this paper can help you, that's what the implementation in Qiskit is based on. Otherwise looking at the implementation of Shor's algorithm in Qiskit itself might be insightful. The circuit for the algorithm is constructed in the method construct_circuit and can be visualized with this snippet. from qiskit.aqua.algorithms import Shor a, N = 2, 3 ...


2

According to the openqasm spec the include statement will insert the contents of the files with the name relative to the current working directory: https://github.com/Qiskit/openqasm/blob/master/spec/qasm2.rst#language If you're using qiskit-terra as your parser this should work unless you name the local file "qelib1.inc". The parser included in the qiskit-...


2

Summarization based on discussion with user met927: Transpiled circuit form depends on used backend - it is different for simulator and real quantum processor: On simulator, the $\mathrm{CH}$ gate is transpiled to the circuit shown above On real quantum processor, the gate is implemented with two $\mathrm{U2}$ gates and $\mathrm{CNOT}$ (i.e. like in the ...


1

I implemented them as a "subcircuit" so it looks "hidden" from the "outside". constant 0: input = QuantumRegister(1, name='input') temp = QuantumRegister(1, name='temp') constant0 = QuantumCircuit(input, temp, name='oracle') oracle = constant0.to_instruction() identity: input = QuantumRegister(1, name='input') temp = QuantumRegister(1, name='temp') ...


1

@cgranade and I have a chapter on the Deutsch-Jozsa algorithm (Chapter 7) as well as implementations of the oracles for Q# in our book Learn Quantum Computing with Python and Q#. You can find the code samples for the book in the repo here. In particular, the oracles look like this: namespace DeutschJozsa { open Microsoft.Quantum.Intrinsic; ...


1

An oracle $U_f$ is actually $\mathrm{X}$ gate (or a negation). The circuit implementing the oracle is following Qubit $q_0$ is input and qubit $q_{1}$ is output. Firstly $\mathrm{X}$ is applied on $q_{0}$. This negate the qubit, however, we want to have an output on $q_1$. Therefore, we apply $\mathrm{CNOT}$ which in this setting "copy" the $q_{0}$ to ...


1

Each quantum processor has specific so-called error rate and a little bit different type of noise caused by specific conditions the processor runs in. Therefore, results produced by same circuits can be different on different quantum processors. In your case, there is apparently a bias caused by some external factors specific for ibmqx2. You can try to run ...


1

So Qiskit (qiskit.org) already does everything you are looking for. If you need to access the API directly then the IBMQ account connector (https://github.com/Qiskit/qiskit-ibmq-provider) is a good starting point in lieu of formal documentation.


1

The error is caused by appending gates onto qubits following a measurement. On qubit 1 and qubit 0, you attach a cx gate after a measurementhas already been placed. This will compile on the simulator, but it is not something that is supported on the real hardware.


1

One thing that I noticed. If cu3 gate from $q[2]$ to $q[0]$ is some $U$, then the cu3 from $q[2]$ to $q[0]$ should be $U^2$ in the phase estimation algorithm, but the comparisons of operators with the help of numpy.array showed me that it's not true here. I tried to implement by replacing cu3 part of the QASM code with the following: cu3(1.6, -1.12, 2.03) q[...


Only top voted, non community-wiki answers of a minimum length are eligible