​
In this project, we were exploring truncated Fock space as a way to model second quantization using Wolfram Quantum Framework. We went through studying states in this basis , in particular coherent and CAT states, visualized their properties, with the purpose of providing a good insight into their meaning. That can lead to discovery of larger area of quantum computation based on CAT qubits, which look as promising natural error correcting frameworks towards universal quantum computation.
In[]:=
PacletInstall["Wolfram/QuantumFramework"]
Out[]=
PacletObject
Name: Wolfram/QuantumFramework
Version: 1.4.2

In[]:=
Needs["Wolfram`QuantumFramework`"];

Second quantization and coherent states

Quantum mechanics utilizes Hilbert spaces to describe physical systems, ensuring that all possible states of these systems are included within this space. Each vector in the Hilbert space represents a specific state, which is a key distinction from classical mechanics, where the phase space represents states as points containing all necessary information about the system. In quantum mechanics, we work with vectors in both finite-dimensional and infinite-dimensional Hilbert spaces, depending on the system under study. Vectors can be superposed, but the resulting state remains within the Hilbert space. This mathematical structure is governed by an algebra of operators that define how physical observables and symmetries act on the states. As Emmy Noether’s theorem suggests, “Every kind of symmetry corresponds to a conservation law,” implying that precise algebra and inherent uncertainty are crucial in understanding quantum phenomena. On a larger scale, classical mechanics operates in a multidimensional phase space where each point’s density corresponds to the number of objects. Liouville’s theorem states that the density of states in this space is preserved over time. This contrasts with quantum field theory, where particles can be created or annihilated, described mathematically by creation and annihilation operators. In quantum field theory, creation and annihilation operators are fundamental. An annihilation operator (denoted 𝑎) reduces the number of particles in a state by one, while a creation operator (denoted
†
𝑎
)
increases it by one. These operators are fundamental in second quantization, a concept introduced by Paul Dirac[2]. For simulations involving quantum harmonic oscillators, we focus on coherent states, which closely resemble classical states. For Fock states, the mean value of the field operator is zero. However, coherent states are constructed to have a non-zero mean value of the field operator, minimizing uncertainty. Researchers derived the coherent state by finding the eigenstate of the annihilation operator. These states exhibit sinusoidal oscillations in their field operator mean values, akin to a classical electric field. CAT states can be derived as superpositions of these important coherent states.

Initialization Definitions

Random complex number with certain absolute value:
In[]:=
GenerateRandomComplexWithNorm[desiredNorm_]:=Module[{theta},theta=RandomReal[{0,2Pi}];desiredNorm*(Cos[theta]+ISin[theta])]
Coherent state of size d with amplitude α:
In[]:=
coherentStateNN[α_,d_]:=QuantumState[Table[1*α^n/Sqrt[Factorial[n]],{n,0,d-1}],d]
Creation and annihilation operator of size n:
In[]:=
creationAnnihilation[n_]:=Module[{ca,aa},​​aa=QuantumOperator[Table[If[i==j+1,Sqrt[i-1],0],{i,1,n},{j,1,n}],n];​​ca=aa["Dagger"];​​{ca,aa}]
Particular nth Fock state in a basis of size d:
In[]:=
fockN[n_,d_]:=QuantumState[SparseArray[{n+1->1},d],d]

Introduction

In terms of the second quantization formalism, every field is represented by an operator. The creation and annihilation of photons can be realized with the ladder operators that act on Fock states

a
n
n
n-1
and
†

a
n
n+1
n+1
. One of the most interesting states that can be represented in the Fock basis is the coherent state:​
|α〉
-
|α
2
|
2
e
∞
∑
n0
n
α
n!
|n〉
-
|α
2
|
2
e
α
†

a
e
-
*
α

a
e
|0〉
α
†

a
-
*
α

a
e
|0〉D(α)|0〉 
​We see the coherent state is defined as a superposition of all Fock states with α being a complex number, the definition using D(α) will be discussed later. This operator plays an important role in quantum optics for translating the state in phase space. Key part as was already mentioned are creation and annihilation operators. These operators obey some properties, like commutation relations, which are important for photons, as they are bosons, particles with spin 1. These commutation relations reflecting indistinguishability. It ensures, that wavefunctions of bosonic particles are symmetric with respect to the exchange of any two particles. Main goal is to explore truncated Fock space. (Fock space that is not infinite-dimensional but finite). This space is natural setting for such formalism, because creation and annihilation operators are defined to act on states within this space. Let’s choose some concrete arbitrary dimensionality n to represent truncated Fock space. Of course some properties wont be exact due to using a finite basis instead of infinite.
Define a particular size of the Fock space and test definitions:
In[]:=
n=20;
In[]:=
{qaa,qca}=creationAnnihilation[n]
Out[]=
QuantumOperator
Pure map
​
Dimension: 20→20
Order: {1}→{1}
,QuantumOperator
Pure map
​
Dimension: 20→20
Order: {1}→{1}

Application of annihilation and creation operator on Fock states:
In[]:=
fockN[15,20]
Out[]=
|15〉
In[]:=
Through[{qaa,qca}[%]]
Out[]=
{
15
14〉
,
416〉
}
In[]:=
α=RandomComplex[]
Out[]=
0.242988+0.842564
Not normalized coherent state:
In[]:=
nnca=coherentStateNN[α,20]
Out[]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 20

Normalized coherent state:
In[]:=
nca=nnca["Normalize"]
Out[]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 20

It should hold that
a
|α〉
=
α
|α〉
:
In[]:=
z=qaa[nca]
Out[]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 20

In[]:=
y=α*nca
Out[]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 20

In[]:=
(z["Amplitudes"]//Values)-(y["Amplitudes"]//Values)//Most//Chop
Out[]=
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
In[]:=
nca["Norm"]
Out[]=
1.

Hamiltonian

One of the most important operators in quantum mechanics is Hamiltonian, which describes total amount of energy of the system. In some situations it is possible to divide it into kinetic and potential energy terms like H = T + V. In this particular context are used field excitations, described by quantum harmonic oscillator Hamiltonian.
Number operator is
†
a
a
:
In[]:=
no=qca[qaa]
Out[]=
|1〉〈1|+2|2〉〈2|+3|3〉〈3|+4|4〉〈4|+5|5〉〈5|+6|6〉〈6|+7|7〉〈7|+8|8〉〈8|+9|9〉〈9|+10|10〉〈10|+11|11〉〈11|+12|12〉〈12|
+13|13〉〈13|+14|14〉〈14|+15|15〉〈15|+16|16〉〈16|+17|17〉〈17|+18|18〉〈18|+19|19〉〈19|
QHO Hamiltonian is h ω (
†
a
a
+ 1/2):
In[]:=
Hamiltonian=hω(no+1/2QuantumOperator["I"[n]])
Out[]=
h ω
2
|0〉〈0|+
3 h ω
2
|1〉〈1|+
5 h ω
2
|2〉〈2|+
7 h ω
2
|3〉〈3|+
9 h ω
2
|4〉〈4|+
11 h ω
2
|5〉〈5|+
13 h ω
2
|6〉〈6|+
15 h ω
2
|7〉〈7|+
17 h ω
2
|8〉〈8|
+
19 h ω
2
|9〉〈9|+
21 h ω
2
|10〉〈10|+
23 h ω
2
|11〉〈11|+
25 h ω
2
|12〉〈12|+
27 h ω
2
|13〉〈13|+
29 h ω
2
|14〉〈14|+
31 h ω
2
|15〉〈15|
+
33 h ω
2
|16〉〈16|+
35 h ω
2
|17〉〈17|+
37 h ω
2
|18〉〈18|+
39 h ω
2
|19〉〈19|
After that we are capable of applying that operator on appropriate state with same dimensionality:
In[]:=
Hamiltonian[fockN[15,n]]
Out[]=
31 h ω
2
|15〉

Photon-distribution plots

After we have prepared appropriate definitions of coherent states and pseudorandom generator of complex alphas that generates pseudo-randomly in order to represent the non-biased experimental statistics, we can define come concrete states and plot them:
Get coherent states for different values of |α| :
As we can see, the probability distribution perfectly matches Poisson behaviour which is fitted on that Quantum Probability Distribution. This behaviour comes from the nature of derivation of these expressions. Deeper reasons are out of the main scope of this work, we take them as granted based on calculations.

Displacement operator, Hamiltonian Evolution, Position Operator

Displacement operator definition

We get the displacement operator with two different approaches that have different computation time:
Clearly are the same operator:

Verification of the coherent state

As we already know coherent state has to satisfy the eigenvalue equation for annihilation operator. We also know that construction of the coherent state from the displacement operator acting on the vacuum state is possible, so let’s try the calculations and see how it can be proven to work. At first we apply displacement operator on vacuum state:
Verify the claim subtracting the amplitudes:

Quantum Evolution of the state and mean position operator

States aren’t rigid objects so we have to capture also the evolution of them , and that is generally achieved by applying evolving the states with a Hamiltonian.
For example for time 1 in general units, which we are going to further consider as seconds, we obtain quantum evolution operator:
Then we apply it on the normalized coherent state with time interval starting from zero to ten by timestep 0.25 in order to achieve nicer and proper visualization of that phenomena:
Now we can see the oscillating behaviour of mean value of position operator, which is sinusoidal and is pretty close to the classical behaviour of plain wave in electromagnetism as we have stated in the introduction, or analogous of to the position of a classical harmonic oscillator.

Symbolic evolution for coherent state

We would also like to verify the known result that an evolved coherent state using the previously described Hamiltonian remains coherent, but with a time varying complex amplitude
Create a symbolic coherent state (without normalization because the expression can get cumbersome):
Evolve the coherent state:
Use our definition of not normalized coherent state with the amplitude multiplied by complex exponential:
Then we can see that if we apply some exponential term to that amplitudes and compare it with the state without it, we observe that states are actually same up to the global phase, because wolfram quantum framework recognizes such classes of states as same.

CAT states

This particular state contain only even amplitudes, as could be visible in next plot, that is caused by definition of such even CAT state, as is stated above.
This framework could be generalized for further use for any particular coherent state and CAT state needed.

Concluding Remarks

As a summary, we were working on exploration of truncated Fock space in terms of it’s states, basis and dimensionality. That included second quantization approach in terms of definition creation and annihilation operators for our randomly explicitly specified 20-dimensional Fock state, but we have prepared general framework for any dimensionality of truncated Fock space wanted.
From that state we have constructed coherent state and verified it is the eigenstate of annihilation operator. For that coherent state we have got Poisson distribution that naturally arises from the derivation of such formulas. In terms of 20-dimensional state we have tried three different pseudorandom complex numbers, and for each verified that it respects the Poisson behaviour. We have also defined Hamiltonian in terms of formalism of creation and annihilation operators, which we have used for evolution of the state, either symbolically, or with concrete values. Plot of the mean value of position operator is function of time and oscillating sinusoidally with respect to the time. So it is corresponding to the theory of coherent states that their behaviour shows plain wave properties. Additionally we have defined displacement operator and verified it creates coherent state from vacuum state. After that we were easily be capable have prepared basic platform for preparation of CAT states, that are building units of CAT qubits.
​
Future approach could be then: Implement these CAT qubits in Wolfram Quantum framework and use it’s functionalities for measurements the photon number and amount of bit-flips and phase-flips occurred. Because these qubit in terms of hardware are specially encoded into superconducting resonator system that is using 2-photon dissipation mechanism to get rid of the entropy which is gained by some random bit flip, that means we obtain natural error correction and by “leaking” the heat information we stabilize desired computational information without the additional manipulation. Analogy of that is simple classical light switch with energy barrier between states created by spring, which should be deformed. [3] If it randomly switches, entropy of the system raised and we have to reduce it, so we need to leak that entropy into some well in order to come back to the wanted state. These qubits are being intensively studied among large variety of scientists because of their natural error correction - exponential suppression of bit-flips but linear increase of phase flips, which raises with square of the photon number.

Acknowledgments

I would like to thank especially my mentor Bruno Tenorio, for his great advice to problem solving, in terms of theory and coding. Next I would like to thank my main Mentor Mads Bahrami for patient and firm leadership that led to the great workflow. Additionally I would like to thank also to Xerxes Arsiwalla and Hatem Elshatlawy for their theoretical advice.

References

1
.
Feynman, Richard P. (1998) [1972]. Statistical Mechanics: A Set of Lectures (2nd ed.). Reading, Massachusetts: Addison-Wesley. ISBN 978-0-201-36076-9.
2
.
Dirac, P. A. M. (1927). “The quantum theory of the emission and absorption of radiation”, Proc Roy Soc London Ser A, 114 (767), 243-265
3
.
Lescanne, R et al. (2019) “Exponential suppression of bit-flips in a qubit encoded in an oscillator.” Nature Physics 16: 509-513.

Cite This Notebook

“Truncated Fock space as a way to model 2nd quantization in Wolfram Language”
by Juraj Tkáč​
​https://community.wolfram.com/groups/-/m/t/3209729