Skip to content

Commit

Permalink
use c2qa.util.simulate() instead of qiskit.execute()
Browse files Browse the repository at this point in the history
  • Loading branch information
tjstavenger-pnnl committed Feb 20, 2024
1 parent 5484ce8 commit d5d5de8
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 1,154 deletions.
9 changes: 5 additions & 4 deletions tests/test_inconsistent_statevectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import qiskit_aer
import scipy.linalg


import c2qa


# Define parameters
num_qubits_per_qumode = 2
cutoff = 2**num_qubits_per_qumode
Expand Down Expand Up @@ -78,10 +82,7 @@ def run_displacement_calibration(enable_measure):
if enable_measure:
circuit.measure(qr[0], cr[0])

backend = qiskit_aer.AerSimulator()
job = qiskit.execute(circuit, backend)
result = job.result()
state = result.get_statevector(circuit)
state, result, fock_counts = c2qa.util.simulate(circuit)
counts = result.get_counts(circuit)

assert state.dim > 0
Expand Down
540 changes: 19 additions & 521 deletions tutorials/bosonic-qiskit-textbook/5. gates.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit d5d5de8

Please sign in to comment.