Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit ee348c8

Browse files
pgarrisontcNickolas
authored andcommitted
Use ASCII for letter variable names (#58)
The script r and x didn't render on my machine, so I'm suggesting they become ASCII.
1 parent 4f54f90 commit ee348c8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

DeutschJozsaAlgorithm/Tasks.qs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
2929
//////////////////////////////////////////////////////////////////
3030

3131
// In this section you will implement oracles defined by classical functions using the following rules:
32-
// - a function f(𝑥₀, …, 𝑥ₙ₋₁) with N bits of input x = (𝑥₀, …, 𝑥ₙ₋₁) and 1 bit of output y
32+
// - a function f(x₀, ..., xₙ₋₁) with N bits of input x = (x₀, ..., xₙ₋₁) and 1 bit of output y
3333
// defines an oracle which acts on N input qubits and 1 output qubit.
3434
// - the oracle effect on qubits in computational basis states is defined as follows:
3535
// |x⟩ |y⟩ -> |x⟩ |y ⊕ f(x)⟩ (⊕ is addition modulo 2)
@@ -88,7 +88,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
8888
}
8989

9090

91-
// Task 1.5. f(x) = Σᵢ 𝑟ᵢ 𝑥ᵢ modulo 2 for a given bit vector r (scalar product function)
91+
// Task 1.5. f(x) = Σᵢ rᵢ xᵢ modulo 2 for a given bit vector r (scalar product function)
9292
// Inputs:
9393
// 1) N qubits in arbitrary state |x⟩ (input register)
9494
// 2) a qubit in arbitrary state |y⟩ (output qubit)
@@ -106,7 +106,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
106106
}
107107

108108

109-
// Task 1.6. f(x) = Σᵢ (𝑟ᵢ 𝑥ᵢ + (1 - 𝑟ᵢ)(1 - 𝑥ᵢ)) modulo 2 for a given bit vector r
109+
// Task 1.6. f(x) = Σᵢ (rᵢ xᵢ + (1 - rᵢ)(1 - xᵢ)) modulo 2 for a given bit vector r
110110
// Inputs:
111111
// 1) N qubits in arbitrary state |x⟩ (input register)
112112
// 2) a qubit in arbitrary state |y⟩ (output qubit)
@@ -122,7 +122,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
122122
}
123123

124124

125-
// Task 1.7. f(x) = Σᵢ 𝑥ᵢ + (1 if prefix of x is equal to the given bit vector, and 0 otherwise) modulo 2
125+
// Task 1.7. f(x) = Σᵢ xᵢ + (1 if prefix of x is equal to the given bit vector, and 0 otherwise) modulo 2
126126
// Inputs:
127127
// 1) N qubits in arbitrary state |x⟩ (input register)
128128
// 2) a qubit in arbitrary state |y⟩ (output qubit)
@@ -192,7 +192,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
192192
// 2) a quantum operation which implements the oracle |x⟩|y⟩ -> |x⟩|y ⊕ f(x)⟩, where
193193
// x is N-qubit input register, y is 1-qubit answer register, and f is a Boolean function
194194
// You are guaranteed that the function f implemented by the oracle is a scalar product function
195-
// (can be represented as f(𝑥₀, …, 𝑥ₙ₋₁) = Σᵢ 𝑟ᵢ 𝑥ᵢ modulo 2 for some bit vector r = (𝑟₀, …, 𝑟ₙ₋₁)).
195+
// (can be represented as f(x₀, ..., xₙ₋₁) = Σᵢ rᵢ xᵢ modulo 2 for some bit vector r = (r₀, ..., rₙ₋₁)).
196196
// You have implemented the oracle implementing the scalar product function in task 1.5.
197197
// Output:
198198
// A bit vector r reconstructed from the function
@@ -296,7 +296,7 @@ namespace Quantum.Kata.DeutschJozsaAlgorithm {
296296
// 2) a quantum operation which implements the oracle |x⟩|y⟩ -> |x⟩|y ⊕ f(x)⟩, where
297297
// x is N-qubit input register, y is 1-qubit answer register, and f is a Boolean function
298298
// You are guaranteed that the function f implemented by the oracle can be represented as
299-
// f(𝑥₀, …, 𝑥ₙ₋₁) = Σᵢ (𝑟ᵢ 𝑥ᵢ + (1 - 𝑟ᵢ)(1 - 𝑥ᵢ)) modulo 2 for some bit vector r = (𝑟₀, …, 𝑟ₙ₋₁).
299+
// f(x₀, ..., xₙ₋₁) = Σᵢ (rᵢ xᵢ + (1 - rᵢ)(1 - rᵢ)) modulo 2 for some bit vector r = (r₀, ..., rₙ₋₁).
300300
// You have implemented the oracle implementing this function in task 1.6.
301301
// Output:
302302
// A bit vector r which generates the same oracle as the one you are given

QEC_BitFlipCode/Tasks.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace Quantum.Kata.QEC_BitFlipCode {
3434
// or in a superposition of basis states of the same parity.
3535
// Output: the parity of this state using exactly one call to Measure
3636
// encoded as a value of Result type: Zero for parity 0 and One for parity 1.
37-
// The parity of basis state |𝑥₀𝑥₁𝑥₂⟩ is defined as (𝑥₀ ⊕ 𝑥₁ ⊕ 𝑥₂).
37+
// The parity of basis state |x₀x₁x₂⟩ is defined as (x₀ ⊕ x₁ ⊕ x₂).
3838
// After applying the operation the state of the qubits should not change.
3939
// Example:
4040
// |000⟩, |101⟩ and |011⟩ all have parity 0, while |010⟩ and |111⟩ have parity 1.

SimonsAlgorithm/ReferenceImplementation.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Quantum.Kata.SimonsAlgorithm {
1818
// Part I. Oracles
1919
//////////////////////////////////////////////////////////////////
2020

21-
// Task 1.1. f(x) = 𝑥₀ ⊕ ... ⊕ xₙ₋₁ (parity of the number of bits set to 1)
21+
// Task 1.1. f(x) = x₀ ⊕ ... ⊕ xₙ₋₁ (parity of the number of bits set to 1)
2222
operation Oracle_CountBits_Reference (x : Qubit[], y : Qubit) : Unit {
2323

2424
body (...) {

SimonsAlgorithm/Tasks.qs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Quantum.Kata.SimonsAlgorithm {
2424
// Part I. Oracles
2525
//////////////////////////////////////////////////////////////////
2626

27-
// Task 1.1. f(x) = 𝑥₀ ⊕ ... ⊕ xₙ₋₁ (i.e., the parity of a given bit string)
27+
// Task 1.1. f(x) = x₀ ⊕ ... ⊕ xₙ₋₁ (i.e., the parity of a given bit string)
2828
// Inputs:
2929
// 1) N qubits in an arbitrary state |x⟩
3030
// 2) a qubit in an arbitrary state |y⟩

0 commit comments

Comments
 (0)