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
1 vote
1 answer
296 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?
4 votes
1 answer
365 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 ...
2 votes
1 answer
205 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?
1 vote
1 answer
68 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?
2 votes
1 answer
71 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 ...
2 votes
1 answer
31 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]) ...
1 vote
1 answer
88 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 ...
0 votes
1 answer
74 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 ...
0 votes
1 answer
116 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 ...