-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
415 additions
and
1 deletion.
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
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,44 @@ | ||
; ModuleID = '5_bit_random_number' | ||
%Result = type opaque | ||
%Qubit = type opaque | ||
|
||
define void @five_bit_random_number() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) | ||
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 @__quantum__qis__h__body(%Qubit* inttoptr (i64 3 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 4 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 0 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 1 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 2 to %Qubit*), %Result* inttoptr (i64 2 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 3 to %Qubit*), %Result* inttoptr (i64 3 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 4 to %Qubit*), %Result* inttoptr (i64 4 to %Result*)) | ||
call void @__quantum__rt__array_record_output(i64 5, i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 1 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 2 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 3 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 4 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__rt__array_record_output(i64, i8*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="5" "required_num_results"="5" } | ||
attributes #1 = { "irreversible" } | ||
|
||
; module flags | ||
|
||
!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} |
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,56 @@ | ||
|
||
%Qubit = type opaque | ||
%Result = type opaque | ||
|
||
define void @random_bit() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* null) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* null) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* null) | ||
call void @__quantum__rt__result_record_output(%Result* null, i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
define void @five_bit_random_number() #2 { | ||
block_0: | ||
call void @__quantum__qis__h__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 @__quantum__qis__h__body(%Qubit* inttoptr (i64 3 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 4 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* null, %Result* null) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 1 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 2 to %Qubit*), %Result* inttoptr (i64 2 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 3 to %Qubit*), %Result* inttoptr (i64 3 to %Result*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 4 to %Qubit*), %Result* inttoptr (i64 4 to %Result*)) | ||
call void @__quantum__rt__array_record_output(i64 5, i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* null, i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 1 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 2 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 3 to %Result*), i8* null) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 4 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__rt__array_record_output(i64, i8*) | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="2" "required_num_results"="1" } | ||
attributes #1 = { "irreversible" } | ||
attributes #2 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="5" "required_num_results"="5" } | ||
|
||
!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} |
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,34 @@ | ||
; ModuleID = 'OneDotZero' | ||
%Result = type opaque | ||
%Qubit = type opaque | ||
|
||
define void @OneDotZero() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="2" "required_num_results"="1" } | ||
attributes #1 = { "irreversible" } | ||
|
||
; module flags | ||
|
||
!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} |
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,34 @@ | ||
; ModuleID = 'OneDotOne' | ||
%Result = type opaque | ||
%Qubit = type opaque | ||
|
||
define void @OneDotOne() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="2" "required_num_results"="1" } | ||
attributes #1 = { "irreversible" } | ||
|
||
; module flags | ||
|
||
!llvm.module.flags = !{!0, !1, !2, !3} | ||
|
||
!0 = !{i32 1, !"qir_major_version", i32 1} | ||
!1 = !{i32 7, !"qir_minor_version", i32 1} | ||
!2 = !{i32 1, !"dynamic_qubit_management", i1 false} | ||
!3 = !{i32 1, !"dynamic_result_management", i1 false} |
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,34 @@ | ||
; ModuleID = 'TwoDotZero' | ||
%Result = type opaque | ||
%Qubit = type opaque | ||
|
||
define void @TwoDotZero() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="2" "required_num_results"="1" } | ||
attributes #1 = { "irreversible" } | ||
|
||
; module flags | ||
|
||
!llvm.module.flags = !{!0, !1, !2, !3} | ||
|
||
!0 = !{i32 1, !"qir_major_version", i32 2} | ||
!1 = !{i32 7, !"qir_minor_version", i32 0} | ||
!2 = !{i32 1, !"dynamic_qubit_management", i1 false} | ||
!3 = !{i32 1, !"dynamic_result_management", i1 false} |
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,34 @@ | ||
; ModuleID = 'random_bit' | ||
%Result = type opaque | ||
%Qubit = type opaque | ||
|
||
define void @random_bit() #0 { | ||
block_0: | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Qubit* inttoptr (i64 0 to %Qubit*)) | ||
call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 1 to %Qubit*)) | ||
call void @__quantum__qis__m__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) | ||
call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) | ||
ret void | ||
} | ||
|
||
declare void @__quantum__qis__h__body(%Qubit*) | ||
|
||
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) | ||
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
declare void @__quantum__qis__m__body(%Qubit*, %Result*) #1 | ||
|
||
attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="2" "required_num_results"="1" } | ||
attributes #1 = { "irreversible" } | ||
|
||
; module flags | ||
|
||
!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} |
Oops, something went wrong.