<jupyter_start><jupyter_text>Quantum matrix almanacA collection of matrices, operations, examples, something else probably. Table of content1. [Setup](Setup)2. [Single qubit states](Single-qubit-states)3. [Single qubit gates](Single-qubit-matrices)4. [Double qubit gates](Double-qubit-matrices)  Setup  Installation<jupyter_code>#r "nuget:AngouriMath.Interactive, *-*"<jupyter_output><empty_output><jupyter_text>Preparation Open necessary modules<jupyter_code>open AngouriMath
open AngouriMath.FSharp.Core
open AngouriMath.FSharp.Functions
open AngouriMath.FSharp.Constants
open AngouriMath.FSharp.Shortcuts
open AngouriMath.Interactive.AggressiveOperators
open AngouriMath.FSharp.MatrixOperators<jupyter_output><empty_output><jupyter_text>Single qubit states<jupyter_code>let ``|0>`` = vector [1; 0]
``|0>``
let ``|1>`` = vector [0; 1]
``|1>``
let ``|+>`` = vector [1; 1] |/ (sqrt 2)
``|+>``
let ``|->`` = vector [1; -1] |/ (sqrt 2)
``|->``
let ``|00>`` = ``|0>`` *** ``|0>``
``|00>``
let ``|01>`` = ``|0>`` *** ``|1>``
``|01>``
let ``|10>`` = ``|1>`` *** ``|0>``
``|10>``
let ``|11>`` = ``|1>`` *** ``|1>``
``|11>``<jupyter_output><empty_output><jupyter_text>Matrices for quantum gates  Single qubit matrices<jupyter_code>let I = matrix [[1; 0]; [0; 1]]
I
let X = matrix [[0; 1]; [1; 0]]
X
let Y = matrix [["0"; "-i"]; ["i"; "0"]]
Y
let Z = matrix [[1; 0]; [0; -1]]
Z
let H = matrix [[1; 1]; [1; -1]] |/ (sqrt 2)
H<jupyter_output><empty_output><jupyter_text>Double qubit matrices<jupyter_code>let CX = matrix [
  [1; 0; 0; 0];
  [0; 0; 0; 1];
  [0; 0; 1; 0];
  [0; 1; 0; 0]; ]
CX
let CY = matrix [
  ["1"; "0"; "0"; "0"];
  ["0"; "0"; "0"; "-i"];
  ["0"; "0"; "1"; "0"];
  ["0"; "i"; "0"; "0"]; ]
CY
let CZ = matrix [
  [1; 0; 0; 0];
  [0; 1; 0; 0];
  [0; 0; 1; 0];
  [0; 0; 0; -1]; ]
CZ<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.25398570643210555, 'fraction_numerical': 0.058823529411764705, 'mean_word_length': 5.21160409556314, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '324194', 'license': 'MIT', 'n_tokens_mistral': 848, 'n_tokens_neox': 785, 'n_words': 197, 'path': 'notebooks/Matrices.ipynb', 'repo_name': 'WhiteBlackGoose/QuantumComputingMatrices', 'size': '1819'}