x = ({{1}, {0}}); y = ({{0}, {1}});
Subscript[n, 1] = KroneckerProduct[x, x, x, x, y];
Subscript[n, 2] = KroneckerProduct[x, x, x, y, x];
Subscript[n, 3] = KroneckerProduct[x, x, y, x, x];
Subscript[n, 4] = KroneckerProduct[x, y, x, x, x];
Subscript[n, 5] = KroneckerProduct[x, x, y, y, y];
Subscript[n, 6] = KroneckerProduct[x, y, x, y, y];
Subscript[n, 7] = KroneckerProduct[x, y, y, x, y]; Subscript[n, 8] =
KroneckerProduct[x, y, y, y, x]; Subscript[n, 9] =
KroneckerProduct[y, x, x, x, x]; Subscript[n, 10] =
KroneckerProduct[y, x, x, y, y]; Subscript[n, 11] =
KroneckerProduct[y, x, y, x, y]; Subscript[n, 12] =
KroneckerProduct[y, x, y, y, x];
Subscript[n, 13] = KroneckerProduct[y, y, x, x, y];
Subscript[n, 14] = KroneckerProduct[y, y, x, y, x];
Subscript[n, 15] = KroneckerProduct[y, y, y, x, x];
Subscript[n, 16] = KroneckerProduct[y, y, y, y, y];
\[Phi] = \[Gamma]1*(Subscript[n, 1] + Subscript[n, 2] + Subscript[n,
3] + Subscript[n, 4]) + \[Gamma]2*(Subscript[n, 5] + Subscript[
n, 6] + Subscript[n, 7] + Subscript[n, 8]) + \[Gamma]3*
Subscript[n,
9] + \[Gamma]4*(Subscript[n, 10] + Subscript[n, 11] + Subscript[n,
12] + Subscript[n, 13] + Subscript[n, 14] + Subscript[n,
15]) + \[Gamma]5*Subscript[n, 16];
Subscript[\[Rho], 12345] = \[Phi].Transpose[\[Phi]];
\[Gamma]1 = -(-1 + \[Alpha]1 + \[Gamma]^2)*(5 + \[Alpha]1 +
5 \[Gamma]^2)^(1/2)/(4*(2 \[Alpha]2)^(1/2));
\[Gamma]2 = -3*(\[Gamma]^4*(5 + \[Alpha]1 +
5 \[Gamma]^2)/\[Alpha]2)^(1/2)/(2*2^(1/2)*\[Gamma]);
\[Gamma]3 = (-1 + \[Alpha]1 + \[Gamma]^2)/((2 \[Alpha]2)^(1/2));
\[Gamma]4 = \[Gamma]*(5 + \[Alpha]1 +
5 \[Gamma]^2)/(2 (2 \[Alpha]2)^(1/2));
\[Gamma]5 = 3*(2^(1/2) \[Gamma]^2)/\[Alpha]2;
\[Gamma]6 = ((\[Gamma]^2 (5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1*\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(-2 - 2 \[Alpha]1 + 17 \[Gamma]^2 - 3 \[Alpha]1*\[Gamma]^2 +
3 \[Gamma]^4)/(4*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4));
\[Gamma]7 = -((\[Gamma]^2*(5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1*\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(1 + \[Alpha]1 - \[Gamma]^2 +
6 \[Gamma]^4)/(4 \[Gamma]*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4));
\[Gamma]8 = -3*((\[Gamma]^2 (5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(5 - \[Alpha]1 +
5 \[Gamma]^2)/(4*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4);
\[Gamma]9 = (1 + \[Alpha]1 - \[Gamma]^2)/(4 \[Gamma]*(34 - \
\[Alpha]1 + ((1 + \[Alpha]1)/\[Gamma]^2) + \[Gamma]^2)^(1/2));
\[Gamma]10 =
3/(2*(34 - \[Alpha]1 + ((1 + \[Alpha]1)/\[Gamma]^2)) + \
\[Gamma]^2)^(1/2));
\[Alpha]1 = (1 + 34 \[Gamma]^2 + \[Gamma]^4)^(1/2);
\[Alpha]2 =
2 - 2 \[Alpha]1 + 71 \[Gamma]^2 + 17 \[Alpha]1*\[Gamma]^2 +
104 \[Gamma]^4 + 3 \[Alpha]1*\[Gamma]^4 + 3 \[Gamma]^6;
Subscript[\[Psi], 0] = ({{1}, {0}});
Subscript[\[Psi], 1] = ({{0}, {1}});
Subscript[C, 12] = \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(m =
0\), \(1\)]\((Transpose[\((KroneckerProduct[IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(i\)],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\)] .
\*SubscriptBox[\(\[Rho]\), \(12345\)] . \((KroneckerProduct[
IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(i\)],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\))\)\)\)\);
Subscript[C, 23] = \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(m =
0\), \(1\)]\((Transpose[\((KroneckerProduct[
\*SubscriptBox[\(\[Psi]\), \(i\)], IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\)] .
\*SubscriptBox[\(\[Rho]\), \(12345\)] . \((KroneckerProduct[
\*SubscriptBox[\(\[Psi]\), \(i\)], IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\))\)\)\)\);
Subscript[C, 12] =
2 Abs[Subscript[\[Rho], 12][[1, 2]]] +
2 Abs[Subscript[\[Rho], 12][[1, 3]]] +
2 Abs[Subscript[\[Rho], 12][[1, 4]]] +
2 Abs[Subscript[\[Rho], 12][[2, 3]]] +
2 Abs[Subscript[\[Rho], 12][[2, 4]]] +
2 Abs[Subscript[\[Rho], 12][[3, 4]]];
Subscript[C, 23] =
2 Abs[Subscript[\[Rho], 23][[1, 2]]] +
2 Abs[Subscript[\[Rho], 23][[1, 3]]] +
2 Abs[Subscript[\[Rho], 23][[1, 4]]] +
2 Abs[Subscript[\[Rho], 23][[2, 3]]] +
2 Abs[Subscript[\[Rho], 23][[2, 4]]] +
2 Abs[Subscript[\[Rho], 23][[3, 4]]];
Subscript[k, 12] = D[Subscript[C, 12], \[Gamma]];
Subscript[k, 23] = D[Subscript[C, 23], \[Gamma]];
Plot[Subscript[k, 12], {\[Gamma], -35, 35}, PlotStyle -> Green,
Frame -> True,
FrameLabel -> {"\[Gamma]", "\!\(\*SubscriptBox[\(k\), \(12\)]\)"}]
Plot[Subscript[k, 23], {\[Gamma], -35, 35}, PlotStyle -> Blue,
Frame -> True,
FrameLabel -> {"\[Gamma]", "\!\(\*SubscriptBox[\(k\), \(23\)]\)"}]
这是源代码

Subscript[n, 1] = KroneckerProduct[x, x, x, x, y];
Subscript[n, 2] = KroneckerProduct[x, x, x, y, x];
Subscript[n, 3] = KroneckerProduct[x, x, y, x, x];
Subscript[n, 4] = KroneckerProduct[x, y, x, x, x];
Subscript[n, 5] = KroneckerProduct[x, x, y, y, y];
Subscript[n, 6] = KroneckerProduct[x, y, x, y, y];
Subscript[n, 7] = KroneckerProduct[x, y, y, x, y]; Subscript[n, 8] =
KroneckerProduct[x, y, y, y, x]; Subscript[n, 9] =
KroneckerProduct[y, x, x, x, x]; Subscript[n, 10] =
KroneckerProduct[y, x, x, y, y]; Subscript[n, 11] =
KroneckerProduct[y, x, y, x, y]; Subscript[n, 12] =
KroneckerProduct[y, x, y, y, x];
Subscript[n, 13] = KroneckerProduct[y, y, x, x, y];
Subscript[n, 14] = KroneckerProduct[y, y, x, y, x];
Subscript[n, 15] = KroneckerProduct[y, y, y, x, x];
Subscript[n, 16] = KroneckerProduct[y, y, y, y, y];
\[Phi] = \[Gamma]1*(Subscript[n, 1] + Subscript[n, 2] + Subscript[n,
3] + Subscript[n, 4]) + \[Gamma]2*(Subscript[n, 5] + Subscript[
n, 6] + Subscript[n, 7] + Subscript[n, 8]) + \[Gamma]3*
Subscript[n,
9] + \[Gamma]4*(Subscript[n, 10] + Subscript[n, 11] + Subscript[n,
12] + Subscript[n, 13] + Subscript[n, 14] + Subscript[n,
15]) + \[Gamma]5*Subscript[n, 16];
Subscript[\[Rho], 12345] = \[Phi].Transpose[\[Phi]];
\[Gamma]1 = -(-1 + \[Alpha]1 + \[Gamma]^2)*(5 + \[Alpha]1 +
5 \[Gamma]^2)^(1/2)/(4*(2 \[Alpha]2)^(1/2));
\[Gamma]2 = -3*(\[Gamma]^4*(5 + \[Alpha]1 +
5 \[Gamma]^2)/\[Alpha]2)^(1/2)/(2*2^(1/2)*\[Gamma]);
\[Gamma]3 = (-1 + \[Alpha]1 + \[Gamma]^2)/((2 \[Alpha]2)^(1/2));
\[Gamma]4 = \[Gamma]*(5 + \[Alpha]1 +
5 \[Gamma]^2)/(2 (2 \[Alpha]2)^(1/2));
\[Gamma]5 = 3*(2^(1/2) \[Gamma]^2)/\[Alpha]2;
\[Gamma]6 = ((\[Gamma]^2 (5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1*\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(-2 - 2 \[Alpha]1 + 17 \[Gamma]^2 - 3 \[Alpha]1*\[Gamma]^2 +
3 \[Gamma]^4)/(4*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4));
\[Gamma]7 = -((\[Gamma]^2*(5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1*\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(1 + \[Alpha]1 - \[Gamma]^2 +
6 \[Gamma]^4)/(4 \[Gamma]*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4));
\[Gamma]8 = -3*((\[Gamma]^2 (5 + \[Alpha]1 +
5 \[Gamma]^2))/(1 + \[Alpha]1 +
34 \[Gamma]^2 - \[Alpha]1\[Gamma]^2 + \[Gamma]^4))^(1/
2)*(5 - \[Alpha]1 +
5 \[Gamma]^2)/(4*(3 + 2 \[Gamma]^2 + 3 \[Gamma]^4);
\[Gamma]9 = (1 + \[Alpha]1 - \[Gamma]^2)/(4 \[Gamma]*(34 - \
\[Alpha]1 + ((1 + \[Alpha]1)/\[Gamma]^2) + \[Gamma]^2)^(1/2));
\[Gamma]10 =
3/(2*(34 - \[Alpha]1 + ((1 + \[Alpha]1)/\[Gamma]^2)) + \
\[Gamma]^2)^(1/2));
\[Alpha]1 = (1 + 34 \[Gamma]^2 + \[Gamma]^4)^(1/2);
\[Alpha]2 =
2 - 2 \[Alpha]1 + 71 \[Gamma]^2 + 17 \[Alpha]1*\[Gamma]^2 +
104 \[Gamma]^4 + 3 \[Alpha]1*\[Gamma]^4 + 3 \[Gamma]^6;
Subscript[\[Psi], 0] = ({{1}, {0}});
Subscript[\[Psi], 1] = ({{0}, {1}});
Subscript[C, 12] = \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(m =
0\), \(1\)]\((Transpose[\((KroneckerProduct[IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(i\)],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\)] .
\*SubscriptBox[\(\[Rho]\), \(12345\)] . \((KroneckerProduct[
IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(i\)],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\))\)\)\)\);
Subscript[C, 23] = \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 0\), \(1\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(m =
0\), \(1\)]\((Transpose[\((KroneckerProduct[
\*SubscriptBox[\(\[Psi]\), \(i\)], IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\)] .
\*SubscriptBox[\(\[Rho]\), \(12345\)] . \((KroneckerProduct[
\*SubscriptBox[\(\[Psi]\), \(i\)], IdentityMatrix[4],
\*SubscriptBox[\(\[Psi]\), \(j\)],
\*SubscriptBox[\(\[Psi]\), \(m\)]])\))\)\)\)\);
Subscript[C, 12] =
2 Abs[Subscript[\[Rho], 12][[1, 2]]] +
2 Abs[Subscript[\[Rho], 12][[1, 3]]] +
2 Abs[Subscript[\[Rho], 12][[1, 4]]] +
2 Abs[Subscript[\[Rho], 12][[2, 3]]] +
2 Abs[Subscript[\[Rho], 12][[2, 4]]] +
2 Abs[Subscript[\[Rho], 12][[3, 4]]];
Subscript[C, 23] =
2 Abs[Subscript[\[Rho], 23][[1, 2]]] +
2 Abs[Subscript[\[Rho], 23][[1, 3]]] +
2 Abs[Subscript[\[Rho], 23][[1, 4]]] +
2 Abs[Subscript[\[Rho], 23][[2, 3]]] +
2 Abs[Subscript[\[Rho], 23][[2, 4]]] +
2 Abs[Subscript[\[Rho], 23][[3, 4]]];
Subscript[k, 12] = D[Subscript[C, 12], \[Gamma]];
Subscript[k, 23] = D[Subscript[C, 23], \[Gamma]];
Plot[Subscript[k, 12], {\[Gamma], -35, 35}, PlotStyle -> Green,
Frame -> True,
FrameLabel -> {"\[Gamma]", "\!\(\*SubscriptBox[\(k\), \(12\)]\)"}]
Plot[Subscript[k, 23], {\[Gamma], -35, 35}, PlotStyle -> Blue,
Frame -> True,
FrameLabel -> {"\[Gamma]", "\!\(\*SubscriptBox[\(k\), \(23\)]\)"}]
这是源代码
