Questions tagged [qasm]

Quantum assembly language (QASM) called OpenQASM is used to implement experiments with low depth quantum circuits. OpenQASM represents universal physical circuits over the CNOT plus SU(2) basis with straight-line code that includes measurement, reset, fast feedback, and gate subroutines. The simple text language can be written by hand or by higher level tools and may be executed on the IBM Q Experience. (arXiv:1707.03429)

74 questions
9
votes
1 answer

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: AerSimulator('aer_simulator') AerSimulator('aer_simulator_statevector') AerSimulator('aer_simulator_density_matrix')…
user3886914
  • 339
  • 2
  • 8
8
votes
2 answers

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 gates). My question for the experts is: How is…
7
votes
3 answers

How to run a qasm file on IBMQ device?

I can find many qasm examples. How can I run them on different IBMQ devices?
peachnuts
  • 1,485
  • 1
  • 10
  • 15
6
votes
1 answer

Are there tools I can use to test OpenQASM 3 circuits?

I recently added a to_qasm method to stim. An issue I'm having is how to test that the outputs are correct. I can test OpenQASM 2 outputs by giving the output to qiskit, which can parse OpenQASM 2 and execute the result. But it seems that qiskit…
Craig Gidney
  • 44,299
  • 1
  • 41
  • 116
6
votes
1 answer

Where is definitive documentation for OpenQASM 2.0 and 3.0

I have gotten conflicting information about OpenQASM; some sources point to version 3 while others say 3 is not ready. I want to refer to a document that will tell me what instructions actually work with the official library.
Anna Naden
  • 711
  • 3
  • 15
5
votes
1 answer

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
  • 153
  • 3
5
votes
1 answer

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 doesn't support the new features (e.g. for-loops) of OPENQASM 3 either. So where can I…
4
votes
1 answer

What is the source of this TranspilerError when running qasm file?

I want to run this qasm file using IBM device. However, there's always an error: qiskit.transpiler.exceptions.TranspilerError: 'Number of qubits (16) in circuit0 is greater than maximum (5) in the coupling_map' How does this error come? How can I…
peachnuts
  • 1,485
  • 1
  • 10
  • 15
4
votes
2 answers

How is $X^q$ equal to $RX(\pi q)$?

I've seen in google cirq that a $X^q$ gate is converted in openqasm to $RX(\pi q)$, why is that? Same for $S^q$ into $RZ(\pi q/2)$.
Reda Drissi
  • 217
  • 2
  • 7
4
votes
0 answers

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 detail, because on the Qiskit Documentation I didn't find…
4
votes
1 answer

Does Qiskit allow for QASM 3.0 code to be utilized?

I am interested in using QASM 3.0 after reading it's documentation and seeing it's examples 1. However, I see that in IBM Quantum Experience QASM 3.0 is not supported yet. Is there any way I can run QASM 3.0 code locally or by a customized Qiskit…
Ryan
  • 41
  • 1
4
votes
0 answers

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

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 transpiled version, before executing. However this is…
3
votes
2 answers

Convert from QASM code to Qiskit Code

I'm looking for something that performs a conversion such as qiskit.circuit.QuantumCircuit.qasm, but for qasm code. In other words, a means to convert qasm code to qiskit code? Not just converting from qasm code to a QuantumCircuit object, but…
Loqi
  • 31
  • 1
  • 3
3
votes
1 answer

OpenQASM circuits in Stim

I would like to run circuits saved as OpenQASM circuits in Stim. Does anyone know how to import these circuits from OpenQASM to Stim? Many thanks.
user206444
  • 65
  • 4
3
votes
1 answer

I would like to use Open QASM 3 what if any backends can I use to?

From my limited understanding Azure Quantum and IBM Qiskit backends do not support OpenQASM 3. However, Amazon Braket does support a subset of Open QASM 3 (proof). What is the best way/backend to test and develop Open QASM 3.0 code? and yes I know I…
EXA_Q
  • 31
  • 3
1
2 3 4 5