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
1 vote
1 answer
53 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 ...
  • 111
0 votes
2 answers
83 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 ...
2 votes
1 answer
44 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 ...
1 vote
0 answers
93 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\...
  • 1,584
1 vote
1 answer
52 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 ...
1 vote
1 answer
42 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 ...
2 votes
1 answer
185 views

Qiskit custom multi controlled gate

I'm building a 3 qubit circuit with the control-ry rotation gate. The code is the following: ...
1 vote
1 answer
62 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 ...
3 votes
1 answer
100 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 ...
  • 31
6 votes
1 answer
551 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 ...
  • 1,584
1 vote
1 answer
48 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: ...
4 votes
1 answer
107 views

Decomposing S gate in two T gate with qiskit

Let's suppose I define a basis gate set and the following circuit. ...
4 votes
1 answer
370 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 ...
3 votes
2 answers
81 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 ...
1 vote
1 answer
144 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. ...
  • 797
3 votes
0 answers
65 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 ...
  • 305
4 votes
1 answer
109 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 ...
2 votes
0 answers
46 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 ...
  • 97
1 vote
1 answer
235 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 ...
  • 797
1 vote
1 answer
223 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 ...
  • 797
2 votes
2 answers
182 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 ...
  • 41
2 votes
2 answers
198 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. ...
6 votes
1 answer
626 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) ...
1 vote
1 answer
41 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. ...
4 votes
1 answer
330 views

Qiskit: Transpilation and the CircuitSampler

I am using Qiskit's opflow and its CircuitSampler to evaluate matrix elements / expectation values. Now, going beyond ...
  • 501
3 votes
0 answers
111 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: ...
  • 2,238