Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Unused Imports #76

Merged
merged 7 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/quantum_circuit/quantum_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(

elif self.gpu:
try:
check = subprocess.check_output(["nvcc", "--version"]).decode()
subprocess.check_output(["nvcc", "--version"]).decode()
self.calculator = GpuCalculator(qubits, big_endian, prep)
except FileNotFoundError:
print("ERROR: CUDA NOT INSTALLED. SWITCHING TO BASE...")
Expand Down
1 change: 0 additions & 1 deletion src/tools/amplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

def amplitude(quantumstate, show_bit=-1, round: int = 3, radian: bool = False):
quantumstate = convert_state(quantumstate)
size = int(log2(quantumstate.size))
ToolsException().test_amplitude(show_bit, round, amplitude)
if isinstance(show_bit, int) and show_bit < 0:
amplitude = sqrt(power(quantumstate.real, 2) + power(quantumstate.imag, 2))
Expand Down
3 changes: 1 addition & 2 deletions src/visualize/q_sphere.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from collections import deque
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.cm import ScalarMappable
from .base.sphere import sphere
from ..tools import probability, amplitude, phaseangle
from ..tools import probability, phaseangle


def hamming_distance(l1: str, l2: str):
Expand Down
1 change: 0 additions & 1 deletion src/visualize/state_vector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.cm import ScalarMappable
from matplotlib.colors import rgb2hex
from .base.graph import graph
from ..tools import amplitude, phaseangle
Expand Down
Loading