Questions tagged [programming]

For questions relating to the process of assembling quantum programs that can be executed on a quantum computer. For questions using or about a specific programming language, consider using a more specific tag

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
131 views

Does the Curry-Howard correspondence have a quantum-specific type system?

In Wikipedia we can read that the Curry–Howard correspondence is a correspondence between formal proof calculi and type systems for models of computation. In particular, it splits into two ...
6
votes
0answers
89 views

Gradient boosting akin to XGBoost using a quantum device

I am currently trying to implement a boosting algorithm akin to XGBoost with a quantum device. The reason is that I want to make use of a quantum device to train weak classifiers. However, as far as I ...
5
votes
0answers
82 views

Graphing the decoherence of qubits being used to perform an algorithm

How would I be able to graph the decoherence of qubits being used to perform an algorithm? I'm working with the IBMQ Qiskit framework and I'm trying to write a program that allows me to find the ...
4
votes
0answers
71 views

Grover search for basis states with complex coefficents and multiple marked states

I tried to run Grover's search for basis states with complex coefficients, including the marked basis (complex coefficients because the states are obtained from inverse QFT), but it could not amplify ...
4
votes
0answers
173 views

How to build a quantum circuit representing the Ising Model?

Can someone explain to me how to build a quantum circuit representing the Ising Model? I just want to understand how to represent the Ising Model for the purposes of quantum state label classification....
3
votes
0answers
38 views

Does anyone have any really good quantum computing illustration packages or frameworks for visually teaching various aspects of QC?

I'm focusing on training non quantum physics / non math majors - software engineers to be specific (and the interested senior executive that wonders by) and am bewildered by the lack of adequate ...
3
votes
0answers
35 views

How does batching work in the optimizer loop of the VQC algorithm in Qiskit Aqua?

I've playing around with a binary classification problem with a dataset of size 1000 examples and 5 features. I'm using the VQC algorithm from the Qiskit package the that uses a feature map and a ...
3
votes
0answers
89 views

What is “Lindblad Superoperator” in Stochastic Master Equation

I was reading a paper titled "Using a Recurrent Neural Network to Reconstruct Quantum Dynamics of a Superconducting Qubit from Physical Observations" and was confused about a stochastic master ...
3
votes
0answers
52 views

General mixed integer linear programming problem with quantum computers

I was wondering if anyone had a sample code for running a general MILP problem. I saw some coding for some very specific problems and I thought they were kind of far away from what we needed. If ...
3
votes
0answers
56 views

`execute()` hangs and eats memory

Used memory-profiler to check why I get memory spikes in what I though were small circuits. The circuit itself is constructed using ...
3
votes
0answers
20 views

Synchronous Interactions Between Quantum and Macroscopic Systems

Synchronous Interactions Between Quantum and Macroscopic Systems Lester Ingber This project calculates synchronous quantum systems and macroscopic systems with well-defined interactions. I would ...
3
votes
0answers
65 views

Bell State 11 not working for parity curve

I am currently writing a script to automate the creation of parity curves for a 2 qubit bell state and then calculate fidelity and proving entanglement from that (inspired by this paper). It was going ...
3
votes
0answers
111 views

Measurement inconsistency in Qiskit

I am using Qiskit in an algorithm. In the end, I am measuring exactly a register of 4 qubits but the histograms show states with 5 qubits. This is the code I used: ...
3
votes
0answers
66 views

What are reasonable noise/dephasing parameters for QuEST to emulate state-of-the-art quantum computers?

The QuEST code allows for simulation of quantum computers taking dephasing and depolarizing noise into account via one and two qubit dephasing and depolarization. What are realistic parameters for ...
3
votes
0answers
459 views

Qiskit Python program cannot connect to QE API

I am just getting started with Qiskit and IBM Quantum Experience, so please forgive my newby question. I have a IBM Quantum Experience account and I generated an API token. I used the generated ...
2
votes
0answers
11 views

How can I implement partial transpose on a variable in Picos (Python, trying to solve an SDP)?

I try to optimise a quantity via an SDP. I optimise over all PPT measurement operators and hence have the constraints $\Pi_k^{T_B} \succeq 0$ (PPT) for my measurement operators. The part of the code ...
2
votes
0answers
49 views

How to decompose arbitrary gates in Qiskit?

I have been exploring quantum computing, I have no idea of decomposing arbitrary gates in Qiskit. Can someone help me with an example?
2
votes
1answer
73 views

Monty Hall Problem in Quantum Computing

Is it possible to make a quantum Monty Hall problem where the quantum computer wins the game always?
2
votes
0answers
50 views

Grover's search for solving TSP

Consider the modified version of the Traveling Salesman Problem where you are searching for a path of length lass than some $k$. We can solve this problem using Grover's search where we encode each ...
2
votes
0answers
50 views

How to define initial state $\rvert \Psi(0) \rangle \equiv \rvert 1, -1 \rangle \otimes \rvert 0 \rangle_{\text{cav}} $ of a system in QuTiP?

Say, we have a $\require{mhchem}\ce{^87Rb}$ atom having an electric dipole transition on the $D_{1}$ line and we have two hyperfine ground states, one on $F = 1$ and one on $F = 2$ level. So, we take ...
2
votes
0answers
69 views

Running HHL tutorial on real backend

I tried to follow the HHL tutorial. Since the 8x8 problem is not realistically simulable (I stopped after a few minutes), I tried to make it run on another backend, starting on the easiest example: <...
2
votes
0answers
60 views

Modifying GRAPE for open quantum systems

This question requires the knowledge of GRAPE. More info can be found here and in this short presentation. I have tried to modify the grape_unitary() function in grape.py also to accommodate open ...
2
votes
0answers
44 views

How to add states on the Bloch sphere from a master equation?

Can you please help me to find an answer to this question: I am using qutip for the study of quantum systems. suppose I have calculated the solution of the master equation using the ...
2
votes
0answers
55 views

How to calculate the $r^{\text{th}}$ digit of $\sum ^{j−1}_{p=i}d^p_{\pm k}$ using PyQUBO?

I am going to implement "turn circuit encoding" method of Coarse-grained lattice protein folding on a quantum annealer(Babej, Ing & Fingerhuth; 2018) using PyQUBO to run on the DWave qbsolv ...
2
votes
0answers
466 views

Qiskit SDK problem

So I am getting this error when I fire the command on Ipython or Jupyter Notebook ...
1
vote
0answers
35 views

Implementing QFT

I would like to know if there is a way to: Implement Quantum 'Functions' e.g the QFT of QFT* containing several single-qubit operations? Implement such operations on an arbitrary number of qubits and ...
1
vote
0answers
85 views

Decomposition of an arbitrary gate using given matrix in Qiskit

If I have an arbitrary non-unitary matrix of say $$ U = \begin{pmatrix} 1.5 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1.6 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{...
1
vote
0answers
46 views

A question about qiskit's WeightedPauliOperator.evolve method for IPEA (IQPE) implementation

I'm doing an implementation/tutorial of the iterative phase estimation algorithm (IPEA) and have a problem. My Hamiltonian is a diagonal matrix $H = \begin{pmatrix} E_1 & 0 \\ 0 & E_2\end{...
1
vote
0answers
42 views

Exponentiating Hermitian Matrix for use in QPE/HHL

I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$. Because I am currently ...
1
vote
0answers
72 views

'ERROR: QasmSimulator: Circuit cannot be run using available methods.'

I used the following code. Can anyone say what that error is about? ...
1
vote
0answers
21 views

Error message for Classical Probability coding in Python

strong textHi guys I am doing a coding exercise for probabilities in vectors. Exercise 2 (1 point). As you recall, we may also write the probability distribution as a stochastic vector p⃗ =[p0p1]p→=...
1
vote
0answers
38 views

Encoding Binary Data into Quantum Basis

I am working on implementing a paper on QNNs. I have successfully been able to resize a MNIST digit to be able to meet the size of quantum circuit. But I am not clear of how to convert the resized ...
1
vote
0answers
116 views

Having trouble communicating with the IBM Q Experience REST API

I have started using IBM's Q Experience and I am trying to obtain an access token in order to communicate with the REST API. I understand that I can use my API token to obtain authorization by sending ...
1
vote
0answers
594 views

How to run quantum SVM algorithm from Qiskit in real IBM Quantum Computer using IBMQ?

I'm trying to run QSVM algorithm in IBMQ experience, want to run in one of those real quantum computers. ...
1
vote
0answers
34 views

How to plot decision boundary with support vectors when running quantum SVM algorithm?

I'm working on QSVM to know the difference between SVM and QSVM. How much better quantum machine learning can do when compared to classical machine learning algorithms? Part of my code: ...
1
vote
0answers
76 views

Exception encountered while running quantum-enhanced support vector machines

I am trying to run the code of the notebook example aqua/artificial_intelligence/qsvm_kernel_classification.ipynb. I save it in a python file and I have an exception at runtime the display of ...
1
vote
0answers
60 views

QE error: No handlers could be found for logger

When I run a QASM program on a QE simulator, I get this error. No handlers could be found for logger "IBMQuantumExperience.IBMQuantumExperience" What ...
1
vote
1answer
43 views

How to compute the tensor product in QCL?

When I look at QCL (the documentation of the language begins in chapter 3) I don't see a way to compute the tensor product between two q-bits. Is the programming operator ...
0
votes
0answers
51 views

Q# code for making any two qubits entangled

Suppose there are two different qubits and both with different superposition states. What is the Q# code for making these two qubits entangled?
0
votes
0answers
48 views

How to reduce the length of Q# programs execution time?

In the released Q# documentation by Microsoft available at: Quantum Development Kit Full State Simulator, it is written By default OpenMP uses all available hardware threads, which means that ...
0
votes
0answers
140 views

Why does Qiskit swap gate accept registers, but cswap doesn't?

In Qiskit, I am trying to perform controlled-Swap (cswap) of two registers, but an error occurs: ...