From 844a75dd1161476ea07c38806042bc766bc58f42 Mon Sep 17 00:00:00 2001 From: Melf Date: Wed, 25 Oct 2023 16:00:00 +0100 Subject: [PATCH] rename to mz_to_creg_bit, and add comment --- pytket/qir/conversion/conversion.py | 9 +++++---- tests/qir/test_pytket_qir.ll | 2 +- tests/qir/test_pytket_qir_10.ll | 2 +- tests/qir/test_pytket_qir_11.ll | 2 +- tests/qir/test_pytket_qir_12.ll | 2 +- tests/qir/test_pytket_qir_13.ll | 2 +- tests/qir/test_pytket_qir_14.ll | 2 +- tests/qir/test_pytket_qir_14_b.ll | 2 +- tests/qir/test_pytket_qir_15.ll | 2 +- tests/qir/test_pytket_qir_17.ll | 6 +++--- tests/qir/test_pytket_qir_2.ll | 2 +- tests/qir/test_pytket_qir_3.ll | 2 +- tests/qir/test_pytket_qir_4.ll | 2 +- tests/qir/test_pytket_qir_5.ll | 2 +- tests/qir/test_pytket_qir_6.ll | 4 ++-- tests/qir/test_pytket_qir_7.ll | 2 +- tests/qir/test_pytket_qir_8.ll | 2 +- tests/qir/test_pytket_qir_9.ll | 2 +- tests/qir/test_pytket_qir_barrier.ll | 2 +- tests/qir/test_pytket_qir_barrier_ii.ll | 2 +- tests/qir/test_pytket_qir_conditional.ll | 8 ++++---- tests/qir/test_pytket_qir_conditional_10.ll | 2 +- tests/qir/test_pytket_qir_conditional_11.ll | 2 +- tests/qir/test_pytket_qir_conditional_6.ll | 2 +- tests/qir/test_pytket_qir_conditional_7.ll | 2 +- tests/qir/test_pytket_qir_conditional_8.ll | 2 +- tests/qir/test_pytket_qir_conditional_9.ll | 2 +- tests/qir/test_pytket_qir_conditional_ii.ll | 8 ++++---- tests/qir/test_pytket_qir_conditional_iii.ll | 2 +- tests/qir/test_pytket_qir_conditional_iv.ll | 6 +++--- tests/qir/test_pytket_qir_conditional_v.ll | 6 +++--- tests/qir/test_pytket_qir_module.ll | 2 +- tests/qir/test_pytket_qir_qasm.ll | 2 +- tests/qir/test_pytket_qir_quantum.ll | 2 +- tests/qir/test_pytket_qir_quantum_ii.ll | 4 ++-- tests/qir/test_pytket_qir_quantum_iii.ll | 6 +++--- tests/qir/test_pytket_qir_quantum_iv.ll | 4 ++-- tests/qir/test_pytket_qir_quantum_v.ll | 4 ++-- tests/qir/test_pytket_qir_rangepredicate.ll | 2 +- tests/qir/test_pytket_qir_wasm.ll | 2 +- tests/qir/test_pytket_qir_wasm_ii.ll | 2 +- tests/qir/test_pytket_qir_wasm_ii_64.ll | 2 +- 42 files changed, 64 insertions(+), 63 deletions(-) diff --git a/pytket/qir/conversion/conversion.py b/pytket/qir/conversion/conversion.py index 96d140f0..783ea38c 100644 --- a/pytket/qir/conversion/conversion.py +++ b/pytket/qir/conversion/conversion.py @@ -202,9 +202,10 @@ def __init__( ), ) - # void mz_to_creg(qubit, i1* creg, int creg_index) - self.mz_to_creg = self.module.module.add_external_function( - "mz_to_creg", + # void mz_to_creg_bit(qubit, i1* creg, int creg_index) + # measures one qubit to one bit entry in a creg + self.mz_to_creg_bit = self.module.module.add_external_function( + "mz_to_creg_bit", pyqir.FunctionType( pyqir.Type.void(self.module.module.context), [ @@ -856,7 +857,7 @@ def condition_block() -> None: assert command.qubits[0].reg_name == "q" self.module.builder.call( - self.mz_to_creg, + self.mz_to_creg_bit, [ module.module.qubits[command.qubits[0].index[0]], self.ssa_vars[command.bits[0].reg_name], diff --git a/tests/qir/test_pytket_qir.ll b/tests/qir/test_pytket_qir.ll index 2c953dff..4549c8e3 100644 --- a/tests/qir/test_pytket_qir.ll +++ b/tests/qir/test_pytket_qir.ll @@ -24,7 +24,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_10.ll b/tests/qir/test_pytket_qir_10.ll index 603fb58f..46274377 100644 --- a/tests/qir/test_pytket_qir_10.ll +++ b/tests/qir/test_pytket_qir_10.ll @@ -36,7 +36,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_11.ll b/tests/qir/test_pytket_qir_11.ll index 6e8dafa3..1791cdb8 100644 --- a/tests/qir/test_pytket_qir_11.ll +++ b/tests/qir/test_pytket_qir_11.ll @@ -36,7 +36,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_12.ll b/tests/qir/test_pytket_qir_12.ll index 14622203..840fb252 100644 --- a/tests/qir/test_pytket_qir_12.ll +++ b/tests/qir/test_pytket_qir_12.ll @@ -33,7 +33,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_13.ll b/tests/qir/test_pytket_qir_13.ll index 760eeec5..d6e1d0bd 100644 --- a/tests/qir/test_pytket_qir_13.ll +++ b/tests/qir/test_pytket_qir_13.ll @@ -42,7 +42,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_14.ll b/tests/qir/test_pytket_qir_14.ll index 6e34d798..8d6804dd 100644 --- a/tests/qir/test_pytket_qir_14.ll +++ b/tests/qir/test_pytket_qir_14.ll @@ -305,7 +305,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_14_b.ll b/tests/qir/test_pytket_qir_14_b.ll index 34b686d9..171230ac 100644 --- a/tests/qir/test_pytket_qir_14_b.ll +++ b/tests/qir/test_pytket_qir_14_b.ll @@ -423,7 +423,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_15.ll b/tests/qir/test_pytket_qir_15.ll index ad311a37..36e264d4 100644 --- a/tests/qir/test_pytket_qir_15.ll +++ b/tests/qir/test_pytket_qir_15.ll @@ -40,7 +40,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_17.ll b/tests/qir/test_pytket_qir_17.ll index d0735a29..608710a5 100644 --- a/tests/qir/test_pytket_qir_17.ll +++ b/tests/qir/test_pytket_qir_17.ll @@ -13,8 +13,8 @@ entry: %1 = call i1* @create_creg(i64 1) call void @__quantum__qis__h__body(%Qubit* null) call void @__quantum__qis__cnot__body(%Qubit* null, %Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* null, i1* %0, i64 0) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %1, i64 0) + call void @mz_to_creg_bit(%Qubit* null, i1* %0, i64 0) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %1, i64 0) call void @__quantum__rt__tuple_start_record_output() %2 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @0, i32 0, i32 0)) @@ -36,7 +36,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_2.ll b/tests/qir/test_pytket_qir_2.ll index f5f9d573..df740180 100644 --- a/tests/qir/test_pytket_qir_2.ll +++ b/tests/qir/test_pytket_qir_2.ll @@ -24,7 +24,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_3.ll b/tests/qir/test_pytket_qir_3.ll index b1b9b7bc..3926e0e0 100644 --- a/tests/qir/test_pytket_qir_3.ll +++ b/tests/qir/test_pytket_qir_3.ll @@ -31,7 +31,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_4.ll b/tests/qir/test_pytket_qir_4.ll index f9833578..339872f2 100644 --- a/tests/qir/test_pytket_qir_4.ll +++ b/tests/qir/test_pytket_qir_4.ll @@ -55,7 +55,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_5.ll b/tests/qir/test_pytket_qir_5.ll index 200948a2..e09bfabc 100644 --- a/tests/qir/test_pytket_qir_5.ll +++ b/tests/qir/test_pytket_qir_5.ll @@ -59,7 +59,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_6.ll b/tests/qir/test_pytket_qir_6.ll index 9c5d3aa6..5a507208 100644 --- a/tests/qir/test_pytket_qir_6.ll +++ b/tests/qir/test_pytket_qir_6.ll @@ -24,7 +24,7 @@ entry: call void @__quantum__qis__x__body(%Qubit* null) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 2 to %Qubit*)) - call void @mz_to_creg(%Qubit* null, i1* %2, i64 4) + call void @mz_to_creg_bit(%Qubit* null, i1* %2, i64 4) %9 = call i1 @get_creg_bit(i1* %2, i64 4) br i1 %9, label %then, label %else @@ -62,7 +62,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_7.ll b/tests/qir/test_pytket_qir_7.ll index cef46edf..158648ce 100644 --- a/tests/qir/test_pytket_qir_7.ll +++ b/tests/qir/test_pytket_qir_7.ll @@ -124,7 +124,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_8.ll b/tests/qir/test_pytket_qir_8.ll index 0b32dfd9..4e318b8f 100644 --- a/tests/qir/test_pytket_qir_8.ll +++ b/tests/qir/test_pytket_qir_8.ll @@ -40,7 +40,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_9.ll b/tests/qir/test_pytket_qir_9.ll index 1a8c842d..412e80c8 100644 --- a/tests/qir/test_pytket_qir_9.ll +++ b/tests/qir/test_pytket_qir_9.ll @@ -36,7 +36,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_barrier.ll b/tests/qir/test_pytket_qir_barrier.ll index 53d991a1..dde1c32e 100644 --- a/tests/qir/test_pytket_qir_barrier.ll +++ b/tests/qir/test_pytket_qir_barrier.ll @@ -30,7 +30,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_barrier_ii.ll b/tests/qir/test_pytket_qir_barrier_ii.ll index 95bef306..eae4c66a 100644 --- a/tests/qir/test_pytket_qir_barrier_ii.ll +++ b/tests/qir/test_pytket_qir_barrier_ii.ll @@ -32,7 +32,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional.ll b/tests/qir/test_pytket_qir_conditional.ll index 9c651759..bda375a0 100644 --- a/tests/qir/test_pytket_qir_conditional.ll +++ b/tests/qir/test_pytket_qir_conditional.ll @@ -47,9 +47,9 @@ else: ; preds = %entry br label %continue continue: ; preds = %else, %then - call void @mz_to_creg(%Qubit* inttoptr (i64 2 to %Qubit*), i1* %3, i64 2) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %3, i64 3) - call void @mz_to_creg(%Qubit* null, i1* %3, i64 4) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 2 to %Qubit*), i1* %3, i64 2) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %3, i64 3) + call void @mz_to_creg_bit(%Qubit* null, i1* %3, i64 4) call void @__quantum__rt__tuple_start_record_output() %20 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) @@ -75,7 +75,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_10.ll b/tests/qir/test_pytket_qir_conditional_10.ll index f5736fb4..595fbc42 100644 --- a/tests/qir/test_pytket_qir_conditional_10.ll +++ b/tests/qir/test_pytket_qir_conditional_10.ll @@ -53,7 +53,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_11.ll b/tests/qir/test_pytket_qir_conditional_11.ll index 8fb50527..ff96b57c 100644 --- a/tests/qir/test_pytket_qir_conditional_11.ll +++ b/tests/qir/test_pytket_qir_conditional_11.ll @@ -960,7 +960,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_6.ll b/tests/qir/test_pytket_qir_conditional_6.ll index 4597e935..74a17317 100644 --- a/tests/qir/test_pytket_qir_conditional_6.ll +++ b/tests/qir/test_pytket_qir_conditional_6.ll @@ -42,7 +42,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_7.ll b/tests/qir/test_pytket_qir_conditional_7.ll index d6d085fc..eb45dd11 100644 --- a/tests/qir/test_pytket_qir_conditional_7.ll +++ b/tests/qir/test_pytket_qir_conditional_7.ll @@ -116,7 +116,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_8.ll b/tests/qir/test_pytket_qir_conditional_8.ll index 9b99361c..bf02ae22 100644 --- a/tests/qir/test_pytket_qir_conditional_8.ll +++ b/tests/qir/test_pytket_qir_conditional_8.ll @@ -42,7 +42,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_9.ll b/tests/qir/test_pytket_qir_conditional_9.ll index 991bfcb6..2d9e198d 100644 --- a/tests/qir/test_pytket_qir_conditional_9.ll +++ b/tests/qir/test_pytket_qir_conditional_9.ll @@ -42,7 +42,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_ii.ll b/tests/qir/test_pytket_qir_conditional_ii.ll index 07b801d8..0b8f042a 100644 --- a/tests/qir/test_pytket_qir_conditional_ii.ll +++ b/tests/qir/test_pytket_qir_conditional_ii.ll @@ -47,9 +47,9 @@ else: ; preds = %entry br label %continue continue: ; preds = %else, %then - call void @mz_to_creg(%Qubit* inttoptr (i64 2 to %Qubit*), i1* %3, i64 2) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %3, i64 3) - call void @mz_to_creg(%Qubit* null, i1* %3, i64 4) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 2 to %Qubit*), i1* %3, i64 2) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %3, i64 3) + call void @mz_to_creg_bit(%Qubit* null, i1* %3, i64 4) call void @__quantum__rt__tuple_start_record_output() %20 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) @@ -75,7 +75,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_iii.ll b/tests/qir/test_pytket_qir_conditional_iii.ll index f828456c..50841e02 100644 --- a/tests/qir/test_pytket_qir_conditional_iii.ll +++ b/tests/qir/test_pytket_qir_conditional_iii.ll @@ -90,7 +90,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_iv.ll b/tests/qir/test_pytket_qir_conditional_iv.ll index cc8d5319..eb3a581a 100644 --- a/tests/qir/test_pytket_qir_conditional_iv.ll +++ b/tests/qir/test_pytket_qir_conditional_iv.ll @@ -11,8 +11,8 @@ entry: %0 = call i1* @create_creg(i64 2) call void @__quantum__qis__h__body(%Qubit* null) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* null, i1* %0, i64 0) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* null, i1* %0, i64 0) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) %1 = call i64 @get_int_from_creg(i1* %0) %2 = icmp eq i64 3, %1 br i1 %2, label %then, label %else @@ -44,7 +44,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_conditional_v.ll b/tests/qir/test_pytket_qir_conditional_v.ll index f0e7943c..df8df8f7 100644 --- a/tests/qir/test_pytket_qir_conditional_v.ll +++ b/tests/qir/test_pytket_qir_conditional_v.ll @@ -11,8 +11,8 @@ entry: %0 = call i1* @create_creg(i64 3) call void @__quantum__qis__h__body(%Qubit* null) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* null, i1* %0, i64 0) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* null, i1* %0, i64 0) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) %1 = call i64 @get_int_from_creg(i1* %0) %2 = icmp eq i64 3, %1 br i1 %2, label %then, label %else @@ -44,7 +44,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_module.ll b/tests/qir/test_pytket_qir_module.ll index 2c953dff..4549c8e3 100644 --- a/tests/qir/test_pytket_qir_module.ll +++ b/tests/qir/test_pytket_qir_module.ll @@ -24,7 +24,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_qasm.ll b/tests/qir/test_pytket_qir_qasm.ll index 1292dafa..0664b19f 100644 --- a/tests/qir/test_pytket_qir_qasm.ll +++ b/tests/qir/test_pytket_qir_qasm.ll @@ -48,7 +48,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_quantum.ll b/tests/qir/test_pytket_qir_quantum.ll index 88edae50..a07984dd 100644 --- a/tests/qir/test_pytket_qir_quantum.ll +++ b/tests/qir/test_pytket_qir_quantum.ll @@ -24,7 +24,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_quantum_ii.ll b/tests/qir/test_pytket_qir_quantum_ii.ll index 89b6339f..1fd73f7c 100644 --- a/tests/qir/test_pytket_qir_quantum_ii.ll +++ b/tests/qir/test_pytket_qir_quantum_ii.ll @@ -15,7 +15,7 @@ entry: call void @__quantum__qis__cnot__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 3 to %Qubit*)) call void @__quantum__qis__y__body(%Qubit* null) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) call void @__quantum__qis__z__body(%Qubit* null) call void @__quantum__qis__rx__body(double 0x3FF921FB54442D18, %Qubit* null) call void @__quantum__rt__tuple_start_record_output() @@ -37,7 +37,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_quantum_iii.ll b/tests/qir/test_pytket_qir_quantum_iii.ll index 94084a21..ff82d864 100644 --- a/tests/qir/test_pytket_qir_quantum_iii.ll +++ b/tests/qir/test_pytket_qir_quantum_iii.ll @@ -11,8 +11,8 @@ entry: %0 = call i1* @create_creg(i64 2) call void @__quantum__qis__h__body(%Qubit* null) call void @__quantum__qis__cnot__body(%Qubit* null, %Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* null, i1* %0, i64 0) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* null, i1* %0, i64 0) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) call void @__quantum__rt__tuple_start_record_output() %1 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) @@ -32,7 +32,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_quantum_iv.ll b/tests/qir/test_pytket_qir_quantum_iv.ll index d1fbfa6a..45d7cad5 100644 --- a/tests/qir/test_pytket_qir_quantum_iv.ll +++ b/tests/qir/test_pytket_qir_quantum_iv.ll @@ -20,7 +20,7 @@ entry: call void @__quantum__qis__cnot__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 2 to %Qubit*)) call void @__quantum__qis__cnot__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 3 to %Qubit*)) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) call void @__quantum__rt__tuple_start_record_output() %1 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) @@ -40,7 +40,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_quantum_v.ll b/tests/qir/test_pytket_qir_quantum_v.ll index 6e6c4d52..af299839 100644 --- a/tests/qir/test_pytket_qir_quantum_v.ll +++ b/tests/qir/test_pytket_qir_quantum_v.ll @@ -21,7 +21,7 @@ entry: call void @__quantum__qis__cnot__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 2 to %Qubit*)) call void @__quantum__qis__cnot__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 3 to %Qubit*)) call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) - call void @mz_to_creg(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) + call void @mz_to_creg_bit(%Qubit* inttoptr (i64 1 to %Qubit*), i1* %0, i64 1) call void @__quantum__rt__tuple_start_record_output() %1 = call i64 @get_int_from_creg(i1* %0) call void @__quantum__rt__int_record_output(i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) @@ -41,7 +41,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_rangepredicate.ll b/tests/qir/test_pytket_qir_rangepredicate.ll index ce0e9396..50e586f8 100644 --- a/tests/qir/test_pytket_qir_rangepredicate.ll +++ b/tests/qir/test_pytket_qir_rangepredicate.ll @@ -125,7 +125,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*) diff --git a/tests/qir/test_pytket_qir_wasm.ll b/tests/qir/test_pytket_qir_wasm.ll index 12a5cdbb..9823c7a5 100644 --- a/tests/qir/test_pytket_qir_wasm.ll +++ b/tests/qir/test_pytket_qir_wasm.ll @@ -24,7 +24,7 @@ declare i1* @create_creg(i32) declare i32 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i32) +declare void @mz_to_creg_bit(%Qubit*, i1*, i32) declare void @__quantum__rt__int_record_output(i32, i8*) diff --git a/tests/qir/test_pytket_qir_wasm_ii.ll b/tests/qir/test_pytket_qir_wasm_ii.ll index b0b8ac97..406fe1f6 100644 --- a/tests/qir/test_pytket_qir_wasm_ii.ll +++ b/tests/qir/test_pytket_qir_wasm_ii.ll @@ -52,7 +52,7 @@ declare i1* @create_creg(i32) declare i32 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i32) +declare void @mz_to_creg_bit(%Qubit*, i1*, i32) declare void @__quantum__rt__int_record_output(i32, i8*) diff --git a/tests/qir/test_pytket_qir_wasm_ii_64.ll b/tests/qir/test_pytket_qir_wasm_ii_64.ll index 46e69ee8..a6e52031 100644 --- a/tests/qir/test_pytket_qir_wasm_ii_64.ll +++ b/tests/qir/test_pytket_qir_wasm_ii_64.ll @@ -42,7 +42,7 @@ declare i1* @create_creg(i64) declare i64 @get_int_from_creg(i1*) -declare void @mz_to_creg(%Qubit*, i1*, i64) +declare void @mz_to_creg_bit(%Qubit*, i1*, i64) declare void @__quantum__rt__int_record_output(i64, i8*)