Questions tagged [programming]

For any questions whose answer is expected to require code or programming notions. For questions about a specific framework (e.g. qiskit or cirq) please also include a more specific tag.

234 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

How do you access stored Ramsey experiment frequency?

What is the stored frequency for the Ramsey experiment and how can this stored frequency be accessed? Is there a backend.get(frequency) command for this frequency?
0
votes
1answer
31 views

Q#/VS: No namespace with the name "Microsoft.Quantum.Canon" exists

I am trying to run a simple "Hello World" project in Q#, following this tutorial. I have completed the following steps (Step #s from tutorial link): Step 1: Installed the latest version of ...
0
votes
1answer
65 views

How to create a quantum circuit to implement the same operations but acting on different qubits?

I want the draw the quantum circuit of the following Hamiltonian: $$H = - 4 \times X\otimes X\otimes X\otimes X - 4\times Z\otimes Z\otimes Z \otimes Z$$. I have been able to draw the circuits of $ - ...
0
votes
0answers
27 views

How can extract reduced dynamics of a bipartite system from unitary evolution in quite

Let us assume that I have a bipartite system $A\otimes B$ and an initial product state undergoing some evolution $H^{AB} = H^A+H^B+V^{AB}$, which is time independent. I want to simulate the reduced ...
0
votes
0answers
47 views

How's the depolarization channel applied to one qubit circuits?

Suppose that in all gates used in a one qubit circuit the depolarization channel is applied, i.e. ...
0
votes
0answers
71 views

The difference between the unitary matrix in ProjectQ and Qiskit

Why are not the same unitary matrices in ProjectQ and Qiskit in the following codes: ProjectQ: ...
0
votes
0answers
31 views

How to run Qiskit's transpile in parallel in Windows?

I want to execute qiskit transpile function in parallel. My experiment environment OS is Windows, and the Qiskit version is 0.29.1. I already asked one question here, and I also changed the file ...
0
votes
0answers
18 views

Exacting specific results in running a list of tomography circuit

I run a test on tomography of two circuits like this: ...
0
votes
0answers
17 views

What is an example of numbers that when used for a Gaussian pulse, would result in a rotation about the x axis?

For the playing of a Gaussian pulse, what is an example of numbers that could be plugged in for duration, amp, and sigma that would result in the pulse rotating something about the x axis? Here is the ...
0
votes
1answer
37 views

How to get information about 'qubit location' or 'variable of qubit location' in qiskit docs?

I have something problem with using qiskit. I searched several qiskit docs to get 'qubit location' or 'variables' that represent qubit. I searched three documents below. ...
0
votes
0answers
31 views

Quantum check sample implementation

I've been trying to figure out how to create a simple circuit in Qiskit to create a check (cheque ) generation and verification as described in this paper. I started with 3 qubits, first one with the ...
0
votes
0answers
43 views
0
votes
1answer
40 views

How to use backend.run() with a constant pulse shape in order to get the results of a measurement?

I have formed a constant pulse and then I ran a measurement on the pulse. Now, I want to run a job to access the results of the measurement. Attached is a picture of the pulse and measurement. Now, at ...
0
votes
0answers
22 views

How would you measure an X gate with qiskit.pulse.builder.measure?

I am using this link: https://qiskit.org/documentation/stubs/qiskit.pulse.builder.measure.html for reference. How would you use the measure command in order for an X gate to be measured within the ...
0
votes
0answers
41 views

How does Qiskit's VQE encode binary digits into a solution from a given Hamiltonian?

So far I have been working with the VQE on different Hamiltonians that happened to have degeneracies, that is there were always at least two different global minima, because the Hamiltonians I was ...
0
votes
0answers
56 views

How to solve a linear equation of qubit operators in qiskit?

I am trying to repeat the results from Peng and Kowalski (Eq 11) which solves the analytical form of an equation consisting of powers of the Hamiltonian (moments): The $K$-th order PDS formalism is ...
0
votes
0answers
58 views

Qiskit equivalent of get_expectation_value() in ProjectQ

Is there a corresponding function that has the same function as function get_expectation_value() in Project Q? Get the expectation value of qubit_operator w.r.t. the current wave function ...
0
votes
0answers
84 views

Qiskit State Tomography with Additional Classical Register

For a circuit with a classical register like in the image, I cannot apply StateTomographyFitter(result, tomography_circuits).fit() method for the second and third ...
0
votes
0answers
60 views

How do you build the modified Toffoli gate using only local unitary and CNOT operations?

How do you build a circuit for a modified Toffoli gate using only local unitary operations and CNOT operations? The two-qubit unitary operation is given by: $\text{diag}\{1, 1, 1, e^{i\phi}\}$.
0
votes
0answers
58 views

How to simplify a circuit with repeated same parts?

If I have a circuit with 3 qubits and repeated gates as follow: ...
0
votes
0answers
94 views

How to extend Qiskit Quantum Counting with a Truthtable Oracle?

I'm a newbie in Quantum Computing. So please be indulgent with me. I'm trying to adapt the Qiskit Quantum Counting Example, which defines its oracle in a programmed quantum circuit, to use a ...
0
votes
0answers
38 views

How to use 'RevLib' files in python?

RevLib is an online resource for benchmarks within the domain of reversible and quantum circuit design. It provides a database of functions with respective circuit realizations given in a appropriate ...
0
votes
0answers
125 views

How can I represent Pauli Measurements in Qiskit's QuantumCircuit object?

Is there a way to represent measurements in other bases in Qiskit? The default measurement is in the Z (computational) basis. Can I also depict measurement in X, Y and general Pauli Measurements? I ...
0
votes
0answers
85 views

IBMQ - Total samples exceeds the maximum number of samples for channel [8002]

I'm trying to run some pulse schedules on ibmq_bogota but I'm running into this error: There are 99 "circuits"/pulse schedules in this job. When I try to ...
0
votes
0answers
16 views

Any suggestions on Software to implement Remote Entangled Distribution

I am studying a paper "Remote Preparation and Distribution of Bipartite Entangled States" and trying to implement it using a software. https://arxiv.org/abs/quant-ph/0410016 This paper talks ...
0
votes
0answers
52 views

Interpret graph nodes as qubits

I am trying implement MAXCUT using QAOA. I have a graph with edges defined by an edges set. My edges set looks a bit like this: ...
0
votes
1answer
79 views

Correctly configuring a Q# test project in Visual Studio Code

I have some Q# code which I'm editing using visual studio code. The codebase is divided into a src/ folder and a test/ folder. ...
0
votes
1answer
56 views

JSONDecodeError with backend.run

I'm trying to follow tutorial on pulse simulation described in qiskit.org. The generated PulseQobj is well executed with AER simulator, but it throws JSONDecodeError when using real backends (ex. ibmq-...
0
votes
0answers
19 views

Issue with running a circuit: Cannot read property 'idCode' of null

I have been trying to run simple circuits from the Circuit Composer, both on a real quantum comp and on a simulator. Every time I get this error message: ...
0
votes
1answer
182 views

Unable to instantiate provider for research account locally

When I run IBMQ.load_account(). I have the error information: ...
0
votes
1answer
61 views

How to re-execute failed jobs in qiskit?

When executing a batch of circuits using the IBMQJobManager and attempting to combine all the results of all jobs with combine_results I get the ...
0
votes
0answers
103 views

Different result between Q# and Qiskit

I'm running a search program with custom initial state. I wrote a program in Q# and one in Qiskit but I get different results even if the code seems to be peforming the same operations. The Q# result ...
-1
votes
0answers
11 views

Display dataset - Qiskit Tutorial Portfolio Optimization

I've recently tried to run a finance tutorial from Qiskit (Portfolio Optimization) ...
-1
votes
1answer
63 views

Implementing Cirq Coding Gates

Can someone please help me making these gates on CIRQ programming: Decrement Gate (-1) Splitter Gate (If possible) I was having trouble implementing these and was not sure if it's possible either. ...

1 2 3 4
5