The %qiskit_backend_overview magic is not deprecated and has seen updates for the most recent 0.11.0 release: https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/tools/jupyter/backend_overview.py to ensure it works with new devices. The ZeroDivisionError might point to a bug in the code for the function or in your calling code, without a full traceback ...
Using PyCall it is possible to use arbitrary Python packages (such as Qiskit) in Julia and use the Python functions. At least, this is what PyCall advertises to be able.
What you describe has been done before: here is an example on GitHub.
Essentially, you would need to do this (I haven't tried this out myself):
qiskit = pyimport("qiskit")
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
The chemistry sample in the README on the qiskit-aqua repo shows how to do this now:
from qiskit.chemistry import FermionicOperator
from qiskit.chemistry.drivers import PySCFDriver, UnitsType
from qiskit.aqua.operators import Z2Symmetries
# Use PySCF, a classical computational chemistry software
# package, to compute the one-body and two-body integrals in
This can be done using the statevector_simulator provided with Qiskit Aer. It will return the statevector that describes the quantum state at the end of your circuit. It can be used in the same way as the qasm_simulator, only your circuit shouldn't have measurement gates at the end. There is more information about this simulator in this tutorial.
AFAIK, what you want can't be run on the hardware right now. See this github issue.
However, you can do this in the simulators. If, for example, c and c make up a two-bit classical register c, you can do this:
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)
This is just a warning to let you know that the API has changed for the backend configurations such as PulseBackendConfiguration. The dt (qubit drive channel timestep) and dtm (measurement drive channel timestep) parameters were previously specified in nanoseconds, but they are now specified in seconds. If you're not doing anything so advanced as to directly ...
I don't think that this will be possible on real current quantum hardware.
An alternative would be to run it on a simulator with a realistic noise model. This means that the circuit will be run in a non-ideal environment, and so should incur errors similar to how it would if it was executed on a real device. This tutorial teaches you how to build a noise ...
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
You can simply control $X$ gates with qubits $q3$ and $q4$. You DO NOT have to measure them firstly and then use classical bits for controlling.
The reason is that in quantum computing, controling some qubit with other qubits or with their measured results in classical register is the same.
Hence, you can implement the algorithm on real quantum computer.
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.
3 things I see from your implementation of inverse QFT:
SWAP gates are missing prior to applying Hadamard gates and cu1 gates.
The Hadamard gate should come first before cu1 gates.
The angles of cu1 gates, how I understand inverse QFT, should be different.
Here is inverse QFT that worked for me with not touching other parts of the code: