From b49c6058cc8ddc4e383a508e8583f52cc8245486 Mon Sep 17 00:00:00 2001 From: contra-bit Date: Sat, 10 Feb 2024 15:07:28 +0100 Subject: [PATCH] Add OpenWASM as a weakdependency (#9) * Add OpenWASM as a weakdependency * rewrite cx as CX --------- Co-authored-by: Liam --- Project.toml | 7 ++++++- test/qasm.jl | 16 ++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Project.toml b/Project.toml index 9d3dc93..2c4340d 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,12 @@ Expronicon = "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636" MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" YaoLocations = "66df03fb-d475-48f7-b449-3d9064bf085b" +[weakdeps] +OpenQASM = "a8821629-a4c0-4df7-9e00-12969ff383a7" + +[extensions] +YaoHIRExt = ["OpenQASM"] + [compat] Expronicon = "0.10" MLStyle = "0.4" @@ -15,7 +21,6 @@ YaoLocations = "0.1" julia = "1.9" [extras] -OpenQASM = "a8821629-a4c0-4df7-9e00-12969ff383a7" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] diff --git a/test/qasm.jl b/test/qasm.jl index 1a03550..3d77f16 100644 --- a/test/qasm.jl +++ b/test/qasm.jl @@ -53,18 +53,18 @@ using OpenQASM h q[2]; x q[2]; h q[2]; - cx q[1],q[2]; + CX q[1],q[2]; tdg q[2]; - cx q[0],q[2]; + CX q[0],q[2]; t q[2]; - cx q[1],q[2]; + CX q[1],q[2]; t q[1]; tdg q[2]; - cx q[0],q[2]; - cx q[0],q[1]; + CX q[0],q[2]; + CX q[0],q[1]; t q[0]; tdg q[1]; - cx q[0],q[1]; + CX q[0],q[1]; h q[0]; h q[1]; t q[2]; @@ -135,9 +135,9 @@ end x q[0]; x q[1]; h q[2]; - cx q[0],q[2]; + CX q[0],q[2]; x q[0]; - cx q[1],q[2]; + CX q[1],q[2]; h q[0]; x q[1]; h q[1];