Loading examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_simple/README.md→examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/README.md +0 −0 File moved. View file examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_simple/bell.qasm→examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/bell.qasm +8 −1 Original line number Diff line number Diff line // qcor bell.qasm -o bell.x // ./bell.x -qrt ftqc OPENQASM 3; qubit q[2]; const shots = 1024; const shots = 100; int count = 0; for i in [0:shots] { // Create Bell state h q[0]; ctrl @ x q[0], q[1]; // Measure and assert both are equal bit c[2]; c = measure q; if (c[0] == c[1]) { Loading examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/bell.x 0 → 100755 +16.8 KiB File added.No diff preview for this file type. View file examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/ghz.qasm 0 → 100644 +44 −0 Original line number Diff line number Diff line // Compile and run with // qcor ghz.qasm -o ghz.x // // Run on QPP (perfect simulator) // ./ghz.x -qrt nisq -shots 1000 // // Kick off Hardware Executions (will have to wait, kick off in parallel) // // Show on real hardware (IBM) // ./ghz.x -qpu ibm:ibmq_sydney -qrt nisq -shots 1000 // // Show on IonQ QPU // ./ghz.x -qpu ionq:qpu -qrt nisq -shots 1000 // // (In meantime, show of execution on simulators) // // Show on IonQ remote simulator // ./ghz.x -qpu ionq -qrt nisq -shots 1000 // // Show on IBM remote simulator // ./ghz.x -qpu ibm -qrt nisq -shots 1000 // // Show on local aer with noisy backend // ./ghz.x -qpu aer:ibmq_sydney -qrt nisq -shots 100 // // (Now Show off how this works, MLIR + QIR) // // qcor -v ghz.qasm -o ghz.x // qcor --emit-mlir ghz.qasm // qcor --emit-llvm ghz.qasm OPENQASM 3; const n_qubits = 8; qubit q[n_qubits]; h q[0]; for i in [0:n_qubits-1] { ctrl @ x q[i], q[i+1]; } bit c[n_qubits]; c = measure q; No newline at end of file examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/ghz.x 0 → 100755 +16.6 KiB File added.No diff preview for this file type. View file Loading
examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_simple/README.md→examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/README.md +0 −0 File moved. View file
examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_simple/bell.qasm→examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/bell.qasm +8 −1 Original line number Diff line number Diff line // qcor bell.qasm -o bell.x // ./bell.x -qrt ftqc OPENQASM 3; qubit q[2]; const shots = 1024; const shots = 100; int count = 0; for i in [0:shots] { // Create Bell state h q[0]; ctrl @ x q[0], q[1]; // Measure and assert both are equal bit c[2]; c = measure q; if (c[0] == c[1]) { Loading
examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/bell.x 0 → 100755 +16.8 KiB File added.No diff preview for this file type. View file
examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/ghz.qasm 0 → 100644 +44 −0 Original line number Diff line number Diff line // Compile and run with // qcor ghz.qasm -o ghz.x // // Run on QPP (perfect simulator) // ./ghz.x -qrt nisq -shots 1000 // // Kick off Hardware Executions (will have to wait, kick off in parallel) // // Show on real hardware (IBM) // ./ghz.x -qpu ibm:ibmq_sydney -qrt nisq -shots 1000 // // Show on IonQ QPU // ./ghz.x -qpu ionq:qpu -qrt nisq -shots 1000 // // (In meantime, show of execution on simulators) // // Show on IonQ remote simulator // ./ghz.x -qpu ionq -qrt nisq -shots 1000 // // Show on IBM remote simulator // ./ghz.x -qpu ibm -qrt nisq -shots 1000 // // Show on local aer with noisy backend // ./ghz.x -qpu aer:ibmq_sydney -qrt nisq -shots 100 // // (Now Show off how this works, MLIR + QIR) // // qcor -v ghz.qasm -o ghz.x // qcor --emit-mlir ghz.qasm // qcor --emit-llvm ghz.qasm OPENQASM 3; const n_qubits = 8; qubit q[n_qubits]; h q[0]; for i in [0:n_qubits-1] { ctrl @ x q[i], q[i+1]; } bit c[n_qubits]; c = measure q; No newline at end of file
examples/qcor_demos/pirq_workshop/qir_qasm3/demo1_ir_101/ghz.x 0 → 100755 +16.6 KiB File added.No diff preview for this file type. View file