This service takes a PyQuil or Quil implementation as data or via an URL and returns either its depth, width and the transpiled Quil String (Transpilation Request) or its results (Execution Request) depending on the input data and selected backend.
git clone https://github.com/UST-QuAntiL/forest-service.git
git clone [email protected]:UST-QuAntiL/forest-service.git
docker-compose pull
docker-compose up
Now the forest-service is available on http://localhost:5014/.
docker build -t planqk/forest-service:latest .
docker push planqk/forest-service:latest
docker-compose pull
docker-compose up
Send implementation, input, and QPU information to the API to get depth and width of the transpiled circuit and the transpiled Quil circuit itself. Note: Currently, only the QVM is used for simulation. Thus, no real backends are accessible.
POST /forest-service/api/v1.0/transpile
{
"impl-url": "URL-OF-IMPLEMENTATION",
"impl-language": "PyQuil"/"Quil",
"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"
}
},
"bearer-token": "YOUR-BEARER-TOKEN"
}
You only need to specify a bearer token if the url is from the PlanQK platform.
{
"impl-data": "BASE64-ENCODED-IMPLEMENTATION",
"impl-language": "PyQuil"/"Quil",
"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"
}
}
}
Send implementation, input, and QPU information to the API to execute your circuit and get the result. Note: Currently, only the QVM is used for simulation. Thus, no real backends are accessible.
POST /forest-service/api/v1.0/execute
{
"impl-url": "URL-OF-IMPLEMENTATION",
"impl-language": "PyQuil"/"Quil",
"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"
}
},
"bearer-token": "YOUR-BEARER-TOKEN"
}
You only need to specify a bearer token if the url is from the PlanQK platform.
{
"impl-data": "BASE64-ENCODED-IMPLEMENTATION",
"impl-language": "PyQuil"/"Quil",
"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"
}
}
}
{
"transpiled-quil": "TRANSPILED-Quil-STRING",
"qpu-name": "NAME-OF-QPU"
}
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:c2719ac8e…
Size
561.6 MB
Last updated
about 2 years ago
docker pull planqk/forest-service