Questions tagged [transpile]

The process of rewriting a given input circuit to match the topology of a specific quantum device, and/or to optimize the circuit for execution on present-day noisy quantum systems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Transpile mct to cx without QuantumCircuit

to convert my circuit mct instructions to cx I transpiled a Qiskit circuit, but I want to do it without a circuit, because I want more qubits than Qiskit can handle (50 or more). This is because I'm ...
Luis ALberto's user avatar
8 votes
0 answers
130 views

Can you programatically check whether a given set of gates is universal?

I am wondering if there is an automated way to determine whether a given set of quantum operations is universal. More precisely given a set of 1 and 2 qubit gates can we write a program to determine ...
Callum's user avatar
  • 555
1 vote
2 answers
58 views

Initial and final circuit layout with BQSKit compiler

The question concerns logical to physical qubit mapping when compiling quantum circuits with BQSKit. In Qiskit, I can specify the initial layout for the transpilation. It is also possible to retrieve ...
Peter Ivashkov's user avatar
3 votes
2 answers
68 views

How could compiler optimisations be used with fault-tolerant quantum circuits?

It is fairly well known that in a NISQ context you can often boost the fidelity of your quantum circuit by reducing the gate count and depth of your circuit. For example you can use the KAK ...
Callum's user avatar
  • 555
3 votes
1 answer
51 views

How to flatten a QuantumCircuit object to a single QuantumRegister and ClassicalRegister form in Qiskit?

In Qiskit, I am looking for a convenient way to "strip-off" a QuantumCircuit object from its multiple QuantumRegister ...
Ohad's user avatar
  • 1,624
1 vote
1 answer
47 views

Qubit configuration in Qiskit

Is it possible to make your custom qubit configuration in Qiskit? I know one can obtain the qubit configuration from different providers but I am curious whether one can somehow create their own ...
random person's user avatar
3 votes
3 answers
228 views

Transpiling qiskit quantum circuits on IonQ Native Gates

I have a certain quantum circuit (qc) in qiskit. My goal is to see it transpiled in IonQ Native Gates, to see the qc that is effectively run on the hardware. However, the Ionq basis gate set which I ...
Roberto Schiattarella's user avatar
1 vote
3 answers
213 views

What is the minimal set of gates to transpile any quantum circuit to minimal depth?

Suppose I am given a universal set of quantum gates $S_u$ (e.g. the single-qubit rotation gate $U$ and the controlled-not gate $CX$). This is known to be universal, so any quantum circuit can be ...
SimoneGasperini's user avatar
1 vote
0 answers
72 views

Removing barriers from a QuantumCircuit object in Qiskit

I find barriers useful for visualization purposes, naturally it helps observing a circuit that is separated to some logical segments than just watching a mixture of gates and qubits. However, before ...
Ohad's user avatar
  • 1,624
3 votes
1 answer
83 views

Why is the Qiskit transpiler not resolving the equivalence $I = R_y(-\theta) R_y(\theta)$?

Suppose you are given the following quantum circuit in Qiskit: ...
SimoneGasperini's user avatar
3 votes
1 answer
88 views

Is Qiskit transpile function (with basis_gates=['u', 'cx']) universal?

It's well known that the single-qubit rotation gate $U(\theta, \phi, \lambda)$ and the controlled-not gate $CX_{i,j}$ form one of the universal set of gates for quantum computation. So here's my ...
SimoneGasperini's user avatar
0 votes
1 answer
86 views

Qiskit throws error when changing basis gate for transpilation

I want to transpile a circuit composed of CNOT and 1Q gates into Rzz, CNOT and 1Q gates such that the total number of 2Q gates is minimized. In the example below, I would like the three gates to be ...
Pranav M's user avatar
1 vote
2 answers
80 views

What does circuit-xxx accomplish after circuit gets decomposed by qiskit?

as mentioned in the title, i have a problem with the qiskit decompose function. ...
Qubii's user avatar
  • 137
3 votes
2 answers
179 views

Qiskit Transpiler function - Why does Toffoli + Hadamard not work as a Basis Gate set?

It is a well established fact that Hadamard + Toffoli is a computationally universal gate set. Therefore I thought that the transpiler function in Qiskit would be able to decompose any valid quantum ...
Patrick Sinnott's user avatar
0 votes
2 answers
62 views

How $X$ noise propagates through controlled-$S$ gate

I am struggling to find how an $X$ noise propagates through a controlled-$S$ gate. Here`s the circuit.
Daniele Cuomo's user avatar
1 vote
1 answer
82 views

In Cirq, how do I separate transpilation from execution in simulator.simulate()?

In Qiskit, there are explicit transpile [1] (where a circuit is transpiled to primitive gates) and backend.run [2] (where the ...
pcr's user avatar
  • 111
0 votes
2 answers
105 views

Reducing circuit initialization complexity

I'm encoding data into a QuantumCircuit via the Initialize method for QFTs. In doing this and transpiling for IonQ backends, I'm getting rather complex circuits. Is there a way to encode this data ...
Jonathan Ortega's user avatar
2 votes
1 answer
101 views

What's the paper referenced by qiskit.compiler.transpile? My tranpile solution is wrong from the perspective of fidelity

Here I want to transpile a standard 3 qubit Quantum Fourier Transform circuit into a implementable circuit. The implementable 3 qubit circuit (qubit0, qubit1, qubit2) should have no SWAP gate and ...
chen amora's user avatar
1 vote
0 answers
115 views

Single Yang-Baxter reflection

Context and definitons I want to study the evolution of a three qubit Heisenberg Hamiltonian: $$H=(I\otimes X\otimes X)+(X\otimes X\otimes I)+(I\otimes Y\otimes Y)+(Y\otimes Y\otimes I)+(I\otimes Z\...
Mauricio's user avatar
  • 2,013
1 vote
1 answer
107 views

Using machine learning to determine a good initial mapping for a quantum circuit

I am trying to use a machine learning model to find a good initial mapping for a quantum circuit. I am trying to minimise the number of swap operations i.e. the number of CNOT gates. This is my ...
Anirudh T's user avatar
1 vote
1 answer
184 views

Specifying Ancilla qubits for initial_layout parameter in qiskit.transpile

So I have an array which specifies the initial layout of a 4 qubit quantum circuit and I want to map the qubits to a 5 qubit quantum computer. As only 4 out of the 5 qubits will be used, Qiskit ...
Anirudh T's user avatar
2 votes
1 answer
602 views

Qiskit custom multi controlled gate

I'm building a 3 qubit circuit with the control-ry rotation gate. The code is the following: ...
Марина Лисниченко's user avatar
1 vote
1 answer
233 views

Qiskit optimization_level values

Is there a clear explaination of how exactly optimization_level choice in qiskit's transpile() method affects on circuit? I expected to see some mathematical operations with the gates that similifies ...
Марина Лисниченко's user avatar
3 votes
1 answer
195 views

Qiskit unable to transpile the circuit for Rigetti Aspen M 1 on AWS

I am trying to run a Qiskit QAOA algorithm on AWS Rigetti Aspen M 1 Backend using qiskit braket provider. However qiskit is not able to properly transpile the circuit ...
3.14159's user avatar
  • 31
6 votes
1 answer
591 views

Can W gate be written only using H,T?

I want to write the decompose the gate $W=(X+Y)/\sqrt{2}$ using only $H$ and $T$ (and all the derived Clifford gates basically). I know $H=(X+Z)/\sqrt{2}$ is it possible to obtain exactly $W$ from ...
Mauricio's user avatar
  • 2,013
1 vote
1 answer
90 views

Qiskit: Transpile circuit with custom equivalences

I would like to automatically get a phase gate of pi/2 converted to a S gate. I have: ...
John Brown's user avatar
4 votes
1 answer
147 views

Decomposing S gate in two T gate with qiskit

Let's suppose I define a basis gate set and the following circuit. ...
John Brown's user avatar
4 votes
1 answer
567 views

Replace Gate with Known Identity in Quantum Circuit

I have a quantum circuit with 3 two-qubits gates XX, YY, and ZZ (as defined in the qiskit circuit library) with arbitrary angles on each gate. I'd like to replace the YY and ZZ gates with XXs. I know ...
AJ Rasmusson's user avatar
3 votes
2 answers
184 views

Optimal decompositions of some standard multi-qubit gates

To have a concrete example in mind: 3-qubit Toffoli gate can be decomposed into 6 $CNOT$s as shown here I believe this is the most economic decomposition in terms of the number of $CNOT$s used. My ...
Nikita Nemkov's user avatar
1 vote
1 answer
182 views

Does Qiskit transpiler execute multiple circuits in parallel? [closed]

I have something to ask about Qiskit's transpiler. Before that, please check this document. ...
김동민's user avatar
  • 837
3 votes
0 answers
84 views

Writing circuits in Qiskit using only Clifford and T gates

Is there a way in Qiskit to write my circuit using only Clifford and T gates (CX, S, H, T and I think also $S^\dagger$ and $T^\dagger$)? With the function compile (with aer simulator) it gives me some ...
stopper's user avatar
  • 333
4 votes
1 answer
124 views

How is quantum transpilation scaled?

While thinking about a quantum transpiler's working I had a pretty basic doubt. Say that we are trying to transpile an $n$ qubit circuit where $n > 100$. What transpiler does is that it first tries ...
Harshit Gupta's user avatar
2 votes
0 answers
54 views

How do you quantify the figurative 'cost' of a quantum circuit

Many gates are not available on a real computer and therefore the circuit must be transpiled into a specific set of gates. I have seen this equation below which is used to to determine the 'cost' of a ...
John's user avatar
  • 97
1 vote
1 answer
405 views

How to check accuracy of SABRE algorithm?

I'm studying the qubit mapping algorithm called SABRE. SABRE is an algorithm for solving qubit mapping problem effectively. It uses multiple SWAP gates to execute quantum circuit on real quantum ...
김동민's user avatar
  • 837
1 vote
1 answer
304 views

Why qiskit transpiler makes different results everytime? (Non-deterministic)

I tried to do qubit mapping called 'SABRE' and execute transpiled quantum circuit. I use FakeTokyo backend which has some noise because it is mock version of IBMQ 20-Tokyo. I know using this backend ...
김동민's user avatar
  • 837
2 votes
2 answers
209 views

Transpiling with dynamical decoupling sequence

I am testing circuits which contain mid-circuit reset operations, using Qiskit and IBM Quantum hardware. For 2 qubit simulations, I have a reset operation on one of the qubits and would like to test ...
Hmecher's user avatar
  • 41
2 votes
2 answers
254 views

Transpilation on restricted topology does not yield an equivalent circuit in Qiskit

Here is an MWE: a simple circuit on three qubits with a CNOT acting on qubits 0 and 2. The coupling map prohibits a two-qubit gate between qubits 0 and 2 and so qubit 1 must get involved. ...
Nikita Nemkov's user avatar
9 votes
2 answers
1k views

Transpilation into custom gate set in qiskit

In qiskit, I can transpile a given circuit into a some predefined gate set as follows (just an example) ...
Nikita Nemkov's user avatar
1 vote
1 answer
55 views

What are standard/most popular data formats to represent quantum circuits including hardware specifications?

On an abstract level one draws a circuit diagram with wires and gates. Different software frameworks like qiskit, circ etc. ...
Nikita Nemkov's user avatar
4 votes
1 answer
434 views

Qiskit: Transpilation and the CircuitSampler

I am using Qiskit's opflow and its CircuitSampler to evaluate matrix elements / expectation values. Now, going beyond ...
Durd3nT's user avatar
  • 531
4 votes
0 answers
128 views

Transpiler fails after 1000 iterations

I'm transpiling a set of quantum circuits using ibmq_5_yorktown. However, as the number of circuits gets larger, it shows me the following error message: ...
ZR-'s user avatar
  • 2,348