diff --git a/setup.cfg b/setup.cfg index 179e4216..0b881ea7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = qrisp -version = 0.4.2 +version = 0.4.3 author = Raphael Seidel author_email = raphael.seidel@fokus.fraunhofer.de description = A high-level quantum programming language diff --git a/src/qrisp/interface/backends.py b/src/qrisp/interface/backends.py index a3e5dc35..3caa7ab3 100644 --- a/src/qrisp/interface/backends.py +++ b/src/qrisp/interface/backends.py @@ -169,9 +169,16 @@ def run(qasm_str, shots, token = ""): qiskit_qc = QuantumCircuit.from_qasm_str(qasm_str) - from qiskit import transpile + + #Make circuit with one monolithic register + new_qiskit_qc = QuantumCircuit(len(qiskit_qc.qubits), len(qiskit_qc.clbits)) + for instr in qiskit_qc: + new_qiskit_qc.append(instr.operation, + [qiskit_qc.qubits.index(qb) for qb in instr.qubits], + [qiskit_qc.clbits.index(cb) for cb in instr.clbits]) - qiskit_qc = transpile(qiskit_qc, backend=backend) + from qiskit import transpile + qiskit_qc = transpile(new_qiskit_qc, backend=backend) # Run Circuit on the Qiskit backend qiskit_result = backend.run(qiskit_qc, shots=shots).result().get_counts() # Remove the spaces in the qiskit result keys