Skip to content

Commit

Permalink
jupyter paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace committed Sep 19, 2023
1 parent 8dd69cc commit 239a9c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qiskit_qec/operators/pauli.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,11 @@ def to_instruction(self):
gate = {"I": IGate(), "X": XGate(), "Y": YGate(), "Z": ZGate()}[pauli]
else:
gate = PauliGate(pauli)
if not phase_exp[0]:
if not phase_exp:
return gate
# Add global phase
circuit = QuantumCircuit(self.num_qubits, name=str(self))
circuit.global_phase = -phase_exp[0] * pi / 2
circuit.global_phase = -phase_exp * pi / 2
circuit.append(gate, range(self.num_qubits))
return circuit.to_instruction()

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
JUPYTER_PLATFORM_DIRS=1
deps = -r requirements.txt
-r requirements-dev.txt
commands =
pip check
jupyter --paths
python -m unittest discover -s test/ -p '*test*.py' -v

[testenv:lint]
Expand Down

0 comments on commit 239a9c9

Please sign in to comment.