This service takes a Qiskit or OpenQASM implementation as data or via an URL and returns either its depth, width and the transpiled OpenQASM String (Transpilation Request) or its results (Execution Request) depending on the input data and selected backend.
git clone https://github.com/UST-QuAntiL/qiskit-service.git
git clone [email protected]:UST-QuAntiL/qiskit-service.git
docker-compose pull
docker-compose up
Now the qiskit-service is available on http://localhost:5013/.
Send implementation, input, QPU information, and your IBM Quantum Experience token to the API to get depth and width of the transpiled circuit and the transpiled OpenQASM circuit itself.
Note: token should either be in input-params or extra. Both variants are combined here or illustration purposes.
POST /qiskit-service/api/v1.0/transpile
{
"impl-url": "URL-OF-IMPLEMENTATION",
"impl-language": "Qiskit"/"OpenQASM",
"qpu-name": "NAME-OF-QPU",
"input-params": {
"PARAM-NAME-1": {
"rawValue": "YOUR-VALUE-1",
"type": "Integer"
},
"PARAM-NAME-2": {
"rawValue": "YOUR-VALUE-2",
"type": "String"
},
...
"token": {
"rawValue": "YOUR-IBMQ-TOKEN",
"type": "Unknown"
}
},
"token": "YOUR-IBMQ-TOKEN"
}
{
"impl-data": "BASE64-ENCODED-IMPLEMENTATION",
"impl-language": "Qiskit"/"OpenQASM",
"qpu-name": "NAME-OF-QPU",
"input-params": {
"PARAM-NAME-1": {
"rawValue": "YOUR-VALUE-1",
"type": "Integer"
},
"PARAM-NAME-2": {
"rawValue": "YOUR-VALUE-2",
"type": "String"
},
...
"token": {
"rawValue": "YOUR-IBMQ-TOKEN",
"type": "Unknown"
}
},
"token": "YOUR-IBMQ-TOKEN"
}
Send implementation, input, QPU information, and your IBM Quantum Experience token to the API to execute your circuit and get the result.
Note: token should either be in input-params or extra. Both variants are combined here for illustration purposes.
POST /qiskit-service/api/v1.0/execute
{
"impl-url": "URL-OF-IMPLEMENTATION",
"impl-language": "Qiskit"/"OpenQASM",
"qpu-name": "NAME-OF-QPU",
"input-params": {
"PARAM-NAME-1": {
"rawValue": "YOUR-VALUE-1",
"type": "Integer"
},
"PARAM-NAME-2": {
"rawValue": "YOUR-VALUE-2",
"type": "String"
},
...
"token": {
"rawValue": "YOUR-IBMQ-TOKEN",
"type": "Unknown"
}
},
"token": "YOUR-IBMQ-TOKEN"
}
{
"impl-data": "BASE64-ENCODED-IMPLEMENTATION",
"impl-language": "Qiskit"/"OpenQASM",
"qpu-name": "NAME-OF-QPU",
"input-params": {
"PARAM-NAME-1": {
"rawValue": "YOUR-VALUE-1",
"type": "Integer"
},
"PARAM-NAME-2": {
"rawValue": "YOUR-VALUE-2",
"type": "String"
},
...
"token": {
"rawValue": "YOUR-IBMQ-TOKEN",
"type": "Unknown"
}
},
"token": "YOUR-IBMQ-TOKEN"
}
{
"transpiled-qasm": "TRANSPILED-QASM-STRING",
"qpu-name": "NAME-OF-QPU",
"input-params": {
"token": {
"rawValue": "YOUR-IBMQ-TOKEN",
"type": "Unknown"
}
},
"token": "YOUR-IBMQ-TOKEN"
}
Returns a content location for the result. Access it via GET.
Send QPU information, optional shots, and your IBM Quantum Experience token to the API to calculate the calibration matrix for the given QPU.
POST /qiskit-service/api/v1.0/calculate-calibration-matrix
{
"qpu-name": "NAME-OF-QPU",
"token": "YOUR-IBMQ-TOKEN",
"shots": "NUMBER-OF-SHOTS"
}
Returns a content location for the result. Access it via GET.
Sample implementations can be found here.
Please use the raw GitHub URL as impl-url value (see example).
Dies ist ein Forschungsprototyp. Die Haftung für entgangenen Gewinn, Produktionsausfall, Betriebsunterbrechung, entgangene Nutzungen, Verlust von Daten und Informationen, Finanzierungsaufwendungen sowie sonstige Vermögens- und Folgeschäden ist, außer in Fällen von grober Fahrlässigkeit, Vorsatz und Personenschäden, ausgeschlossen.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
Content type
Image
Digest
sha256:00621c6f7…
Size
547.7 MB
Last updated
about 2 years ago
docker pull planqk/qiskit-service