Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some qiskit gates missing from the _known_qiskit_gate list #88

Open
ferbetanzo opened this issue Mar 20, 2023 · 4 comments
Open

Some qiskit gates missing from the _known_qiskit_gate list #88

ferbetanzo opened this issue Mar 20, 2023 · 4 comments
Labels
circuit_conversion Issues and pull requests related to coverting qiskit circuits to pytket and vice versa good first issue Good for newcomers

Comments

@ferbetanzo
Copy link

After using qiskit.circuit.random.random_circuit for generating random qiskit circuits, if you try to transform those circuits to tket with pytket.extensions.qiskit.qiskit_to_tk, the process fails since there are some gates that are not recognised. The following is a list of the gates not recognised (beware that the list might not be complete):

qiskit.circuit.library.standard_gates.sx.CSXGate
qiskit.circuit.library.standard_gates.z.CCZGate
qiskit.circuit.library.standard_gates.rzx.RZXGate
qiskit.circuit.library.standard_gates.xx_plus_yy.XXPlusYYGate
qiskit.circuit.library.standard_gates.dcx.DCXGate
qiskit.circuit.library.standard_gates.xx_minus_yy.XXMinusYYGate
qiskit.circuit.library.standard_gates.s.CSdgGate
qiskit.circuit.library.standard_gates.x.RCCXGate
qiskit.circuit.library.standard_gates.s.CSGate
@CalMacCQ CalMacCQ added the good first issue Good for newcomers label Apr 3, 2023
@isobelhooper
Copy link
Contributor

Other gates I found that were not recognised, when trying to do a similar thing with Qiskit's random_circuit:

  • qiskit.circuit.library.standard_gates.x.C3SXGate
  • qiskit.circuit.library.standard_gates.x.RC3XGate

@CalMacCQ
Copy link
Contributor

CalMacCQ commented May 13, 2023

I would expect the controlled gates listed here to be handled in the converter after #50 . This change should allow us to convert any controlled gate to a qiskit gate with QControlBox provided the converters can handle the base gate.

Not sure why we get an error.

Will take a look at this.

@CalMacCQ
Copy link
Contributor

Turns out the controlled gate coversion is more limited than expected #134.

Shouldn't be hard to fix this.

@CalMacCQ
Copy link
Contributor

CalMacCQ commented Jul 11, 2023

FYI in 0.41.0 we now support CSX and CCZ gates directly.

There are some gates such as CS and C3SX where we support the base gate but don't have an OpType for the controlled gate itself. These will now be handled with QControlBox in 0.41.0. This should have been the case before but I spotted a bug.

As for the other gates you point out, we may need to add new OpTypes if we want to support those ones.

@CalMacCQ CalMacCQ added the circuit_conversion Issues and pull requests related to coverting qiskit circuits to pytket and vice versa label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
circuit_conversion Issues and pull requests related to coverting qiskit circuits to pytket and vice versa good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants