summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-qiskit-ionq.spec60
-rw-r--r--sources2
3 files changed, 38 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index 0b2ca45..1fc1a9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/qiskit-ionq-0.3.10.tar.gz
+/qiskit-ionq-0.4.0.tar.gz
diff --git a/python-qiskit-ionq.spec b/python-qiskit-ionq.spec
index be8111c..2328606 100644
--- a/python-qiskit-ionq.spec
+++ b/python-qiskit-ionq.spec
@@ -1,11 +1,11 @@
%global _empty_manifest_terminate_build 0
Name: python-qiskit-ionq
-Version: 0.3.10
+Version: 0.4.0
Release: 1
Summary: Qiskit provider for IonQ backends
License: Apache 2.0
URL: https://github.com/qiskit-partners/qiskit-ionq
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b0/20/2c35b5867c4bc997a00cae96f5fbedc1fd2ef1b9822e284d76e339d1191e/qiskit-ionq-0.3.10.tar.gz
+Source0: https://mirrors.aliyun.com/pypi/web/packages/46/dc/39b5296fdf96bdbbb13ff7e12ed7970ff9252da4e23d1c43217ffa37fdf6/qiskit-ionq-0.4.0.tar.gz
BuildArch: noarch
Requires: python3-decorator
@@ -69,7 +69,7 @@ export QISKIT_IONQ_API_TOKEN="token"
Then invoke instantiate the provider without any arguments:
```python
-from qiskit_ionq import IonQProvider
+from qiskit_ionq import IonQProvider, ErrorMitigation
provider = IonQProvider()
```
@@ -98,15 +98,19 @@ qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
-# Run the circuit on IonQ's platform:
-job = simulator_backend.run(qc)
+# Run the circuit on IonQ's platform with error mitigation:
+job = simulator_backend.run(qc, error_mitigation=ErrorMitigation.DEBIASING)
# Print the results.
-print(job.get_counts())
+print(job.result().get_counts())
+
+# Get results with a different aggregation method when debiasing
+# is applied as an error mitigation strategy
+print(job.result(sharpen=True).get_counts())
# The simulator specifically provides the the ideal probabilities and creates
# counts by sampling from these probabilities. The raw probabilities are also accessible:
-print(job.get_probabilities())
+print(job.result().get_probabilities())
```
### Basis gates and transpilation
@@ -238,7 +242,7 @@ export QISKIT_IONQ_API_TOKEN="token"
Then invoke instantiate the provider without any arguments:
```python
-from qiskit_ionq import IonQProvider
+from qiskit_ionq import IonQProvider, ErrorMitigation
provider = IonQProvider()
```
@@ -267,15 +271,19 @@ qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
-# Run the circuit on IonQ's platform:
-job = simulator_backend.run(qc)
+# Run the circuit on IonQ's platform with error mitigation:
+job = simulator_backend.run(qc, error_mitigation=ErrorMitigation.DEBIASING)
# Print the results.
-print(job.get_counts())
+print(job.result().get_counts())
+
+# Get results with a different aggregation method when debiasing
+# is applied as an error mitigation strategy
+print(job.result(sharpen=True).get_counts())
# The simulator specifically provides the the ideal probabilities and creates
# counts by sampling from these probabilities. The raw probabilities are also accessible:
-print(job.get_probabilities())
+print(job.result().get_probabilities())
```
### Basis gates and transpilation
@@ -404,7 +412,7 @@ export QISKIT_IONQ_API_TOKEN="token"
Then invoke instantiate the provider without any arguments:
```python
-from qiskit_ionq import IonQProvider
+from qiskit_ionq import IonQProvider, ErrorMitigation
provider = IonQProvider()
```
@@ -433,15 +441,19 @@ qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
-# Run the circuit on IonQ's platform:
-job = simulator_backend.run(qc)
+# Run the circuit on IonQ's platform with error mitigation:
+job = simulator_backend.run(qc, error_mitigation=ErrorMitigation.DEBIASING)
# Print the results.
-print(job.get_counts())
+print(job.result().get_counts())
+
+# Get results with a different aggregation method when debiasing
+# is applied as an error mitigation strategy
+print(job.result(sharpen=True).get_counts())
# The simulator specifically provides the the ideal probabilities and creates
# counts by sampling from these probabilities. The raw probabilities are also accessible:
-print(job.get_probabilities())
+print(job.result().get_probabilities())
```
### Basis gates and transpilation
@@ -513,7 +525,7 @@ The IonQ logo and Q mark are copyright IonQ, Inc. All rights reserved.
%prep
-%autosetup -n qiskit-ionq-0.3.10
+%autosetup -n qiskit-ionq-0.4.0
%build
%py3_build
@@ -527,20 +539,20 @@ if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
- find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
- find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
- find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
- find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
- find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
@@ -553,5 +565,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.10-1
+* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.0-1
- Package Spec generated
diff --git a/sources b/sources
index 752891a..7602644 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e2b0d65168ef8694ade3b6528b52669d qiskit-ionq-0.3.10.tar.gz
+5713a91246f67d71bf144c2111e5fd40 qiskit-ionq-0.4.0.tar.gz