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

Update to 0.15 syntax, batch 2 #591

Merged
merged 29 commits into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b26c14c
[ExploringGroversAlgorithm] Fix dead link
vivanwin Oct 25, 2020
d6be7cd
Updating linkings to link directly to workbook
vivanwin Oct 25, 2020
c7ca8b9
Merge remote-tracking branch 'upstream/main' into main
vivanwin Dec 8, 2020
1f797b5
Add %config and %trace where it makes sense
vivanwin Dec 9, 2020
bebf0b2
Merge remote-tracking branch 'upstream/main' into main
vivanwin Dec 11, 2020
b7d7b93
Use config files
vivanwin Dec 11, 2020
96b73cb
Remove little endian kets from output
tcNickolas Dec 12, 2020
d999f06
Merge remote-tracking branch 'upstream/main' into main
vivanwin Dec 17, 2020
9768ef7
Merge remote-tracking branch 'upstream/main' into main
vivanwin Dec 21, 2020
598b078
Merge remote-tracking branch 'upstream/main' into main
vivanwin Dec 29, 2020
357683a
Merge remote-tracking branch 'upstream/main' into main
vivanwin Jan 3, 2021
1a8a51b
Merge remote-tracking branch 'upstream/main' into main
vivanwin Jan 29, 2021
b2ec052
update to SDK 0.15 CHSHGame
vivanwin Jan 29, 2021
f15743b
Update to 0.15 syntax DeutschJozsaAlgorithm
vivanwin Jan 29, 2021
76b81b3
Update to 0.15 syntax DistinguishUnitaries
vivanwin Jan 29, 2021
b279c14
Update to 0.15 syntax GHZGame
vivanwin Jan 29, 2021
8974bdb
Update to 0.15 syntax GraphColoring
vivanwin Jan 29, 2021
4364f98
Update to 0.15 syntax GroverAlgorithm
vivanwin Jan 29, 2021
d97ef59
Update to 0.15 syntax JointMeasurements
vivanwin Jan 29, 2021
d0e3e73
Update to 0.15 syntax KeyDistribution_BB84
vivanwin Jan 29, 2021
e0b1cbb
Update to 0.15 syntax MagicSquareGame
vivanwin Jan 29, 2021
1705530
Update to 0.15 syntax PhaseEstimation
vivanwin Jan 29, 2021
515071b
Update to 0.15 syntax QEC_BitFlipCode
vivanwin Jan 29, 2021
9dd9b13
Update to 0.15 syntax QFT
vivanwin Jan 29, 2021
f250db4
Update to 0.15 syntax RippleCarryAdder
vivanwin Jan 29, 2021
5577143
Update to 0.15 syntax SimonsAlgorithm
vivanwin Jan 29, 2021
82e1963
Fix a couple indentations
tcNickolas Jan 30, 2021
a58b127
Merge branch 'main' into main
tcNickolas Jan 30, 2021
d1b1b9d
Return scoped "use" to PhaseEstimation task 2.2
tcNickolas Jan 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add %config and %trace where it makes sense
  • Loading branch information
vivanwin committed Dec 9, 2020
commit 1f797b57dc606dffdd9e746a7d1d86521b848420
16 changes: 16 additions & 0 deletions BasicGates/BasicGates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@
"In all tasks you need to implement the transformation exactly, without introducing any global phase. You can read more about the global phase of quantum states [here](../tutorials/Qubit/Qubit.ipynb#Relative-and-Global-Phase)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> Executing the below cell will change the way qubits are displayed in the tasks results, this is consistent with the notation which we use throughout the Katas."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%config dump.basisStateLabelingConvention=\"Bitstring\""
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
3 changes: 2 additions & 1 deletion tutorials/MultiQubitSystems/MultiQubitSystems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
"If you aren't familiar with the output of this function for single qubits, you should revisit the tutorial on [the concept of a qubit](../Qubit/Qubit.ipynb#Demo:-Examining-Qubit-States-in-Q#). \n",
"When printing the state of multi-qubit systems, this function outputs the same information for each multi-qubit basis state.\n",
"\n",
"> `DumpMachine` prints system states in little-endian format: for three qubits, $|0\\rangle$ is $|000\\rangle$, $|1\\rangle$ is $|100\\rangle$, $|2\\rangle$ is $|010\\rangle$, $|3\\rangle$ is $|110\\rangle$, and so on."
"> `%config dump.basisStateLabelingConvention=\"Bitstring\"` changes the `DumpMachine` format from little-endian to bitstring. For example this LittleEndian display $|3\\rangle$ this would be $|110\\rangle$ in bitstring format something we are more used to. "
]
},
{
Expand Down Expand Up @@ -345,6 +345,7 @@
},
"outputs": [],
"source": [
"%config dump.basisStateLabelingConvention=\"Bitstring\"\n",
"%simulate MultiQubitSystems_Demo"
]
},
Expand Down
11 changes: 9 additions & 2 deletions tutorials/SingleQubitGates/SingleQubitGates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"source": [
"### <span style=\"color:blue\">Demo: Pauli Gates</span>\n",
"\n",
"The following cell contains code demonstrating how to apply gates in Q#, using the Pauli $X$ gate as an example. It sets up a series of quantum states, and then shows the result of applying the $X$ gate to each one. To run the demo, run the next cell using `Ctrl+Enter` (`⌘+Enter` on a Mac), then run the cell after it to see the output.\n",
"The following cell contains code demonstrating how to apply gates in Q#, using the Pauli $X$ gate as an example. It sets up a series of quantum states, and then shows the result of applying the $X$ gate to each one. To run the demo, run the next cell using `Ctrl+Enter` (`⌘+Enter` on a Mac).\n",
"\n",
"In the previous tutorial we discussed that the qubit state in Q# cannot be directly assigned or accessed. The same logic is extended to the quantum gates: applying a gate to a qubit modifies the internal state of that qubit but doesn't return the resulting state of the qubit. This is why we never assign the output of these gates to any variables in this demo - they don't produce any output.\n",
"\n",
Expand Down Expand Up @@ -404,6 +404,13 @@
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Exectuting the cell below with the `%trace` command will execute the `PauliGates_Demo` function defined above, and will print all the gates nicely at the botom of the output have a look."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -412,7 +419,7 @@
},
"outputs": [],
"source": [
"%simulate PauliGates_Demo"
"%trace PauliGates_Demo"
]
},
{
Expand Down