Skip to main content

Questions tagged [pytket]

This tag is for questions relating to pytket, an open source quantum SDK developed by Quantinuum. Given that pytket has many features related to compilation the [compiling] or [transpile] tags may be appropriate to add as well. Questions relating to TKET should also be covered under this tag as the TKET compiler is usually accessed through python via pytket.

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

(PyTket) Trouble with RoutingPass.apply() running forever -- seems to hang

I am attempting to route a circuit with 3 qubits, each connected via a 2 qubit gate that is defined using the Unitary2qBox. This sequence is repeated several times. So there are 3 choose 2 gates or 3 ...
Jack Ethridge's user avatar
0 votes
0 answers
30 views

Solving variables in symbolic unitary to get a desired real-valued unitary using qiskit or qympy, qiskit-symb/pytket

I am trying to decompose a 4x4 unitary into 2 qubit circuit using U3 and CNOT gates but the circuit implementation qiskit gives me is not optimized. So I started looking at qiskit-symb and qympy to ...
AishM's user avatar
  • 1
4 votes
2 answers
368 views

Questions on multi-controlled Toffolis and their implementation in Qiskit

Is it possible to decompose an $n$-controlled Toffoli into $O(n)$ CNOTs without extra working qubits? If so, is such an decomposition currently available in Qiskit or any other (preferably Python and ...
mavzolej's user avatar
  • 2,081
3 votes
1 answer
297 views

How do I compile a circuit to the native gateset of Quantinuum's trapped-ion devices?

Suppose I have a quantum circuit defined in pytket, qiskit or some other quantum SDK. How do I compile my circuit to be in the native gateset of the Quantinuum trapped ion device/emulators?
Callum's user avatar
  • 1,105
1 vote
1 answer
77 views

pytket compiler pass to shorten all angles by multiples of 2 pi

After applying some compiler passes in pytket, I get gates like rx(3.5*pi). Is there a pass that simply shortens the angles by multiples of 2 pi, so that I get rx(1.5*pi) instead?
Phil's user avatar
  • 135
0 votes
1 answer
77 views

Pytket's SquashTK1 pass changes symbolic parameters of gates into complicated expressions

For a very simple circuit, such as from pytket.circuit import Circuit, fresh_symbol a = fresh_symbol("a") circ = Circuit(1) circ.X(0) circ.Ry(a,0) the ...
Diego Olvera 's user avatar
1 vote
1 answer
378 views

How to specify custom gate set for the optimization in pytket?

I have a specific basis gate set for my system, is it possible to use pytket's predefined optimization sequences and ask it to give a final circuit using my specific gate set?
mondibrah's user avatar
0 votes
1 answer
147 views

How to set different Backend Layouts in TKET and pyQuil (Quil compiler)?

In Qiskit it is possible to describe a CouplingMap on which a circuit get executed. This helps with testing different Layouts. There are many possibilities in Qiskit on how to do this. Firstly you can ...
Qubii's user avatar
  • 191
4 votes
1 answer
405 views

How to define a custom gate from a matrix in TKET

I'm currently learning all about different quantum tools such as qiskit, tket, cirq, Forest SDK and so on. I just want to create a circuit that gets executed given a matrix, because a circuit can be ...
Qubii's user avatar
  • 191
2 votes
1 answer
84 views

Does pytket have an optimization pass that removes gate-inverse pairs & identity rotations & redundant gates and/or merges rotations?

For the following sample circuit I want to reduce the number of gates in pytket: for example, I know: Adjacent Rx gates can be merged CZ is self-inverse and cancels itself out because any Hermitian ...
mapper's user avatar
  • 35
2 votes
1 answer
38 views

Is this possible to reset a single qubit that is part of a larger register in pytket?

I want to reset a single qubit that is part of a larger register. Is this possible in pytket? Resetting the single qubit qc.add_gate(OpType.Reset,q_register[0]) ...
Qnerd's user avatar
  • 23
1 vote
1 answer
103 views

How do I apply an arbitrarily-phased single qubit gate in pytket?

This is the specific gate I want to implement using pytket: corresponding Wikipedia page I tried: from pytket import Circuit circ = Circuit(1) circ.U1(angle) But ...
mapper's user avatar
  • 35