Skip to content

Commit e9d3d06

Browse files
author
Xinghan Yang
committed
Update 6-4-quoperator.ipynb
1 parent ee9db3b commit e9d3d06

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/source/whitepaper/6-4-quoperator.ipynb

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"id": "e3c0a239",
2222
"metadata": {},
2323
"source": [
24-
"`tensorcircuit.quantum.QuOperator`, `tensorcircuit.quantum.QuVector` and `tensorcircuit.quantum.QuAdjointVector` are classes adopted from TensorNetwork package.\n",
25-
"They behave like a matrix/vector (column or row) when interacting with other ingredients while the inner structure is maintained by the tensornetwork for efficiency and compactness.\n",
24+
"`tensorcircuit.quantum.QuOperator`, `tensorcircuit.quantum.QuVector` and `tensorcircuit.quantum.QuAdjointVector` are classes adopted from the TensorNetwork package.\n",
25+
"They behave like a matrix/vector (column or row) when interacting with other ingredients while the inner structure is maintained by the TensorNetwork for efficiency and compactness.\n",
2626
"\n",
2727
"Typical tensor network structures for a QuOperator/QuVector correspond to Matrix Product Operators (MPO) / Matrix Product States (MPS). The former represents a matrix as:\n",
2828
"$M_{i1,i2,...in; \\; j1, j2,... jn}=\\prod_k {T_k}^{i_k, j_k}$,\n",
@@ -390,7 +390,7 @@
390390
}
391391
],
392392
"source": [
393-
"# or we can have more matrix/vector like operation\n",
393+
"# or we can have more matrix/vector-like operation\n",
394394
"(3 * nvector).eval_matrix()"
395395
]
396396
},
@@ -444,9 +444,9 @@
444444
"id": "c951ee01",
445445
"metadata": {},
446446
"source": [
447-
"## QuVector as input state for the circuit\n",
447+
"## QuVector as the Input State for the Circuit\n",
448448
"\n",
449-
"Since ``QuVector`` behaves like a real vector with more compact representation, we can feed the circuit input states in the form of ``QuVector`` instead of plain numpy array vector."
449+
"Since ``QuVector`` behaves like a real vector with a more compact representation, we can feed the circuit input states in the form of ``QuVector`` instead of a plain numpy array vector."
450450
]
451451
},
452452
{
@@ -482,9 +482,9 @@
482482
"id": "5ccb0dbb",
483483
"metadata": {},
484484
"source": [
485-
"## QuVector as output state of the circuit\n",
485+
"## QuVector as the Output State of the Circuit\n",
486486
"\n",
487-
"The tensor network representation of the circuit can be regarded as a ``QuVector``, namely we can manipulate the circuit as a vector before the real contraction. This is also how we do circuit composition internally. "
487+
"The tensor network representation of the circuit can be regarded as a ``QuVector``, namely we can manipulate the circuit as a vector before the real contraction. This is also how we do circuit composition internally."
488488
]
489489
},
490490
{
@@ -670,7 +670,7 @@
670670
],
671671
"source": [
672672
"# The above is the core internal mechanism for circuit composition\n",
673-
"# And the user API is as follows\n",
673+
"# the user API is as follows\n",
674674
"\n",
675675
"n = 3\n",
676676
"c1 = tc.Circuit(n)\n",
@@ -691,9 +691,9 @@
691691
"id": "5a13c854",
692692
"metadata": {},
693693
"source": [
694-
"## QuOperator as operator to be evaluated on the circuit\n",
694+
"## QuOperator as Operator to be Evaluated on the Circuit\n",
695695
"\n",
696-
"The matrix to be evaluated over the output state of the circuit can also be represented by QuOperator, which is very powerful and efficient for some lattic model Hamiltonian."
696+
"The matrix to be evaluated over the output state of the circuit can also be represented by QuOperator, which is very powerful and efficient for some lattices model Hamiltonian."
697697
]
698698
},
699699
{
@@ -714,7 +714,7 @@
714714
}
715715
],
716716
"source": [
717-
"# Here we show a simplest model, where we measure <Z_0Z_1>\n",
717+
"# Here we show the simplest model, where we measure <Z_0Z_1>\n",
718718
"\n",
719719
"z0, z1 = tc.gates.z(), tc.gates.z()\n",
720720
"mpo = tc.quantum.QuOperator([z0[0], z1[0]], [z0[1], z1[1]])\n",
@@ -729,9 +729,9 @@
729729
"id": "fe067111",
730730
"metadata": {},
731731
"source": [
732-
"## QuOperator as the quantum gate applied on the circuit\n",
732+
"## QuOperator as the Quantum Gate Applied on the Circuit\n",
733733
"\n",
734-
"Since quantum gates are also unitary matrix, we can also use QuOperator for quantum gates. In some cases, QuOperator representation for quantum gates is much more compact, such as in multi control gate case, where the bond dimension can be reduced to 2 for neighboring qubits."
734+
"Since quantum gates are also unitary matrices, we can also use QuOperator for quantum gates. In some cases, QuOperator representation for quantum gates is much more compact, such as in multi-control gate case, where the bond dimension can be reduced to 2 for neighboring qubits."
735735
]
736736
},
737737
{
@@ -939,7 +939,7 @@
939939
}
940940
],
941941
"source": [
942-
"# And the built-in multi control gate is used as follows:\n",
942+
"# the built-in multi-control gate is used as follows:\n",
943943
"\n",
944944
"c = tc.Circuit(3)\n",
945945
"c.multicontrol(0, 1, 2, ctrl=[0, 1], unitary=tc.gates.x())\n",
@@ -1083,4 +1083,4 @@
10831083
},
10841084
"nbformat": 4,
10851085
"nbformat_minor": 5
1086-
}
1086+
}

0 commit comments

Comments
 (0)