Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classiq open challenge project draft submission - Team QubitSquad #2

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,371 changes: 1,371 additions & 0 deletions .ipynb_checkpoints/Classiq_open-challenge_ODE-checkpoint.ipynb

Large diffs are not rendered by default.

1,479 changes: 1,479 additions & 0 deletions Classiq_open-challenge_ODE.ipynb

Large diffs are not rendered by default.

Binary file added imgs/classiq_open-challenge_qc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,157 changes: 1,157 additions & 0 deletions models/bound_optimization/k31_bound0.001_t0.0_noConstraints.qasm

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions models/bound_optimization/k31_bound0.001_t0.0_noConstraints.qmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
qfunc prep_ancilla(ancilla_reg: qnum, bound: real) {
inplace_prepare_state([
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
], bound, ancilla_reg);
}

qfunc compose(gate1: qfunc (qbit), gate2: qfunc (qbit), q: qbit) {
gate1(q);
gate2(q);
}

qfunc operate(ancilla_reg: qnum, work_q: qbit, k: int) {
H(work_q);
repeat (index: k + 1) {
control (ancilla_reg == index) {
if ((index % 4) == 0) {
I(work_q);
} else {
if ((index % 4) == 1) {
compose(X, Z, work_q);
} else {
if ((index % 4) == 2) {
RZ(6.2832, work_q);
} else {
compose(Z, X, work_q);
}
}
}
}
}
}

qfunc main(output work_q: qbit, output ancilla_reg: qnum) {
allocate(1, work_q);
allocate(5.0, ancilla_reg);
within {
prep_ancilla(ancilla_reg, 0.001);
} apply {
operate(ancilla_reg, work_q, 31);
}
if (False) {
H(work_q);
} else {
I(work_q);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading