Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
doichanj committed Jul 18, 2024
1 parent 41629f7 commit 8203e93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions qiskit_aer/quantum_info/states/aer_densitymatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,13 @@ def _from_instruction(inst, init_data, configs):
aer_state.apply_global_phase(inst.global_phase)

if isinstance(inst, QuantumCircuit):
AerStatevector._aer_evolve_circuit(aer_state, inst, range(num_qubits), basis_gates, custom_insts)
AerStatevector._aer_evolve_circuit(
aer_state, inst, range(num_qubits), basis_gates, custom_insts
)
else:
AerStatevector._aer_evolve_instruction(aer_state, inst, range(num_qubits), basis_gates, custom_insts)
AerStatevector._aer_evolve_instruction(
aer_state, inst, range(num_qubits), basis_gates, custom_insts
)

return aer_state.move_to_ndarray(), aer_state

Expand Down
12 changes: 9 additions & 3 deletions qiskit_aer/quantum_info/states/aer_statevector.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,13 @@ def _from_instruction(inst, init_data, configs):
aer_state.apply_global_phase(inst.global_phase)

if isinstance(inst, QuantumCircuit):
AerStatevector._aer_evolve_circuit(aer_state, inst, range(num_qubits), basis_gates, custom_insts)
AerStatevector._aer_evolve_circuit(
aer_state, inst, range(num_qubits), basis_gates, custom_insts
)
else:
AerStatevector._aer_evolve_instruction(aer_state, inst, range(num_qubits), basis_gates, custom_insts)
AerStatevector._aer_evolve_instruction(
aer_state, inst, range(num_qubits), basis_gates, custom_insts
)

return aer_state.move_to_ndarray(), aer_state

Expand Down Expand Up @@ -282,7 +286,9 @@ def _aer_evolve_instruction(aer_state, inst, qubits, basis_gates=None, custom_in
definition = inst.definition
if definition is inst or definition is None:
raise AerError("cannot decompose " + inst.name)
AerStatevector._aer_evolve_circuit(aer_state, definition, qubits, basis_gates, custom_insts)
AerStatevector._aer_evolve_circuit(
aer_state, definition, qubits, basis_gates, custom_insts
)

@classmethod
def from_label(cls, label):
Expand Down

0 comments on commit 8203e93

Please sign in to comment.