CQCL / pytket-qiskit

pytket-qiskit, extensions for pytket quantum SDK
Apache License 2.0
17 stars 13 forks source link

Forbid circuits with incomplete classical registers in tk_to_qiskit() #338

Closed cqc-alec closed 6 months ago

cqc-alec commented 6 months ago

Description

Qiskit circuits can only contain qubits and bits that are singly indexed in a contiguous manner starting from 0. Currently we just create registers large enough to contain the highest index in the pytket circuit. This is OK for qubits but for bits it causes incorrect results. The simplest fix is just to disallow this (rare) case.

Related issues

Fixes #337 .

Checklist