Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

fix: hybrid neural network deprecated package fix #2062 #2133

Closed
wants to merge 4 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@
" def run(self, thetas):\n",
" t_qc = transpile(self._circuit,\n",
" self.backend)\n",
" qobj = assemble(t_qc,\n",
" shots=self.shots,\n",
" parameter_binds = [{self.theta: theta} for theta in thetas])\n",
" job = self.backend.run(qobj)\n",
" # Using a qobj for run() is deprecated as of qiskit-aer 0.9.0.\n",
" # Therefore the transpiled qc (t_qc) is directly passed to the run method.\n",
" # qobj = assemble(t_qc,\n",
" # shots=self.shots,\n",
" # parameter_binds = [{self.theta: theta} for theta in thetas])\n",
nuvinga marked this conversation as resolved.
Show resolved Hide resolved
" job = self.backend.run(t_qc)\n",
nuvinga marked this conversation as resolved.
Show resolved Hide resolved
" result = job.result().get_counts()\n",
" \n",
" counts = np.array(list(result.values()))\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@
" def run(self, thetas):\n",
" t_qc = transpile(self._circuit,\n",
" self.backend)\n",
" qobj = assemble(t_qc,\n",
" shots=self.shots,\n",
" parameter_binds = [{self.theta: theta} for theta in thetas])\n",
" job = self.backend.run(qobj)\n",
" # Using a qobj for run() is deprecated as of qiskit-aer 0.9.0.\n",
" # Therefore the transpiled qc (t_qc) is directly passed to the run method.\n",
" # qobj = assemble(t_qc,\n",
" # shots=self.shots,\n",
" # parameter_binds = [{self.theta: theta} for theta in thetas])\n",
" job = self.backend.run(t_qc)\n",
" result = job.result().get_counts()\n",
" \n",
" counts = np.array(list(result.values()))\n",
Expand Down