6

Let us look at each observation and question in perspective. Before delving deep into the questions, please let me share a few reference architecture diagrams on the components of a quantum computer. We need to review the mentioned observations and understandings from a practical implementation vantage point. When we consider the quantum realm in its ...


6

I don't think I agree - you really do need a grasp of quantum computing mechanics (including the math) in order to do any programming TLDR: Quantum computers are so specialized and the software is so close to the physical realization that you need an understanding of the math of quantum algorithms. Here's my logic With classical computers, we have a large ...


4

You can draw the circuit using construct_circuit().draw(). In the tutorial you are talking about, if you scroll down to the 4x4 randomly generated section that uses params5 you can run print(hhl.construct_circuit()), after the line hhl = HHL.init_params(params5, algo_input). This may take a little while to complete but it should eventually print out ASCII ...


4

Have a look at these for quantum machine learning: Supervised learning with quantum computers by Schuld and Petruccione (2018) An introduction to quantum machine learning by the same authors of the textbook above Quantum machine learning published in Nature 2017 by some experts in the field: Wittek, Rebentrost, Lloyd, et al Video presentations by Dr. Schuld ...


4

Your circuit does not measure $q_2$ qubit after teleportation; I guess that is why teleportation of $|1\rangle$ qubit is shown incorrectly.


4

There is no specific paper for this, though information on the model can be found in the Qiskit Aer API documentation and is based on the research of IBMQ quantum computing group. As examples you can read some of the following papers for more information about errors in IBMQ devices: arXiv:1410.6419 -- The Methods section at the end has a summary of gate ...


3

This can be done by passing a style to the drawer, setting the cregbundle to be False as the default is True. For example, given the circuit qc we can draw all the classical registers as follows : qc.draw(output='mpl', filename='no_bundle.png', style={'cregbundle': False}) However, it is worth noting that only the mpl drawer supports setting things using a ...


3

I tried to implement your transformation on IBM Q. Here is the result: Input is $|00\rangle$ in this case. You can set input values by application of $X$ gates on q-bits $|q0\rangle$ and $|q1\rangle$. Please note that this circuit run on a simulator only as reset gate has not been implemented on real IBM Q quantum hardware. But it is possible to simply ...


3

What is the design philosophy behind the moment-based quantum circuit? What are the advantages and disadvantages of it? The basic idea is that we wanted to give users more control over what will actually happen on hardware. Whether or not two gates are run in parallel is really important information when dealing with noise (e.g. it determines total runtime),...


3

I still run into this issue too. If you consider $|q0\rangle$ to be the most significant bit (MSB) you have to map it to the most significant classical bit as well, which is in your case a bit no. 2. Or you can flip your quatnum circuit upside down and then $|q0\rangle$ become the least significant bit (LSB) and the measurement will meet your expectation. A ...


2

Bra-ket notation is not necessarily tied to "quantum math," it's simply a convenient notation in many circumstances. It may seem intimidating at first, but once you understand the basics (ket = vector, bra = covector) it's straightforward to grasp, as long as you have a solid understanding of Linear Algebra. If you are shaky on Linear Algebra, different ...


2

At least currently, most of the translations being made are in extraordinarily specialized areas - for example, quantum chemistry / computational chemistry. A lot of the math involves mapping domain math to quantum computers - ab initio molecular simulations need to map their traditional annihilation/creation operators to the X, Y, Z gates in quantum ...


2

qiskit.tools.visualization has been moved to qiskit.visualization and matplotlib_circuit_drawer has been removed. Instead of using it, try using qiskit.visualization.circuit_drawer() with the appropriate arguments. So in this case it should be qiskit.visualization.circuit_drawer(my_circuit, output='mpl', filename='my_circuit.png')


2

If I understand you correctly, your goal is: To choose some quantum algorithm (your question is: which algorithm would be good?) Instead of running the quantum algorithm on a real quantum computer, you want to run a simulation of a quantum computer on a classical computer to simulate the execution of the quantum algorithm. You want to optimize your ...


2

Properties of the DAG are simply accessed using dot notation. For example, if you would like to get all the two qubit gates you would do dag.twoQ_gates() which returns a list of the two qubit gates present in the dag. The code you have linked to is a transpiler pass. This is a method that looks over the dag to identify some property or to perform some ...


2

Since quantum machine learning with NISQ hardware is such a relatively new field, it is still very highly research driven, and a lot of the potential is still being determined. To make these new research implementations more accessible, we've begun building implementations over at https://pennylane.ai/qml. Interesting ones include: Quantum Generative ...


2

The credit for this answer goes to met927 in the previous post. So please upvote that answer instead of this one. met927's response answered my question. Not setting up some of the parameters to make system draw faster was my error. So thank you met927 for responding quickly and answering my question! Below is a snippet that one can run quite quickly (...


2

You added an "s" in the final. IBMQ.load_accounts() The right way is: IBMQ.load_account() I hope I could have helped.


2

What you are asking here is a valid question, but it does depend on what backend you are using. The CNOT gate, when implemented on real hardware, is generally only implementable in one direction betweem any two pair of qubits, especially for transmon qubits (i.e. the types of qubits IBM uses). However, simulators and emulators generally do not hold this ...


1

They are resources to help people get started with learning about quantum computing. They are also useful to help further research as services such as IBM Q Experience provide access to real quantum computers, and so people can conduct research using them.


1

With Q# you can generate random numbers in two ways: Using a classical pseudorandom number generator, which is exactly the same that a classical language like Python does when you use the library random. As Mariia Mykhailova says in the comments, Q# has a built-in operation RandomInt that does exactly this: RandomInt Using a quantum operation that uses ...


1

I believe you can implement it a similar way you implemented the pauli_error, just with different parameter input. You need to pass in a (list[matrix]): Kraus matrices. The kraus_error method is defined here. You should be able to import it from the same module you import pauli_error from: qiskit.providers.aer.noise.errors.standard_errors


1

You should be able to do this by simply creating an instance of the class. This can be done as follows from qiskit.validation import base raw_counts = {'0x0': 4, '0x2': 10} data = models.ExperimentResultData(counts=base.Obj(**raw_counts)) There are lot of examples of how to do this in the testing file for these classes.


1

I found a solution to my problem here https://github.com/qutip/qutip/issues/1027 Apparently plotting points on the Bloch sphere does not work with Matplotlib v3.1.0. So I had to downgrade to v.3.0.3 for it to work!


1

This feature is now available using the snapshot function of Qiskit Aer. Snapshots can be added to the circuit and the values are then returned in the results object. This is an example of how you can create a circuit, add a snapshot to it and then get the result: from qiskit import * qc = QuantumCircuit(2) qc.h(0) qc.snapshot('1') # add a ...


1

This issue is within the pyscf package that is required by qiskit. It says here that this error may occur with certain versions of python, and I have seen it commonly coming up with python 3.8. There are some workarounds in that link, but if you have nothing forcing you to use python 3.8, I would suggest downgrading to the next newest version before that. ...


1

There are tutorials for a lot of the Qiskit Aqua functions kept in the tutorials repository, and I think this talks about the finance problem you are interested in. All of these tutorials are also available on the IBM Q Experience where you can run them in a browser.


1

To give you an example, at the last Qiskit Camp I was part of a team that implemented some Groverian Iterations in an Algorithm which as an input took positions on a complete graph. The repository is here. So if we want to encode for example two walkers on the graph below, since it has 4 vertices we require 2 qubits to encode the position of each walker. ...


1

It would be helpful to get a code sample, but from how you've phrased the question, the circuit assumes that the register is originally initialized to the ${|00..0\rangle }$ state. You'll need to initialize the register into the uniform superposition of all states, and then your Grover's algorithm should work. *full disclosure - it would be super helpful to ...


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