to help study quantum information systems, quantum many-body systems, and quantum spin systems. It provides various tools and utilities for symbolic and numerical calculations on these representative quantum systems.
The first thing to do is loading the Q3 package.
In[8]:=
Needs["QuantumMob`Q3mini`"]
Quantum Information Systems
◼
See also tutorial "Quantum Information Systems with Q3" for more details about the use of Q3 to study quantum information system.
◼
See also guide "Quantum Information Systems" for a list of Q3 functions related to quantum information systems.
Make sure you have loaded the package.
In[43]:=
Needs["QuantumMob`Q3mini`"]
Choose a symbol to use to refer to the set of qubits. For example, choose S, and declare it to be a qubit.
In[44]:=
Let[Qubit,S]
The following expression involves two qubits S[1,$] and S[2,$]. The final index denotes different Pauli operators acting on the qubit. For example, S[1,3] means the Pauli Z acting on S[1,$].
In[45]:=
op=S[1,1]**S[2,1]+S[1,3]
Out[45]=
X
S
1
X
S
2
+
Z
S
1
Multiply another operator to the above expression.
In[46]:=
S[2,3]**op
Out[46]=
X
S
1
Y
S
2
+
Z
S
1
Z
S
2
The computational basis state are specified by
Ket
[<|…|>]
. As in many other Q3 functions, one can skip the final
$
for each qubit; it is added automatically. Therefore, the following two expressions give the identical result.
In[47]:=
Ket[S[1,$]1,S[2,$]1]Ket[S[1]1,S[2]1]
Out[47]=
1
S
1
1
S
2
Out[48]=
1
S
1
1
S
2
Construct a quantum state by taking a linear superposition of the computational basis states.