Skip to main content
Share Your Experience: Take the 2024 Developer Survey
2 votes

Error while plotting the resulting distribution

Once you have the .qasm, you can also upload it to the Classiq platform https://platform.classiq.io/circuit, and then run it on a simulator. Here's how to do this step by step: Step 1: Create and save ...
Amir Naveh's user avatar
2 votes

Help debugging implementation of Draper QFT adder

You can take a look at how to create an adder whether it is a QFT or a ripple-carry, using the answer here You also need a compiler that interprets the order of the qubits correctly; you can see how ...
Ron Cohen's user avatar
  • 1,432
2 votes

Does subtraction circuit have a class like full or half Carry adder circuit in qiskit? one subtraction circuit code-example in qiskit?

For subtraction as mentioned earlier you have to negate the number, and than use an adder. There are few possible implementations for that (adder can be with QFT or with ripple-carry adder with more ...
Ron Cohen's user avatar
  • 1,432
2 votes

How to read QASM files for parametrized circuits (in QISKIT)? both from_qasm_file() and from_qasm_str() fail

You can use qiskit-qasm3-import library Once you have the QASM3 program, use : from qiskit_qasm3_import import parse And than ...
Amir Naveh's user avatar
2 votes

Solving quantum equation using qiskit

TLDR Yes, you are basically on the right track to calculate $A$. But there are some adjustments to make on how you model $U$. This is also where qiskit can be of help with the ...
qubitzer's user avatar
  • 177
1 vote

What is the difference between HamiltonianGate and PauliEvolutionGate in qiskit?

If you read the documentation for the PauliEvolutionGate, the synthesis of the gate defaults to Lie-Trotter product formula with a single repetition; therefore, you ...
diemilio's user avatar
1 vote

How to convert states |0011⟩, |1100⟩, |0101⟩ to |1111⟩?

Unitary quantum circuits are reversible. For a computational operation to be logically reversible, its output can be computed from the input, and vice versa. In your case if the output is $|1111\...
Egretta.Thula's user avatar
1 vote

Portfolio Optimization with VQE

Qiskit Optimization (ML, Finance and Nature) and Qiskit Algorithms all support only the V1 primitives. There are issues in all of the github repos of above for support of V2. So you need to use the V1 ...
Steve Wood's user avatar
  • 1,488
1 vote

How to apply gates on a subspace of a superposition of qubits?

Assume that, $$U = \left( {\begin{array}{*{20}{c}} u_{00}&u_{01} \\ u_{10}&u_{11} \end{array}} \right)$$ Then, you want to apply the two-level unitary $$\left( {\begin{array}{*{20}{c}} 1&0&...
Egretta.Thula's user avatar
1 vote
Accepted

How to get partial probability from measurements in qiskit?

You can use the marginal_counts() function from qiskit.result to get the marginalized counts for the bits that you want (...
Shravan Patel's user avatar
1 vote

How to convert a combinatorial optimization problem into a problem hamiltonian

You can convert pyomo (an open-source Python library for defining and solving classical optimization problems) problems to Hamiltonian problems using Classiq. Check this user guide to see how to do it....
Ron Cohen's user avatar
  • 1,432
1 vote

Are Quantum Computers Bad at Addition?

Additional operations will indeed be much more relevant to a fault-tolerant computer. Yet, for a fair comparison, you should run your trials with a fair implementation for each computer. For example, ...
Ron Cohen's user avatar
  • 1,432

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