Skip to content

Commit 28aaa0c

Browse files
[oqc] Fix typos in examples and use consistent pipeline (#3441)
Signed-off-by: Pradnya Khalate <[email protected]>
1 parent 50a26e5 commit 28aaa0c

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

docs/sphinx/targets/cpp/oqc.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ struct bell_state {
2424
h(q[0]);
2525
x<cudaq::ctrl>(q[0], q[1]);
2626
auto result = mz(q);
27-
return result;
2827
}
2928
};
3029

docs/sphinx/targets/python/oqc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def kernel():
2020
qvector = cudaq.qvector(2)
2121
h(qvector[0])
22-
x.ctrl[qvector[1], qvector[1]]
22+
x.ctrl(qvector[0], qvector[1])
2323
mz(qvector)
2424

2525

runtime/cudaq/platform/default/rest/helpers/oqc/oqc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ config:
1818
# Add the rest-qpu library to the link list
1919
link-libs: ["-lcudaq-rest-qpu"]
2020
# Define the lowering pipeline
21-
platform-lowering-config: "func.func(erase-noise),classical-optimization-pipeline,globalize-array-values,func.func(canonicalize,state-prep),unitary-synthesis,canonicalize,apply-op-specialization,aggressive-inlining,expand-measurements,classical-optimization-pipeline,decomposition{enable-patterns=U3ToRotations},lower-to-cfg,func.func(canonicalize,multicontrol-decomposition),oqc-gate-set-mapping,func.func(add-dealloc,combine-quantum-alloc,canonicalize,factor-quantum-alloc,memtoreg),add-wireset,func.func(assign-wire-indices),qubit-mapping{device=file(%QPU_ARCH%)},func.func(regtomem),symbol-dce,distributed-device-call"
21+
platform-lowering-config: "func.func(erase-noise),classical-optimization-pipeline,globalize-array-values,func.func(canonicalize,state-prep),unitary-synthesis,func.func(canonicalize),apply-op-specialization{constant-prop=1},aggressive-inlining,expand-measurements,classical-optimization-pipeline,decomposition{enable-patterns=U3ToRotations},lower-to-cfg,func.func(canonicalize,multicontrol-decomposition),oqc-gate-set-mapping,func.func(add-dealloc,combine-quantum-alloc,canonicalize,factor-quantum-alloc,memtoreg),add-wireset,func.func(assign-wire-indices),qubit-mapping{device=file(%QPU_ARCH%)},func.func(regtomem),symbol-dce,distributed-device-call"
2222
# Tell the rest-qpu that we are generating QIR.
2323
codegen-emission: qir-base
2424
# Library mode is only for simulators, physical backends must turn this off

0 commit comments

Comments
 (0)