Skip to content

Commit

Permalink
Update iQuantum examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hoaiocom committed Aug 17, 2023
1 parent ba40e71 commit 14f60c5
Show file tree
Hide file tree
Showing 96 changed files with 1,265 additions and 1,358 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
afd7c3392451ddd681ec41d3ba85286c
a7b1ecd648597deda8923b1867e08f21
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c44ee6701f80e641d682cadec2e7286d04e33fa7
6b3e438416c0d2ec28134153d94922de3d9238ed
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c758bdd1c6e373c5b4dfa6819929ada4
c5d9f43811d0ec7de7ccf261b9c66bae
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59f3dbc4594c7e4bb0548df15e2a3de69665c30f
84cf97442460d3b49faa8d7c025586770b9b14a2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20230726123838</lastUpdated>
<lastUpdated>20230817023627</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
066eb53fa92564bf02ef63366b9496ee
9517e998539e23aedefac954e6d93b4b
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b4c16fa50df608727645d884409c1669a1a1360b
0cd34faad5ab2ba9d446a7ace61863bd5bd21f08
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20230726123835</lastUpdated>
<lastUpdated>20230817023624</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
48052e63623499769b32b435f7ceb1d7
1e523746446efc8fa65779aa942b213d
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c6763d4cbc1ab77e9b98cb337e60938edb42437d
060ef9217f065d24b0a462d46439ca65bb16fd97
2 changes: 1 addition & 1 deletion modules/iquantum-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<configuration>
<archive>
<manifest>
<mainClass>org.iquantum.examples.qcloudedge.iQuantumCloudEdgeExample3</mainClass>
<mainClass>org.iquantum.examples.hybrid.iQuantumHybridExample4</mainClass>
</manifest>
</archive>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
/**
* iQuantum Example 5
* This example shows how to create a QDatacenter with two 27-qubit quantum nodes following the topology of
* IBM Hanoi and IBM Geneva automatically from the datasheet. Then, it creates a QBroker and four QTasks to
* be submitted to the QBroker. Finally, it starts the simulation and prints the results.
* This is an example of using iQuantum with Py4J to connect with external Python applications.
* Note: This example is an experimental feature of iQuantum.
*/

package org.iquantum.examples.p4j;
import org.iquantum.brokers.QBrokerSimple;
package org.iquantum.examples.experimental;
import org.iquantum.brokers.QCloudBroker;
import py4j.GatewayServer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
import org.iquantum.brokers.CBroker;
import org.iquantum.brokers.QBroker;
import org.iquantum.brokers.QCloudBroker;
import org.iquantum.datacenters.CDatacenter;
import org.iquantum.datacenters.CDatacenterCharacteristics;
import org.iquantum.datacenters.QDatacenter;
import org.iquantum.datacenters.QDatacenterCharacteristics;
import org.iquantum.datacenters.*;
import org.iquantum.backends.quantum.IBMQNode;
import org.iquantum.backends.quantum.QNode;
import org.iquantum.core.iQuantum;
Expand Down Expand Up @@ -58,7 +55,7 @@ public static void main(String[] args) {
// Step 2: Create a CDatacenter and a QDatacenter
CDatacenter CDatacenter0 = createDatacenter("CDatacenter_0");

QDatacenter qDatacenter = createQDatacenter("QDatacenter_0");
QCloudDatacenter qDatacenter = createQDatacenter("QDatacenter_0");


// Step 3: Create a CBroker and a QBroker
Expand Down Expand Up @@ -349,7 +346,7 @@ private static QBroker createQBroker() {
* @param name name of the QDatacenter
* @return QDatacenter
*/
private static QDatacenter createQDatacenter(String name) {
private static QCloudDatacenter createQDatacenter(String name) {
// Automatically create two quantum nodes (IBM Hanoi and IBM Geneva) from the dataset
QNode qNode1 = IBMQNode.createNode(0,"ibm_oslo",new QTaskSchedulerSpaceShared());
qNodeList = new ArrayList<>();
Expand All @@ -359,7 +356,7 @@ private static QDatacenter createQDatacenter(String name) {

// Create a QDatacenter with two 7-qubit quantum nodes (IBM Hanoi and IBM Geneva)
QDatacenterCharacteristics characteristics = new QDatacenterCharacteristics(qNodeList, timeZone, costPerSec);
QDatacenter qDatacenter = new QDatacenter(name, characteristics);
QCloudDatacenter qDatacenter = new QCloudDatacenter(name, characteristics);
return qDatacenter;
}

Expand Down
Loading

0 comments on commit 14f60c5

Please sign in to comment.