Skip to content

Commit

Permalink
set heatmap bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Jan 16, 2025
1 parent 5e59346 commit 5c95219
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/examples/pt_zne.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ print(circuit)
```
```{code-cell} ipython3
ptmcnot = ptm_matrix(circuit, 2)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5, vmin=-1, vmax=1)
print("Ideal CNOT PTM")
plt.show()
```
Expand All @@ -196,7 +196,7 @@ noisy_circuit_incoherent = circuit.with_noise(depolarize(p=0.3))
print(noisy_circuit_incoherent)
ptmcnot = ptm_matrix(noisy_circuit_incoherent, 2)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5, vmin=-1, vmax=1)
print("\n Pauli Transfer Matrix of noisy CNOT (incoherent)")
plt.show()
```
Expand All @@ -206,7 +206,7 @@ noisy_circuit_coherent = circuit.with_noise(Ry(rads=np.pi/12))
print(noisy_circuit_coherent)
ptmcnot = ptm_matrix(noisy_circuit_coherent, 2)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5)
ax = sns.heatmap(ptmcnot.real, linewidth=0.5, vmin=-1, vmax=1)
print("Pauli Transfer Matrix of noisy CNOT (coherent)")
plt.show()
```
Expand Down

0 comments on commit 5c95219

Please sign in to comment.