# -EN_52: Q-V construction and comparison plates

Author: Víctor Estrada Díaz  
Framework: UNIHOLOG - Machine V  
Date: 10 October 2026

**Project references:**
[Base document](./EN_52_Maquina_V_UNIHOLOG.pdf)
· [Translators and compilers for V](./EN_52_Traductores_y_compiladores_de_V.pdf)
· [Presentation to the community](./EN_52_Presentacion_comunidad.pdf)
· [Complete resource index](./EN_52_Indice_recursos.pdf).

### Dual License – Ethics and Use

- **Text (CC BY-NC-SA 4.0)**: sharing and adaptation; noncommercial use,
  attribution to Víctor Estrada Díaz and share alike.
- **Code (HL3)**: commercial use permitted only if it complies with ethical principles.
  Prohibited: wars, human rights violations, environmental harm,
  exploitation, mass surveillance and discrimination.

**Ethical principles declared by the author**: respect for human dignity,
no use for profit without permission and prohibition of harmful uses.

Statement: [estradad.es/licencia.php](https://estradad.es/licencia.php).
More information: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
· [HL3](https://firstdonoharm.dev/version/3/0/).
ORCID: [0000-0001-9942-1021](https://orcid.org/0000-0001-9942-1021).

This document brings together the project's sixteen plates. Its purpose is
to describe the constructions, prepare their connections and study what happens
when they are executed. The comparison of Q and V must consider the problem,
preparation, operations, results and execution times;
it does not require two individual executions to produce the same sample.

In the interpretation proposed by the author, quantum uncertainty
originates in an internal property of spacetime: to establish
what we know and what we do not know, we must place ourselves at a point on the
timeline, $t=t_0$. Measurement establishes that reference point and
makes known the result that remained unknown before it.
The author's UNIHOLOG framework explains this relationship through the function
$f(t)$, understood as an internal function of spacetime: from the
reference $t=t_0$ it distinguishes what is defined for $t<t_0$ from what is still undefined
for $t>t_0$. Here, “undefined” refers to the knowledge available,
not to the physical nonexistence of the past or the future. In this interpretation,
time does not disappear through living it: placing oneself at $t=t_0$ fixes the reference
for knowledge and measurement; it does not eliminate the other points on the timeline.
This is the temporal idea that guides the construction of V and its comparison
with Q; it does not identify lack of knowledge with the nonexistence of a physical state.

In V, `@` indicates an individual result that is unknown and unread before
measurement. The connections and relationships between units can be known
without reading their results. A specified preparation, for example an
auxiliary initialized to zero, must not be confused with an intermediate readout.

The final joint readout takes place at $t=t_0$. Each recorded binary
result belongs to $\{0,1\}$. `@` is not a third physical value.
The description of a rule and the executable connection of that rule are
distinct stages of construction, which this document identifies.

The images are included from the relative directory `./img/`, equivalent
to `.\img`. The formulas use only single-dollar delimiters
for inline mathematics and double-dollar delimiters for block mathematics. This annex does not replace
the main document [EN_52_Maquina_V_UNIHOLOG.pdf](./EN_52_Maquina_V_UNIHOLOG.pdf).

<style>
img { display: block; max-width: 100%; height: auto; margin: 1em auto; }
math[display="block"] { display: block; margin: 0.8em 0; }
@media print {
  @page { margin: 12mm; }
  body { margin: 0; padding: 0; max-width: none; font-size: 11pt; line-height: 1.35; }
  h1 { font-size: 20pt; }
  h2 { break-before: page; font-size: 16pt; }
  h2, h3 { break-after: avoid; }
  p { margin: 0.5em 0; }
  ol, ul { margin: 0.5em 0; }
  img { break-inside: avoid; max-height: 105mm; object-fit: contain; }
  math { font-size: 1em; }
}
</style>

## 1. Temporal parallelism of measurement

![Plate 1: Q and V, unknown result before measurement and binary readout at t=t0](./img/Q-V-medida-temporal.png)

The top row represents Q; the bottom row, the proposed construction of V.
In V, internal values are not queried during execution. The symbol
$@$ represents the result that is still unknown, not the absence of a physical state.
Measurement at $t=t_0$ records a binary output:

$$
M_Q(t_0)\in\{0,1\},\qquad M_V(t_0)\in\{0,1\}.
$$

The drawing expresses the temporal parallelism of preparation, operations without
intermediate measurements and final readout. It does not represent an answer computed
beforehand and hidden. Agreement between the results and distributions of
both realizations must be checked by protocol; it does not follow solely
from the lack of knowledge before measurement.

## 2. Q1-V1 overview

![Plate 2: overview of preparation, operations and measurement in Q1 and V1](./img/Q1-V1.png)

The plate places Q above and V below. It aligns preparation, operations and
final measurement to distinguish the architecture from the task performed. Gates
can establish relationships without revealing individual results.
It is a conceptual overview: the details of the Deutsch protocol are developed
in the main document; they are not specified by all the generic
gates in the drawing.

That protocol uses the reversible oracle

$$
(x,y)\longmapsto(x,y\oplus f(x)).
$$

The register is prepared with $x=0$ and $y=1$; H is applied to both units,
then the oracle and finally H to the first. In Q, the ideal readout of
the first unit distinguishes constant functions from balanced ones.
The construction of V1 must link these operations to its final readout.

## 3. Q2-V2 overview

![Plate 3: period finding with modular blocks and inverse Fourier transform](./img/Q2-V2.png)

Q2 and V2 are organized to study the period of the modular function with
the same known parameters $N$ and $a$, where $\gcd(a,N)=1$.
The control register receives H, controls the modular multiplications
and passes through the inverse Fourier transform before measurement. The work register is prepared in
one and the control in zero.

$$
m=\lceil\log_2 N\rceil,\qquad q=2m.
$$

The binary readout $c$ allows $c/2^q$ to be formed and a period to be proposed using
continued fractions. The candidate is verified modularly before obtaining
possible factors. A single readout does not guarantee that factors will be obtained.

## 4. Q3-V3 overview

![Plate 4: layered circuit of H, rotations and CZ connections](./img/Q3-V3.png)

The plate represents the project's local family of layered circuits.
The preparation, angles and connections are fixed before execution.
The layers combine H, rotations and CZ, alternating the connected pairs.
The illustrated circuit is not identified with an original Willow instance.

The final readout of a register of $n$ units delivers a binary word

$$
\mathbf b=(b_0,\ldots,b_{n-1}),\qquad b_j\in\{0,1\}.
$$

The responses of the same prepared circuit are compared, without requiring
equality between two words obtained in different executions.

## 5. X and NOT inverter

![Plate 5: quantum X inverter and conventional inverter of V](./img/not.png)

With an input whose result is unknown, inversion is defined
without reading that result. X exchanges the two basis vectors; NOT
complements the binary value. A known basis input may allow
the output to be predicted: lack of knowledge is the condition of the illustrated case,
not a universal property of every preparation.

$$
X|0\rangle=|1\rangle,\qquad X|1\rangle=|0\rangle,
\qquad b'=1-b.
$$

The construction of V keeps individual readout blocked until $t=t_0$.

## 6. Toffoli: three inputs and three outputs

![Plate 6: Q Toffoli and binary transformation of V with AND plus XOR](./img/toffoli-and-xor.png)

Toffoli preserves both controls and complements the third value only
when both controls equal one. It is not an AND that eliminates its inputs.
The comparison preserves the three inputs and three outputs:

$$
(a,b,c)\longmapsto(a,b,c'),\qquad c'=c\oplus(a\land b).
$$

In V, AND forms an intermediate signal and XOR combines it with $c$, without reading
that signal during the operation. The table in the plate expresses the
binary rule, not observations of an execution in progress.

## 7. Toffoli construction

![Plate 7: decomposition of Q Toffoli and AND-XOR construction in V](./img/toffoli-and-xor-construccion.png)

In Q, the plate develops an exact decomposition of CCX with six CNOT,
two H and seven T phase gates or their inverse. The phase labels are

$$
T=\operatorname{diag}(1,e^{i\pi/4}),\qquad
T^\dagger=\operatorname{diag}(1,e^{-i\pi/4}).
$$

In V, the steps of the binary construction are to preserve $a,b$, form
$d=a\land b$ and produce $c'=c\oplus d$. Signal branches must not
directly connect the input lines to each other. The readout
scheme preserves all three outputs until joint measurement.

## 8. Reversible OR construction

![Plate 8: reversible OR with CNOT and Toffoli in Q, and OR-XOR in V](./img/toffoli-or-xor-construccion.png)

To compare the same inputs and outputs, OR is inserted into a
reversible transformation of three units:

$$
(a,b,c)\longmapsto(a,b,c\oplus(a\lor b)).
$$

In Q, CNOT from $a$ to $c$, CNOT from $b$ to $c$
and Toffoli with controls $a,b$ and target $c$ are applied in that order. The construction relies on

$$
a\lor b=a\oplus b\oplus(a\land b).
$$

In V, OR produces $d=a\lor b$ and XOR combines $c$ with $d$, preserving $a,b$.
Repeated net labels indicate the same signals, not additional
generators or intermediate readouts.

## 9. CNOT and controlled XOR

![Plate 9: Q CNOT and construction with XOR in V](./img/cnot-xor-construccion.png)

CNOT preserves the control and updates the target. The conventional circuit
of V uses XOR with the same two inputs and preserves the control output:

$$
(a,b)\longmapsto(a,b'),\qquad b'=b\oplus a.
$$

The target result does not need to be read to connect the operation.
Agreement of the binary table describes this function; the phase evolution
of a general register is another part of the comparison of the machines.

## 10. Hadamard H

![Plate 10: construction of H and signal coupling rules of the MD](./img/h-construccion.png)

H combines the two basis vectors with normalized sum and difference:

$$
H|0\rangle=\frac{|0\rangle+|1\rangle}{\sqrt2},\qquad
H|1\rangle=\frac{|0\rangle-|1\rangle}{\sqrt2}.
$$

The construction using rotations applies Z first and then the Y rotation:

$$
H=R_y(\pi/2)Z.
$$

For V, the document's laws for two signal paths are represented:

$$
s'_0=\frac{s_0+s_1}{\sqrt2},\qquad
s'_1=\frac{s_0-s_1}{\sqrt2}.
$$

These paths belong to a single unit, not to two measured bits.
In the coupling block of the MD, the parameters
$\Omega=\chi=0$, $\Delta=\kappa=g/\sqrt2$ and $g\tau=\pi/2$ produce
$-iH$. That global phase does not alter the readout of the isolated unit, but
must be preserved when constructing a controlled operation. The compact
connection of the signal law to the readout of V remains a construction
task; it is not replaced by a random draw.

## 11. Phase: T, inverse T, S, Z and general phase

In this protocol, the phase operation requires neither Q's nor V's internal
phase to be measured or known beforehand. V is not assigned a readout that
Q is not required to perform. It runs without intermediate readout; capture occurs
at $t=t_0$. An angle supplied as an instruction is not a readout of the
unknown state.

![Plate 11: quantum phase and phase shift of two paths in V](./img/fase-construccion.png)

The phase gate acts without changing the moduli of the coefficients:

$$
P(\varphi)=\operatorname{diag}(1,e^{i\varphi}),\qquad
P(\varphi)=e^{i\varphi/2}R_z(\varphi).
$$

The choices $\varphi=\pi/4$, $-\pi/4$, $\pi/2$ and $\pi$ correspond
respectively to T, its inverse, S and Z. A relative phase can change
subsequent readouts when the paths are combined.

In the signal description of V:

$$
s'_0=s_0,\qquad s'_1=e^{i\varphi}s_1.
$$

The phase shift is set as an operation and does not constitute a readout of the
individual value. A global phase of an isolated unit must not be discarded
automatically when that operation becomes controlled.

## 12. Rx and Rz rotations

![Plate 12: Q rotations and corresponding signal equations in V](./img/rx-rz-construccion.png)

The rotations and their composition satisfy

$$
R_x(\theta)=e^{-i\theta X/2},\qquad
R_z(\varphi)=e^{-i\varphi Z/2},\qquad
R_x(\theta)=H R_z(\theta)H.
$$

With $u=\cos(\theta/2)$ and $v=\sin(\theta/2)$, the Rx laws for
the two paths of V are

$$
s'_0=u s_0-i v s_1,\qquad s'_1=-i v s_0+u s_1.
$$

For Rz, the phases of the paths have opposite signs:

$$
s'_0=e^{-i\varphi/2}s_0,\qquad s'_1=e^{i\varphi/2}s_1.
$$

The angles are known before execution. The paths in each example
feed a single unit readout, not separate binary measurements.

## 13. CZ and controlled phase

![Plate 13: CZ, controlled phase and joint ZZ interaction](./img/cz-fase-controlada-construccion.png)

Controlled phase is defined on the basis vectors by

$$
\operatorname{CP}(\varphi)|a,b\rangle
=e^{i\varphi ab}|a,b\rangle,\qquad
\operatorname{CZ}=\operatorname{CP}(\pi).
$$

CZ changes the sign of the basis component with both labels equal
to one. In Q, it can be constructed with H on the target, CNOT and H on
the target again. The interaction of the MD uses

$$
G_{AB}=J Z\otimes Z,\qquad
U_{ZZ}(\theta)=e^{-i\theta Z\otimes Z},\qquad \theta=J\tau.
$$

The ZZ interaction alone must not be confused with CZ. The construction includes
the local phase corrections and the global factor:

$$
\operatorname{CZ}=e^{-i\pi/4}
\left[R_z(-\pi/2)\otimes R_z(-\pi/2)\right]
e^{-i\pi Z\otimes Z/4}.
$$

In V, a joint coupling is described, not an AND on bits already read.
The two units deliver two bits in a single joint measurement. The joint
law must be linked to the realization of the circuit before measurement.

## 14. SWAP

![Plate 14: Q SWAP and port exchange of V](./img/swap-construccion.png)

SWAP exchanges the two complete units:

$$
(a,b)\longmapsto(b,a).
$$

In Q, it is constructed with three CNOT, directed in order from $a$ to $b$,
from $b$ to $a$ and from $a$ to $b$. In V, a port exchange
can be connected or the sequence of reversible updates can be performed

$$
b\leftarrow b\oplus a,\qquad
a\leftarrow a\oplus b,\qquad
b\leftarrow b\oplus a.
$$

The assignments are applied from left to right and use the updated
result of the previous step. They are not instructions to measure and then decide
which wire to exchange.

## 15. Controlled modular multiplication

![Plate 15: block construction of controlled modular multiplication](./img/multiplicacion-modular-controlada-construccion.png)

The gate is configured with known constants; the period and factors
are not supplied as answers:

$$
M_j=a^{2^j}\bmod N,\qquad
M_0=a,\qquad M_{j+1}=M_j^2\bmod N.
$$

For a control $c$ and a work register $y$, the control is preserved
and the action is defined over the entire domain of the register:

$$
y'=\begin{cases}
M_j y\bmod N,&c=1\ \text{y}\ y<N,\\
y,&c=0\ \text{o}\ y\ge N.
\end{cases}
$$

Coprimality allows a permutation within the modular interval.
The Q diagram identifies reversible arithmetic, controlled modular additions
and restoration of auxiliaries; it is not an exhaustive list of all its
elementary gates. V has the binary modular relation, whose coherent connection
with H, the phases and the readout of the complete circuit must be constructed.

## 16. Inverse Fourier transform

![Plate 16: order of H, controlled phases and SWAP in the inverse Fourier transform](./img/fourier-inversa-construccion.png)

For $q$ units and $D=2^q$, the mathematical transformation is

$$
F^{-1}|x\rangle=\frac{1}{\sqrt D}
\sum_{y=0}^{D-1}e^{-2\pi ixy/D}|y\rangle.
$$

The sum defines the transformation; it does not require V to store a table of
states or amplitudes. The plate shows the example of three units,
with unit zero as the least significant bit. The order is:

1. SWAP between units zero and two.
2. H on unit zero.
3. Controlled phase of angle $-\pi/2$ between units one and zero.
4. H on unit one.
5. Controlled phase of angle $-\pi/4$ between units two and zero.
6. Controlled phase of angle $-\pi/2$ between units two and one.
7. H on unit two.

A controlled phase uses P, not Rz without its phase correction.
In V, this sequence of connections is preserved: H mixes paths,
CP contributes joint phase and SWAP reorders ports. Their joint execution
must be connected to the final readout; Fourier is not applied to bits already measured.
