Skip to content

Commit 8c0e5f8

Browse files
committed
cr fix
1 parent aa3e964 commit 8c0e5f8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

algorithms/number_theory_and_cryptography/hidden_shift/hidden_shift.qmod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
// Hidden shift (bent Boolean functions) — simple demo instance
1+
// Hidden shift (bent Boolean functions)
22

33
// This problem describes how to find the hidden shift s, given two functions:
44
// a bent function f(x) and its shifted version g(x) = f(x xor s).
5-
// The functions are represented as quantum oracles that apply a phase flip
6-
// A bent function is a special kind of Boolean function with maximum distance from all linear functions
5+
// The functions are represented as quantum oracles that apply a phase flip.
6+
// A bent function is a special kind of Boolean function with maximum distance from all linear functions.
77

88
num_variables: int = 4;
99

1010
// define both functions:
11-
// f(x) = (x0 & x1) xor (x2 & x3)
1211
qperm bent_function(const vars: qbit[num_variables], res: qbit) {
1312
res ^= (vars[0] & vars[1]) ^ (vars[2] & vars[3]);
1413
}

algorithms/quantum_primitives/swap_test/swap_test.qmod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Swap Test (quantum primitive)
22

33
// This example prepares two (fixed) quantum states |psi1> and |psi2>, then runs `swap_test`.
4-
// the measurement result (test) will gives:
4+
// the measurement result (test) gives:
55
// P(test = |0>) = 1/2 * (1 + |<psi1|psi2>|^2)
66
// Meaning that higher probability of |0> is a higher overlap between the states.
77

0 commit comments

Comments
 (0)