Skip to content

Commit

Permalink
Merge pull request #7 from qsharp-community/1.6.0-update
Browse files Browse the repository at this point in the history
Q# 1.6.0 update
  • Loading branch information
filipw authored Jun 23, 2024
2 parents 6775d1e + 971484d commit 1c29184
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 57 deletions.
64 changes: 33 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ edition = "2021"
crate-type = ["lib", "cdylib", "staticlib"]

[dependencies]
qsc = { git = "https://github.com/microsoft/qsharp.git", tag = "v1.4.0" }
resource_estimator = { git = "https://github.com/microsoft/qsharp.git", tag = "v1.4.0" }
qsc = { git = "https://github.com/microsoft/qsharp.git", tag = "v1.6.0" }
resource_estimator = { git = "https://github.com/microsoft/qsharp.git", tag = "v1.6.0" }
uniffi = { version = "0.23.0", features=["build"] }
thiserror = "1.0"
num-bigint = "0.4.3"
num-bigint = "0.4.5"
num-complex = "0.4"

[dev-dependencies]
Expand Down
31 changes: 8 additions & 23 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,43 +104,28 @@ fn test_teleportation_shots() {
fn test_qir() {
let result = qir("{ operation Foo() : Result { use q = Qubit(); let r = M(q); Reset(q); r }; Foo() }").unwrap();

//println!("{}", result.clone());
println!("{}", result.clone());

let expected = r####"%Result = type opaque
%Qubit = type opaque
define void @ENTRYPOINT__main() #0 {
block_0:
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__mz__body(%Qubit* inttoptr (i64 1 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) #1
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__ccx__body(%Qubit*, %Qubit*, %Qubit*)
declare void @__quantum__qis__cx__body(%Qubit*, %Qubit*)
declare void @__quantum__qis__cy__body(%Qubit*, %Qubit*)
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*)
declare void @__quantum__qis__rx__body(double, %Qubit*)
declare void @__quantum__qis__rxx__body(double, %Qubit*, %Qubit*)
declare void @__quantum__qis__ry__body(double, %Qubit*)
declare void @__quantum__qis__ryy__body(double, %Qubit*, %Qubit*)
declare void @__quantum__qis__rz__body(double, %Qubit*)
declare void @__quantum__qis__rzz__body(double, %Qubit*, %Qubit*)
declare void @__quantum__qis__h__body(%Qubit*)
declare void @__quantum__qis__s__body(%Qubit*)
declare void @__quantum__qis__s__adj(%Qubit*)
declare void @__quantum__qis__t__body(%Qubit*)
declare void @__quantum__qis__t__adj(%Qubit*)
declare void @__quantum__qis__x__body(%Qubit*)
declare void @__quantum__qis__y__body(%Qubit*)
declare void @__quantum__qis__z__body(%Qubit*)
declare void @__quantum__qis__swap__body(%Qubit*, %Qubit*)
declare void @__quantum__qis__mz__body(%Qubit*, %Result* writeonly) #1
declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*)
declare void @__quantum__rt__result_record_output(%Result*, i8*)
declare void @__quantum__rt__array_record_output(i64, i8*)
declare void @__quantum__rt__tuple_record_output(i64, 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" }
Expand Down

0 comments on commit 1c29184

Please sign in to comment.