Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
290 views

If Statement OpenQasm 2.0

in the documentation for OpenQasm 2.0 it says one can use an if statement like so: if(c_reg==int) Quantum Operation. However, I would like to execute the following: ...
Sam's user avatar
  • 31
4 votes
0 answers
35 views

How does it work QasmSimulator with the option "density matrix"?

I am making some simulations on IBM Quantum Lab and as backend I tried to use QasmSimulator(method = "density_matrix") in order to simulate noise. I wanted to know how this method works in ...
Natale Matranga's user avatar
1 vote
0 answers
75 views

How to perform lattice surgery with initial state $|0\rangle+|1\rangle$, with qasm?

I am trying to perform a lattice surgery. Initial state is $|0\rangle+|1\rangle$ and when I perform a smooth merge and split, I think I get $|00\rangle+|11\rangle$ but it doesn't work. Is there ...
kaluza19's user avatar
9 votes
1 answer
5k views

What are the differences between Qiskit's AerSimulator, QasmSimulator and StatevectorSimulator?

In Qiskit, we can see the names of available simulators with the command Aer.backends(). These include: ...
user3886914's user avatar
3 votes
1 answer
328 views

Qiskit does not interpret qasm string as 3.0?

I am trying to get my first openqasm3.0 program and I am getting error messages that I cannot interpret. Here is my program: ...
Anna Naden's user avatar
2 votes
1 answer
330 views

How to convert code from QISKIT to QuEST using QASM

I have been working on this project which requires a lot of qubits. Originally we have made the whole project in QISKIT as we have been using it for a long time. But the maximum number of qubits that ...
Parmeet Singh EP 066's user avatar
1 vote
1 answer
228 views

QASM Files on Jupyter Notebook

Is it possible to run qasm files on jupyter notebook (like with the qasm_simulator)? I downloaded one code file and I would like to play around with it on jupyter notebook.
Berni89's user avatar
  • 19
1 vote
0 answers
192 views

How can I get the results from simulating noise models?

I'm trying to run some simulations of my quantum circuits using qasm simulator. I first tried to import the noise data from a quantum device and then use that information on qasm. Here's part of my ...
ZR-'s user avatar
  • 2,408
1 vote
2 answers
122 views

Are we using the real-time error information in simulating noise on qasm?

I'm trying to run some quantum circuits on qasm simulator using the noise information from IBM Q quantum device: ...
ZR-'s user avatar
  • 2,408
3 votes
1 answer
1k views

Simulating OpenQASM 2.0 in Qiskit?

I'm just getting started with OpenQASM, but I'm feeling a bit confused. Is there a way to run the .qasm file I've written in Qiskit (i.e. in Python), or is OpenQasm ...
stare100's user avatar
1 vote
1 answer
73 views

Use of Data loaders or State Initialization Circuits

I have recently started working on qiskit and I am struggling to use qc.initialize API in any practical or useful application. I have read at multiple places that ...
Manu's user avatar
  • 513
2 votes
1 answer
215 views

Is it true that QasmSimulator is much slower than StatevectorSimulator, or am I doing something wrong?

I'm trying to calculate the expectation value of some operator for a state that comes out of a quantum circuit using Qiskit. I was initially using ...
A. Jahin's user avatar
  • 264
3 votes
1 answer
370 views

IF statement in OpenQASM2.0 on IBM Quantum Experience -- error

I have written the following toy .qasm file, which has some adaptive measurements: ...
fcrp's user avatar
  • 166
1 vote
1 answer
561 views

How to import circuit libraries into qiskit

Im trying to put the QFT circuit in my qiskit circuit but im having trouble: ...
dude's user avatar
  • 37
3 votes
1 answer
215 views

Why does running my circuit on Quantum Hardware produce such unexpected results?

I am using Jupyter Notebook with Qiskit. I have created a program that can add two 3-bit numbers together. When I simulate this program on a qasm_simulator it works as expected and I can add any two 3-...
John's user avatar
  • 107
2 votes
3 answers
2k views

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

I am trying to work with parametrized circuits in QISKIT. I can simply create parameterized circuits, bind value(s) to parameter(s), and execute/run all instances (after binding values for parameters) ...
Ramin's user avatar
  • 21
2 votes
3 answers
391 views

Is it possible to see the probabilities values of qubit ( alpha and beta) while measuring on IBM Quantum experience?

Is it possible to see what are the values of $\alpha$ (probability of being in state zero) and $\beta$ (probability of being in state one) while running on IBM Quantum simulator (we can call it state ...
User1086's user avatar
3 votes
3 answers
284 views

Quantum Error Correction implementation in Qiskit, OpenQASM or other languages based on Python

Where can we find example(s) of implementation code in a programming language of Quantum Error Correction, whether with the standard method of measurement or the automatic method without measurement (...
Bertrand Mercier's user avatar
1 vote
0 answers
58 views

Why do I get the error 'IBMQManagedResultDataNotAvailable'?

I'm trying to use IBMQ job manager to submit a list of quantum circuits (300 of them in total) to 'ibmq_16_melbourne'. This is what the job status looks like on IBM Quantum Experience: I don't know ...
ZR-'s user avatar
  • 2,408
1 vote
1 answer
191 views

Is there a faster way to get 'a list of' result from 'a list of inputs'?

I had a question about obtaining the probability of a certain state from the histogram, still using this example, suppose there's a variable in my quantum circuit, it's values are stored in an 'np....
ZR-'s user avatar
  • 2,408
5 votes
1 answer
1k views

How to run a OpenQASM 3.0 file?

When uploading a QASM-file with ÒPENQASM 3.0; as first line, the code editor on quantum-computing.ibm.com will throw an error. However the qiskit Python library ...
Illuminatio2718's user avatar
0 votes
1 answer
152 views

Odd behavior with Qiskit Pauli operators

I was creating a simple implementation of the Hadamard test when I came across the following, what seems like, strange behavior. Consider the following snippet, which is part of the computating the ...
dylan7's user avatar
  • 334
0 votes
1 answer
597 views

Qiskit implementation for MPS

Now, I'm implementing Matrix product state method with QasmSimulation in Qiskit. following code The problem arise when I set number of qubits. When running it with 27qubits is very fast but, for 24, ...
김동민's user avatar
  • 967
2 votes
1 answer
188 views

Why running time of qasm simulator is significantly smaller in comparison with quantum machines?

I ran a 3-qubit measurement circuit on QASM simulator as well as on IBM Q Melbourne, Santiago and Vigo machines. The running time on the simulator is in few milliseconds (400-800) while in the case of ...
parth's user avatar
  • 305
4 votes
1 answer
1k views

Is there any way we get the state vector/density matrix of a noisy simulation in qiskit?

In Qiskit we can't use noise models in the 'state vector_simulator' or the 'unitary simulator', hence making it impossible to compute fidelity of the output of the noisy circuit and the noiseless ...
Pingal Pratyush Nath's user avatar
4 votes
0 answers
62 views

What is the executable opcode for Qiskit quantum hardware, as the quantum circuits or the transpiled/compiled QObj/ QASMQObj are assembly languages? [duplicate]

When we write a QASM code or build quantum circuit on Qiskit GUI, it converts it into QObj/QASMQObj (refering paper Qiskit Backend Specifications for OpenQASM and OpenPulse Experiments) or its ...
Shampa Sarkar's user avatar
1 vote
1 answer
144 views

Is there a standard way to save pulse schedules akin to a qasm for a circuit?

If I create a QuantumCircuit, I can save all the information necessary to reconstruct the circuit using the qasm method. In addition, these qasm strings can be sent directly to the IBM quantum ...
nightshade's user avatar
1 vote
1 answer
1k views

How can I install the 'ibmq_qasm_simulator' backend?

I'm having trouble running the following cell: The system told me "The 'ibmq_qasm_simulator' backend is not installed in your system." I'm so confused. Is there a way I can install this backend in my ...
ZR-'s user avatar
  • 2,408
2 votes
1 answer
814 views

How can I use IF gate in IBM Q composer?

I just want to use the "if" gate in IBM QX circuit composer, but I don't know how.
Ramin's user avatar
  • 21
1 vote
1 answer
443 views

OPENQASM: How to include my own libraries

I studied the OPENQASM 2.0 spec a few times but failed to find a way to include my own libraries. Have I missed anything? Right now, the only way is to use ...
Emscripten Fan's user avatar
5 votes
1 answer
418 views

How to see the QASM code corresponding to compiled Q# function?

I'm learning Q#. Is there any way to see the QASM code of a Q# function I write, the same way I can see the disassembly of a C# function?
GideonMax's user avatar
  • 153
2 votes
1 answer
922 views

How to define custom controlled unitaries in OPENQASM 2.0?

According to the OPENQASM 2.0 documentation, it's possible to define custom unitary gates using the format: gate name(params) qargs { body } where the optional ...
Sanchayan Dutta's user avatar
1 vote
0 answers
74 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 ...
qenovice's user avatar
2 votes
1 answer
310 views

Print circuit compiled on hardware?

I would like to see the compiled circuit as executed on a hardware. Nominally, this sequence of commands should return the QASM circuit in the variable ran_qc, but ...
Jan Balewski's user avatar
2 votes
1 answer
573 views

How to make "random U3" in QASM?

I want to make an operator: $\mathrm{U3}(\arccos(\sqrt p),0,0)$, when $p$ is a random value between $0$ and $1$ How do I write code in QASM language of this "random $\mathrm{U3}$" operator?
Daniel Vainshtein's user avatar
8 votes
2 answers
692 views

Construct Controlled-$G^{\dagger}$ from known Controlled-$G$

Let there be a known a scheme (quantum circuit) of Controlled-G, where unitary gate G has G$^†$ such that G≠G$^†$ and GG$^†$=I (for example S and S$^†$, T and T$^†$, V and V$^†$, but not Pauli and H ...
John Lancaster's user avatar