-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from CQCL/release/0.11.0
Release/0.11.0
- Loading branch information
Showing
6 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__extension_version__ = "0.10.1" | ||
__extension_version__ = "0.11.0" | ||
__extension_name__ = "pytket-qir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
; ModuleID = 'test_pytket_qir_conditional_12' | ||
source_filename = "test_pytket_qir_conditional_12" | ||
|
||
%Qubit = type opaque | ||
%Result = type opaque | ||
|
||
@0 = internal constant [15 x i8] c"tk_SCRATCH_BIT\00" | ||
|
||
define void @main() #0 { | ||
entry: | ||
%0 = call i1* @create_creg(i64 2) | ||
call void @set_creg_bit(i1* %0, i64 0, i1 true) | ||
call void @set_creg_bit(i1* %0, i64 1, i1 false) | ||
%1 = call i1 @get_creg_bit(i1* %0, i64 0) | ||
br i1 %1, label %then, label %else | ||
|
||
then: ; preds = %entry | ||
call void @__quantum__qis__h__body(%Qubit* null) | ||
br label %continue | ||
|
||
else: ; preds = %entry | ||
br label %continue | ||
|
||
continue: ; preds = %else, %then | ||
%2 = call i1 @get_creg_bit(i1* %0, i64 1) | ||
br i1 %2, label %then1, label %else2 | ||
|
||
then1: ; preds = %continue | ||
call void @__quantum__qis__h__body(%Qubit* null) | ||
br label %continue3 | ||
|
||
else2: ; preds = %continue | ||
br label %continue3 | ||
|
||
continue3: ; preds = %else2, %then1 | ||
call void @__quantum__rt__tuple_start_record_output() | ||
%3 = call i64 @get_int_from_creg(i1* %0) | ||
call void @__quantum__rt__int_record_output(i64 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @0, i32 0, i32 0)) | ||
call void @__quantum__rt__tuple_end_record_output() | ||
ret void | ||
} | ||
|
||
declare i1 @get_creg_bit(i1*, i64) | ||
|
||
declare void @set_creg_bit(i1*, i64, i1) | ||
|
||
declare void @set_creg_to_int(i1*, i64) | ||
|
||
declare i1 @__quantum__qis__read_result__body(%Result*) | ||
|
||
declare i1* @create_creg(i64) | ||
|
||
declare i64 @get_int_from_creg(i1*) | ||
|
||
declare void @mz_to_creg_bit(%Qubit*, i1*, i64) | ||
|
||
declare void @__quantum__rt__int_record_output(i64, i8*) | ||
|
||
declare void @__quantum__rt__tuple_start_record_output() | ||
|
||
declare void @__quantum__rt__tuple_end_record_output() | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="custom" "required_num_qubits"="7" "required_num_results"="7" } | ||
|
||
!llvm.module.flags = !{!0, !1, !2, !3} | ||
|
||
!0 = !{i32 1, !"qir_major_version", i32 1} | ||
!1 = !{i32 7, !"qir_minor_version", i32 0} | ||
!2 = !{i32 1, !"dynamic_qubit_management", i1 false} | ||
!3 = !{i32 1, !"dynamic_result_management", i1 false} |