owned this note
owned this note
Published
Linked with GitHub
---
tags: Quantum Computing
---
# 量子骰延伸與修正
* In the document, $|k|$ is often used as a symbol which denotes the length of object $k$.
* Note that $\mathcal{P}$ means **prime field**.
### Construct a char ring $\Lambda(c)$
:::info
All the numbers in this section is under the base of 10.
:::
* Definition
> $$F_{\Lambda}=(G\in\mathbb{Z}^+,\ +,\ -,\ \times,\ \div)$$
* Operate $(\Lambda \Leftrightarrow \Lambda)$
> $$a^c+b^c=\left(a\cdot 10^{\left \lfloor \log_{10}b \right \rfloor+1}+b\right)^c,\ b\neq 1$$
> $$a^c-b^c=\begin{cases}\left(\left \lfloor \frac{a}{10^{\left \lfloor\log_{10}b\right \rfloor +1}} \right \rfloor \right)^c & \text{ if } a_{|a|}^{c}=b_{|b|}^{c}\\ a^c & \text{ if } a_{|a|}^{c}\neq b_{|b|}^{c}\end{cases}$$
> $$a^c\times b^c=(a\cdot b)^c$$
> $$a^c\div b^c=\begin{cases}\left(\frac{a}{b}\right)^c & \text{ if } b\mid a\\ a^c & \text{ if } b\nmid a\end{cases}$$
* Operate $(\mathbb{R}\leftrightarrow\Lambda)$
> $$a^c\cdot b=\sum^{b}a^c$$
> If $$a^c=\sum^{m}k^c,\ |k|=1,$$
> $$a^c\div b=\sum^{\frac{m}{b}}k^c,\ b\mid m$$
---
### Simple proof of the ideal char addition
> **spf.**
> $$(a-1)\cdot 2^{\overset{\gamma}{\overbrace{\left \lfloor \log_2(b-1) \right \rfloor+1}}}+(b-1)=ab-1$$
> $$\Rightarrow a2^\gamma -2^\gamma+b-ab=0$$
> $$\Rightarrow (a-1)\left(2^\gamma-b\right)=0$$
> $$\Rightarrow a-1=0 \cup \left(2^\gamma-b\right)=0$$
> $\because a\in \mathcal{P},$
> $\therefore a\neq 1 \rightarrow$ 不合
> $$\rightarrow 2^\gamma-b=0$$
> $$2^{\left \lfloor \log_2(b-1) \right \rfloor+1}-b=0$$
> $$\Rightarrow b=2^{k},\ k\in\mathbb{Z}^+$$
> $$\because b\in \mathcal{P},$$
> $$\therefore\ if\ b=2^{k},\ b=2$$
> Now let $b=2$ to check if it fits the equation
> $$2^{\left \lfloor \log_2(1) \right \rfloor+1}-2=2^1-2=2-2=0$$
> $\therefore\ b=2$ is a solution to the equation.$\ _\mathbb{Q.E.D.}$
---
### 基於多個有序集合之元素乘積的質數複合進位制轉譯
* 斷句:基於/多個有序集合/之/元素乘積/的/質數複合進位制/轉譯
* 下列所述之概念對於非質數的複合進位制也有用
* `2021/3/27` 更新:正式名稱為 `Mixed radix number`
註:**面數轉譯**錯誤點於`2021/2/28`,`第一屆SQCS量子工作坊`之`量子骰小組成員`透過問題間接讓講師意識到問題所在,因此講師於隔天提出`基於多個有序集合之元素乘積的質數複合進位制轉譯`主題進行修正。於此表示感謝。
> Def.
> $$P_N=\left\{ p_k\mid 1\leq k\leq \Omega(N),\ p_k\in\mathcal{P},\ p_k \geq p_{k+1}\right\}$$
> $$R_k=\left\{ n\mid 0\leq n\leq p_{k}-1,\ n_{i+1}>n_{i},\ \forall i\in \left[1, p_k-2\right] \right\}$$
> Def. $S$ as the result string we get from throwing N-face quantum dice.
> $$S=\sum_{n=1}^{\Omega(N)}\left(s_n\right)^c,\ |\left(s_n\right)^c|=|(R_{1})_2^c|$$
> Denote $\sigma_n$ as the base-10 of $s_n$, notice that $\sigma_n\in R_n$
> Notice that $\left(\sum_{m=1}^{\Omega(N)}(\sigma_m)^c\right)^{-c}$ is a compound-base **number**, so we need to use the following formula to translate it into a 10-base number, which is our final result.
> $$S_{10}=\left(\sum_{m=1}^{\Omega(N)}\left(\sigma_m\cdot \prod_{n<m}|R_n|\right)\right)+1$$
> The $+1$ performs the following work
> $$S_{10}\in[0, N-1] \mapsto S_{10}\in [1, N]$$
> $S_{10}$ is the final result of the number that we get from throwing N-face quantum dice.
> **proof.**
> !There are no formal mathematical notation included!
> $$\vec{\mathfrak{S}}\overset{p^{-1}}{\leftarrow}N,$$
> $$\left(\vec{\mathfrak{S}}_k\mapsto N_{10}\mid \forall N\in\mathbb{Z^+}\right)=\vec{\mathfrak{S}}_k\cdot \left |\vec{\mathfrak{S}}_{k+1,\ \Omega(N)}^c\right |$$
> $$\Rightarrow \sum_{k=1}^{\Omega(N)}\left(\vec{\mathfrak{S}}_k\mapsto N_{10}\mid \forall N\in\mathbb{Z^+}\right)=\sum_{k=1}^{\Omega(N)}\vec{\mathfrak{S}}_k\cdot \left |\vec{\mathfrak{S}}_{k+1,\ \Omega(N)}^c\right |$$
> $$,\ for\ \vec{\mathfrak{S}}_{\Omega(N)},\ \left(\vec{\mathfrak{S}}_{\Omega(N)}\mapsto N_{10}\right)=\vec{\mathfrak{S}}_{\Omega(N)}+1$$
> $$\Rightarrow S_{10}=\left(\sum_{m=1}^{\Omega(N)}\left(\sigma_m\cdot \prod_{n<m}|R_n|\right)\right)+1\ _\mathbb{Q.E.D.}$$
Example:
Let $N=15$, which is $5\cdot 3$
So $P_{15}=\left\{5, 3\right\},\ |R_1|=5, |R_2|=3$
Suppose that we get the string $10001$ by throwing the prime-factorize optimization of 15-face quantum dice.
Notice that $10001$ is not a base-2 number.
According to the prime-factorization of 15, it is a base-$(5^c+3^c)$ number.
So we still need to do some translation to get the correct result.
$(10001)^c=(100)^c+(01)^c$
So $s_1=100,\ s_2=01$
$\Rightarrow \sigma_1=4, \sigma_2=1$
Using the formula, we can get the following result
$S_{10}=\left(4\cdot 3+1\right)+1=14$
So $14$ is the final number that we get from the 15-face quantum dice.