mirror of
https://github.com/kristoferssolo/grovers-visualizer.git
synced 2025-10-21 20:10:35 +00:00
chore: remove .python-version file
This commit is contained in:
parent
2defbc9d77
commit
6346349266
2
.gitignore
vendored
2
.gitignore
vendored
@ -90,7 +90,7 @@ ipython_config.py
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
|
||||
@ -1 +0,0 @@
|
||||
3.13
|
||||
@ -14,9 +14,7 @@ def apply_phase_inversion(qc: QuantumCircuit, n: int) -> None:
|
||||
"""Apply a multi-controlled phase inversion (Z) to the marked state."""
|
||||
if n == 1:
|
||||
qc.z(0)
|
||||
elif n == 2:
|
||||
qc.cz(0, 1)
|
||||
else:
|
||||
qc.h(n - 1)
|
||||
qc.mcx(list(range(n - 1)), n - 1) # multi-controlled X (Toffoli for 3 qubits)
|
||||
qc.h(n - 1)
|
||||
return
|
||||
qc.h(n - 1)
|
||||
qc.mcx(list(range(n - 1)), n - 1)
|
||||
qc.h(n - 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user