├── .metadata ├── .lock ├── .plugins │ ├── org.eclipse.rse.ui │ │ └── .log │ ├── org.eclipse.rse.core │ │ ├── .log │ │ ├── initializerMarks │ │ │ └── org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark │ │ └── profiles │ │ │ └── PRF.vlads5014_496 │ │ │ └── node.properties │ ├── org.eclipse.cdt.make.core │ │ ├── specs.c │ │ └── specs.cpp │ ├── org.eclipse.jdt.core │ │ ├── javaLikeNames.txt │ │ ├── invalidArchivesCache │ │ ├── 1075156909.index │ │ ├── 1143014137.index │ │ ├── 1144188029.index │ │ ├── 1262622903.index │ │ ├── 135936188.index │ │ ├── 1435321767.index │ │ ├── 1485044014.index │ │ ├── 1820024274.index │ │ ├── 1965301315.index │ │ ├── 2082571954.index │ │ ├── 2144648300.index │ │ ├── 221979875.index │ │ ├── 2265412338.index │ │ ├── 2302811751.index │ │ ├── 2387712100.index │ │ ├── 2687790720.index │ │ ├── 2699899854.index │ │ ├── 2706502329.index │ │ ├── 2708239607.index │ │ ├── 2993303256.index │ │ ├── 3015671029.index │ │ ├── 3108731229.index │ │ ├── 3129927180.index │ │ ├── 3256372620.index │ │ ├── 3267748049.index │ │ ├── 3521617142.index │ │ ├── 3626931047.index │ │ ├── 3710613527.index │ │ ├── 3811958767.index │ │ ├── 384216248.index │ │ ├── 3893835914.index │ │ ├── 4018706093.index │ │ ├── 4149142647.index │ │ ├── 465581470.index │ │ ├── 620286925.index │ │ ├── 643015801.index │ │ ├── 683184654.index │ │ ├── 728132027.index │ │ ├── 739078005.index │ │ ├── externalLibsTimeStamps │ │ ├── variablesAndContainers.dat │ │ └── savedIndexNames.txt │ ├── org.eclipse.m2e.logback.configuration │ │ └── 0.log │ ├── org.eclipse.core.resources │ │ ├── .root │ │ │ ├── .indexes │ │ │ │ ├── history.version │ │ │ │ ├── properties.version │ │ │ │ └── properties.index │ │ │ └── 15.tree │ │ ├── .projects │ │ │ ├── Ch02 │ │ │ │ ├── .markers │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── Servers │ │ │ │ └── .indexes │ │ │ │ │ └── b3 │ │ │ │ │ └── properties.index │ │ │ ├── Ch06 │ │ │ │ └── .indexes │ │ │ │ │ └── f4 │ │ │ │ │ └── properties.index │ │ │ └── Ch06_BattleShip │ │ │ │ ├── .markers │ │ │ │ ├── org.eclipse.jdt.core │ │ │ │ └── state.dat │ │ │ │ ├── org.eclipse.wst.jsdt.core │ │ │ │ └── state.dat │ │ │ │ └── .indexes │ │ │ │ └── 5b │ │ │ │ └── 24 │ │ │ │ └── properties.index │ │ └── .safetable │ │ │ └── org.eclipse.core.resources │ ├── org.eclipse.m2e.core │ │ ├── nexus │ │ │ ├── 26522e0d83a422eed93329ece7565cfc │ │ │ │ ├── write.lock │ │ │ │ ├── _0.cfs │ │ │ │ ├── segments_2 │ │ │ │ └── segments.gen │ │ │ ├── 51fa3e7ed0a3bc820058da18b94ad8d4 │ │ │ │ ├── write.lock │ │ │ │ ├── _0.cfs │ │ │ │ ├── segments_2 │ │ │ │ └── segments.gen │ │ │ └── 830bc118332e77292949ed1e6d2fabe0 │ │ │ │ ├── write.lock │ │ │ │ ├── _0.cfs │ │ │ │ ├── segments_2 │ │ │ │ └── segments.gen │ │ └── workspaceState.ser │ ├── org.eclipse.wst.internet.cache │ │ └── cache.xml │ ├── org.eclipse.core.runtime │ │ └── .settings │ │ │ ├── org.eclipse.ui.prefs │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ ├── org.eclipse.pde.api.tools.prefs │ │ │ ├── org.eclipse.wst.jsdt.web.core.prefs │ │ │ ├── org.jboss.tools.runtime.ui.prefs │ │ │ ├── org.eclipse.team.cvs.ui.prefs │ │ │ ├── org.eclipse.jst.j2ee.webservice.ui.prefs │ │ │ ├── org.eclipse.mylyn.context.core.prefs │ │ │ ├── org.eclipse.pde.core.prefs │ │ │ ├── org.eclipse.team.ui.prefs │ │ │ ├── org.eclipse.wst.html.ui.prefs │ │ │ ├── org.eclipse.m2e.discovery.prefs │ │ │ ├── org.eclipse.mylyn.java.ui.prefs │ │ │ ├── org.eclipse.rse.ui.prefs │ │ │ ├── org.eclipse.ui.editors.prefs │ │ │ ├── org.eclipse.mylyn.monitor.ui.prefs │ │ │ ├── org.eclipse.search.prefs │ │ │ ├── org.eclipse.cdt.ui.prefs │ │ │ ├── org.eclipse.ui.ide.prefs │ │ │ ├── org.eclipse.wst.sse.ui.prefs │ │ │ ├── org.eclipse.rse.core.prefs │ │ │ ├── org.eclipse.jst.server.tomcat.core.prefs │ │ │ ├── org.eclipse.mylyn.tasks.ui.prefs │ │ │ ├── com.android.ide.eclipse.adt.prefs │ │ │ ├── org.eclipse.debug.ui.prefs │ │ │ ├── com.android.ide.eclipse.ddms.prefs │ │ │ ├── org.eclipse.wst.ws.service.policy.prefs │ │ │ ├── org.eclipse.wst.server.core.prefs │ │ │ ├── org.eclipse.jdt.launching.prefs │ │ │ ├── org.eclipse.debug.core.prefs │ │ │ └── org.eclipse.cdt.debug.core.prefs │ ├── org.eclipse.pde.core │ │ └── .cache │ │ │ └── clean-cache.properties │ ├── org.eclipse.ltk.core.refactoring │ │ └── .refactorings │ │ │ ├── Ch02 │ │ │ └── 2018 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.index │ │ │ │ └── refactorings.history │ │ │ ├── Ch06_BattleShip │ │ │ └── 2018 │ │ │ │ └── 4 │ │ │ │ ├── 14 │ │ │ │ ├── refactorings.index │ │ │ │ └── refactorings.history │ │ │ │ └── 15 │ │ │ │ ├── refactorings.index │ │ │ │ └── refactorings.history │ │ │ ├── .workspace │ │ │ └── 2018 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.index │ │ │ │ └── refactorings.history │ │ │ └── Ch06 │ │ │ └── 2018 │ │ │ └── 4 │ │ │ └── 14 │ │ │ └── refactorings.index │ ├── org.eclipse.wst.server.core │ │ ├── monitors.xml │ │ ├── tmp0 │ │ │ └── wtpwebapps │ │ │ │ ├── Ch06_BattleShip │ │ │ │ ├── META-INF │ │ │ │ │ └── MANIFEST.MF │ │ │ │ ├── img │ │ │ │ │ ├── bomb.png │ │ │ │ │ └── ship.png │ │ │ │ ├── WEB-INF │ │ │ │ │ ├── lib │ │ │ │ │ │ └── json-1.0.jar │ │ │ │ │ └── classes │ │ │ │ │ │ ├── ch06 │ │ │ │ │ │ ├── io │ │ │ │ │ │ │ ├── IOTools.class │ │ │ │ │ │ │ └── SysRunner.class │ │ │ │ │ │ └── ws │ │ │ │ │ │ │ ├── WSMessages.class │ │ │ │ │ │ │ ├── WSConnector.class │ │ │ │ │ │ │ └── WSConnectionDescriptor.class │ │ │ │ │ │ └── simple │ │ │ │ │ │ ├── TestSysRunner.class │ │ │ │ │ │ └── WebTestSysRunner.class │ │ │ │ └── python │ │ │ │ │ ├── Qconfig.py │ │ │ │ │ ├── qiskit-driver.sh │ │ │ │ │ └── qbattleship-sim.py │ │ │ │ └── ROOT │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ ├── publish │ │ │ └── publish0.dat │ │ ├── publish.xml │ │ ├── tmp-data.xml │ │ └── servers.xml │ ├── org.eclipse.jdt.ui │ │ └── OpenTypeHistory.xml │ ├── org.eclipse.wst.jsdt.ui │ │ ├── OpenTypeHistory.xml │ │ └── QualifiedTypeNameHistory.xml │ ├── org.eclipse.jdt.debug.ui │ │ └── dialog_settings.xml │ ├── org.eclipse.jst.j2ee │ │ └── earLibrariesCache.index │ ├── org.eclipse.wst.sse.core │ │ └── task-tags.properties │ ├── org.eclipse.jst.j2ee.web │ │ └── webLibrariesCache.index │ ├── org.eclipse.wst.jsdt.core │ │ ├── externalLibsTimeStamps │ │ ├── indexes │ │ │ ├── 1057233527.index │ │ │ ├── 1143014137.index │ │ │ ├── 1185304157.index │ │ │ ├── 1734058339.index │ │ │ ├── 2433243561.index │ │ │ ├── 4220665475.index │ │ │ └── savedIndexNames.txt │ │ └── variablesAndContainers.dat │ ├── org.eclipse.wst.sse.ui │ │ └── dialog_settings.xml │ ├── org.eclipse.jdt.launching │ │ ├── .install.xml │ │ └── libraryInfos.xml │ ├── org.eclipse.jst.jsp.core │ │ └── taglibindex │ │ │ └── 1143014137.dat │ ├── org.eclipse.ui.editors │ │ └── dialog_settings.xml │ ├── org.eclipse.ui.ide │ │ └── dialog_settings.xml │ ├── org.eclipse.wst.jsdt.web.core │ │ └── jssearch │ │ │ ├── 1957689332.index │ │ │ └── 2766341499.index │ ├── org.eclipse.wst.xml.core │ │ └── default_catalog.xml │ ├── org.eclipse.ltk.ui.refactoring │ │ └── dialog_settings.xml │ ├── org.eclipse.jst.j2ee.ui │ │ └── dialog_settings.xml │ ├── org.eclipse.search │ │ └── dialog_settings.xml │ ├── org.eclipse.debug.core │ │ └── .launches │ │ │ ├── QuantumTunneling.launch │ │ │ ├── SysRunner.launch │ │ │ └── TestSysRunner.launch │ └── org.eclipse.ui.workbench │ │ └── dialog_settings.xml ├── version.ini └── .mylyn │ └── repositories.xml.zip ├── Ch03 ├── IBMQuantumExperience │ ├── readme..md │ ├── node_modules │ │ ├── extend │ │ │ ├── .npmignore │ │ │ ├── .eslintrc │ │ │ └── component.json │ │ ├── extsprintf │ │ │ ├── .gitmodules │ │ │ ├── .npmignore │ │ │ └── Makefile │ │ ├── isstream │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ └── isstream.js │ │ ├── qs │ │ │ ├── .eslintignore │ │ │ ├── test │ │ │ │ ├── index.js │ │ │ │ └── .eslintrc │ │ │ ├── lib │ │ │ │ ├── index.js │ │ │ │ └── formats.js │ │ │ ├── .editorconfig │ │ │ └── .eslintrc │ │ ├── delayed-stream │ │ │ ├── .npmignore │ │ │ └── Makefile │ │ ├── performance-now │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── test │ │ │ │ ├── mocha.opts │ │ │ │ └── scripts │ │ │ │ │ ├── difference.coffee │ │ │ │ │ ├── initial-value.coffee │ │ │ │ │ ├── delayed-call.coffee │ │ │ │ │ └── delayed-require.coffee │ │ │ ├── .tm_properties │ │ │ ├── src │ │ │ │ ├── index.d.ts │ │ │ │ └── performance-now.coffee │ │ │ └── lib │ │ │ │ └── performance-now.js.map │ │ ├── asn1 │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ └── lib │ │ │ │ ├── ber │ │ │ │ ├── errors.js │ │ │ │ ├── index.js │ │ │ │ └── types.js │ │ │ │ └── index.js │ │ ├── jsbn │ │ │ ├── .npmignore │ │ │ ├── example.js │ │ │ └── example.html │ │ ├── json-stringify-safe │ │ │ ├── .npmignore │ │ │ ├── test │ │ │ │ └── mocha.opts │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ └── Makefile │ │ ├── hoek │ │ │ └── .npmignore │ │ ├── sntp │ │ │ └── .npmignore │ │ ├── cryptiles │ │ │ ├── .npmignore │ │ │ └── README.md │ │ ├── tweetnacl │ │ │ ├── .npmignore │ │ │ └── AUTHORS.md │ │ ├── hawk │ │ │ ├── .npmignore │ │ │ ├── client.js │ │ │ └── lib │ │ │ │ └── index.js │ │ ├── stringstream │ │ │ ├── .travis.yml │ │ │ ├── .npmignore │ │ │ └── example.js │ │ ├── ajv │ │ │ ├── lib │ │ │ │ ├── compile │ │ │ │ │ ├── equal.js │ │ │ │ │ ├── schema_obj.js │ │ │ │ │ ├── ucs2length.js │ │ │ │ │ └── error_classes.js │ │ │ │ ├── dotjs │ │ │ │ │ └── README.md │ │ │ │ ├── dot │ │ │ │ │ ├── const.jst │ │ │ │ │ ├── _limitItems.jst │ │ │ │ │ ├── _limitLength.jst │ │ │ │ │ ├── _limitProperties.jst │ │ │ │ │ ├── pattern.jst │ │ │ │ │ ├── enum.jst │ │ │ │ │ ├── multipleOf.jst │ │ │ │ │ ├── allOf.jst │ │ │ │ │ ├── defaults.def │ │ │ │ │ └── uniqueItems.jst │ │ │ │ ├── cache.js │ │ │ │ └── refs │ │ │ │ │ └── $data.json │ │ │ ├── scripts │ │ │ │ ├── .eslintrc.yml │ │ │ │ ├── prepare-tests │ │ │ │ ├── info │ │ │ │ └── travis-gh-pages │ │ │ └── .tonic_example.js │ │ ├── aws4 │ │ │ └── .travis.yml │ │ ├── fast-json-stable-stringify │ │ │ ├── .npmignore │ │ │ ├── example │ │ │ │ ├── str.js │ │ │ │ ├── nested.js │ │ │ │ ├── key_cmp.js │ │ │ │ └── value_cmp.js │ │ │ ├── .travis.yml │ │ │ ├── test │ │ │ │ ├── cmp.js │ │ │ │ └── to-json.js │ │ │ ├── .eslintrc.yml │ │ │ └── benchmark │ │ │ │ └── index.js │ │ ├── core-util-is │ │ │ └── README.md │ │ ├── http-signature │ │ │ ├── .npmignore │ │ │ ├── .dir-locals.el │ │ │ └── lib │ │ │ │ └── index.js │ │ ├── getpass │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ └── README.md │ │ ├── safe-buffer │ │ │ └── .travis.yml │ │ ├── uuid │ │ │ ├── v3.js │ │ │ ├── v5.js │ │ │ ├── index.js │ │ │ ├── AUTHORS │ │ │ ├── lib │ │ │ │ ├── rng.js │ │ │ │ ├── md5.js │ │ │ │ ├── sha1.js │ │ │ │ └── bytesToUuid.js │ │ │ └── v4.js │ │ ├── form-data │ │ │ └── lib │ │ │ │ ├── browser.js │ │ │ │ └── populate.js │ │ ├── sshpk │ │ │ ├── .npmignore │ │ │ └── .travis.yml │ │ ├── oauth-sign │ │ │ └── README.md │ │ ├── fast-deep-equal │ │ │ └── index.d.ts │ │ ├── json-schema-traverse │ │ │ ├── spec │ │ │ │ └── .eslintrc.yml │ │ │ ├── .travis.yml │ │ │ └── .eslintrc.yml │ │ ├── tunnel-agent │ │ │ └── README.md │ │ ├── verror │ │ │ ├── .npmignore │ │ │ ├── CHANGES.md │ │ │ └── CONTRIBUTING.md │ │ ├── aws-sign2 │ │ │ └── README.md │ │ ├── ecc-jsbn │ │ │ ├── .npmignore │ │ │ ├── README.md │ │ │ └── test.js │ │ ├── asynckit │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── defer.js │ │ │ │ ├── abort.js │ │ │ │ ├── terminator.js │ │ │ │ ├── async.js │ │ │ │ ├── readable_serial.js │ │ │ │ └── readable_parallel.js │ │ │ ├── serial.js │ │ │ └── stream.js │ │ ├── forever-agent │ │ │ └── README.md │ │ ├── .bin │ │ │ ├── uuid.cmd │ │ │ ├── sshpk-conv.cmd │ │ │ ├── sshpk-sign.cmd │ │ │ ├── sshpk-verify.cmd │ │ │ ├── uuid │ │ │ ├── sshpk-conv │ │ │ ├── sshpk-sign │ │ │ └── sshpk-verify │ │ ├── mime-db │ │ │ └── index.js │ │ ├── json-schema │ │ │ ├── draft-03 │ │ │ │ ├── examples │ │ │ │ │ ├── geo │ │ │ │ │ ├── address │ │ │ │ │ └── interfaces │ │ │ │ ├── json-ref │ │ │ │ └── links │ │ │ ├── README.md │ │ │ ├── draft-00 │ │ │ │ ├── json-ref │ │ │ │ └── links │ │ │ ├── draft-01 │ │ │ │ ├── json-ref │ │ │ │ └── links │ │ │ ├── draft-02 │ │ │ │ ├── json-ref │ │ │ │ └── links │ │ │ └── draft-04 │ │ │ │ └── links │ │ ├── assert-plus │ │ │ ├── AUTHORS │ │ │ └── CHANGES.md │ │ ├── har-schema │ │ │ ├── lib │ │ │ │ ├── har.json │ │ │ │ ├── header.json │ │ │ │ ├── pageTimings.json │ │ │ │ ├── query.json │ │ │ │ ├── browser.json │ │ │ │ ├── creator.json │ │ │ │ ├── cache.json │ │ │ │ ├── content.json │ │ │ │ ├── cookie.json │ │ │ │ ├── log.json │ │ │ │ ├── index.js │ │ │ │ ├── page.json │ │ │ │ ├── timings.json │ │ │ │ ├── afterRequest.json │ │ │ │ ├── beforeRequest.json │ │ │ │ └── postData.json │ │ │ └── LICENSE │ │ ├── har-validator │ │ │ ├── lib │ │ │ │ └── error.js │ │ │ └── LICENSE │ │ ├── combined-stream │ │ │ └── lib │ │ │ │ └── defer.js │ │ ├── is-typedarray │ │ │ └── README.md │ │ └── jsprim │ │ │ └── CONTRIBUTING.md │ ├── package.json │ └── log.js ├── 3Q_GHZ_State_IdealSimulator_55mbxXqO2jQOc0 │ ├── distributionCSV.csv │ ├── parametersCustomize.txt │ └── visualIBMQASM.png ├── Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT │ ├── parametersCustomize.txt │ ├── distributionCSV.csv │ ├── visualIBMQASM.png │ └── codeIBMQASM.qasm ├── 3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al │ ├── parametersCustomize.txt │ ├── distributionCSV.csv │ ├── visualIBMQASM.png │ └── codeIBMQASM.qasm └── Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n │ ├── parametersCustomize.txt │ ├── distributionCSV.csv │ ├── visualIBMQASM.png │ └── codeIBMQASM.qasm ├── Ch06_BattleShip ├── .settings │ ├── org.eclipse.wst.jsdt.ui.superType.name │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.jdt.core.prefs │ ├── .jsdtscope │ └── org.eclipse.wst.common.component ├── WebContent │ ├── META-INF │ │ └── MANIFEST.MF │ ├── img │ │ ├── bomb.png │ │ └── ship.png │ ├── WEB-INF │ │ └── lib │ │ │ └── json-1.0.jar │ └── python │ │ ├── Qconfig.py │ │ ├── qiskit-driver.sh │ │ └── qbattleship-sim.py ├── etc │ ├── BattleShip.war │ └── test.json ├── build │ └── classes │ │ ├── ch06 │ │ ├── io │ │ │ ├── IOTools.class │ │ │ └── SysRunner.class │ │ └── ws │ │ │ ├── WSMessages.class │ │ │ ├── WSConnector.class │ │ │ └── WSConnectionDescriptor.class │ │ └── simple │ │ ├── TestSysRunner.class │ │ └── WebTestSysRunner.class ├── src │ └── ch06 │ │ └── ws │ │ ├── WSConnectionDescriptor.java │ │ └── WSMessages.java └── .classpath ├── .gitattributes ├── Ch05 ├── ent.exe ├── Teleport-1_IdealSimulator.tar ├── p05-teleport.asm └── qrnd-stdout.txt ├── Ch07 ├── ms11.png ├── ms12.png ├── ms23.png ├── cfcn-4f-2.png └── cfcn-8f-6.png ├── 9781484242179.jpg ├── Ch06 ├── battleship │ ├── etc │ │ ├── ui-1.png │ │ ├── ui-2.png │ │ ├── debug_error.png │ │ └── http-response.txt │ ├── img │ │ ├── bomb.png │ │ └── ship.png │ ├── __pycache__ │ │ └── Qconfig.cpython-36.pyc │ ├── cgi-bin │ │ ├── __pycache__ │ │ │ └── Qconfig.cpython-36.pyc │ │ ├── Qconfig.py │ │ └── qiskit-driver.sh │ ├── Qconfig.py │ └── js │ │ └── notify.js └── .project ├── Ch04 ├── p04-01.qasm ├── qiskit-simulator │ ├── Makefile │ ├── src │ │ └── third-party │ │ │ ├── win32 │ │ │ └── lib │ │ │ │ ├── libblas.lib │ │ │ │ ├── liblapack.lib │ │ │ │ └── liblapacke.lib │ │ │ └── win64 │ │ │ ├── dll │ │ │ ├── libblas.dll │ │ │ ├── libgomp-1.dll │ │ │ ├── liblapack.dll │ │ │ ├── libgcc_s_sjlj-1.dll │ │ │ ├── libgfortran_64-3.dll │ │ │ ├── libquadmath_64-0.dll │ │ │ └── libwinpthread-1.dll │ │ │ └── lib │ │ │ ├── libblas.lib │ │ │ ├── liblapack.lib │ │ │ └── liblapacke.lib │ ├── qiskit-simulator │ │ ├── x64 │ │ │ └── Debug │ │ │ │ ├── libblas.dll │ │ │ │ ├── liblapack.dll │ │ │ │ ├── libgfortran_64-3.dll │ │ │ │ ├── libquadmath_64-0.dll │ │ │ │ └── qiskit_simulator.exe │ │ └── qiskit-simulator │ │ │ ├── stdafx.h │ │ │ ├── targetver.h │ │ │ ├── qiskit-simulator.aps │ │ │ ├── qiskit-simulator.rc │ │ │ ├── Debug │ │ │ └── qiskit-simulator.res │ │ │ ├── qiskit-simulator.vcxproj.user │ │ │ └── resource.h │ └── test │ │ └── inputs │ │ ├── save_command.json │ │ └── clifford_save_command.json ├── __pycache__ │ └── Qconfig.cpython-36.pyc ├── p04-01-result.json └── p04-01.obj ├── Ch02 ├── bin │ └── ch02 │ │ └── QuantumTunneling.class ├── .classpath ├── .project └── .settings │ └── org.eclipse.jdt.core.prefs ├── Config ├── __pycache__ │ └── Qconfig.cpython-36.pyc └── Qconfig.py ├── Servers ├── .settings │ └── org.eclipse.wst.server.core.prefs └── .project ├── RemoteSystemsTempFiles └── .project ├── errata.md ├── README.md └── Contributing.md /.metadata/.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/readme..md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.rse.ui/.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.rse.core/.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/version.ini: -------------------------------------------------------------------------------- 1 | org.eclipse.core.runtime=1 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.cdt.make.core/specs.c: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt: -------------------------------------------------------------------------------- 1 | java -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extend/.npmignore: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extsprintf/.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/isstream/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/delayed-stream/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/jsbn/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-stringify-safe/.npmignore: -------------------------------------------------------------------------------- 1 | /*.tgz 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extsprintf/.npmignore: -------------------------------------------------------------------------------- 1 | /deps 2 | /examples 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/hoek/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/sntp/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/write.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/cryptiles/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /Ch05/ent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch05/ent.exe -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /Ch07/ms11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch07/ms11.png -------------------------------------------------------------------------------- /Ch07/ms12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch07/ms12.png -------------------------------------------------------------------------------- /Ch07/ms23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch07/ms23.png -------------------------------------------------------------------------------- /9781484242179.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/9781484242179.jpg -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_IdealSimulator_55mbxXqO2jQOc0/distributionCSV.csv: -------------------------------------------------------------------------------- 1 | "c[3]","n" 2 | "000",44 3 | "111",56 4 | -------------------------------------------------------------------------------- /Ch07/cfcn-4f-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch07/cfcn-4f-2.png -------------------------------------------------------------------------------- /Ch07/cfcn-8f-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch07/cfcn-8f-6.png -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-stringify-safe/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive 2 | --require must 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/tweetnacl/.npmignore: -------------------------------------------------------------------------------- 1 | .eslintrc 2 | .travis.yml 3 | bower.json 4 | test 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/hawk/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !dist/** 4 | !client.js 5 | !.npmignore 6 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.rse.core/initializerMarks/org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.internet.cache/cache.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_IdealSimulator_55mbxXqO2jQOc0/parametersCustomize.txt: -------------------------------------------------------------------------------- 1 | // Execution Parameters 2 | seed: 2369738583 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/stringstream/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | showIntro=false 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties: -------------------------------------------------------------------------------- 1 | #Cached timestamps 2 | #Sun Apr 08 21:07:10 EDT 2018 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/hawk/client.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./dist/browser'); 4 | -------------------------------------------------------------------------------- /Ch06/battleship/etc/ui-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/etc/ui-1.png -------------------------------------------------------------------------------- /Ch06/battleship/etc/ui-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/etc/ui-2.png -------------------------------------------------------------------------------- /Ch06/battleship/img/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/img/bomb.png -------------------------------------------------------------------------------- /Ch06/battleship/img/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/img/ship.png -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch02/2018/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1522703612510 Delete element 2 | -------------------------------------------------------------------------------- /Ch03/Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT/parametersCustomize.txt: -------------------------------------------------------------------------------- 1 | // Execution Parameters 2 | seed: 552654459 3 | -------------------------------------------------------------------------------- /Ch04/p04-01.qasm: -------------------------------------------------------------------------------- 1 | OPENQASM 2.0; 2 | include "qelib1.inc"; 3 | qreg qr[1]; 4 | creg cr[1]; 5 | x qr[0]; 6 | measure qr[0] -> cr[0]; 7 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | version=1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/monitors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al/parametersCustomize.txt: -------------------------------------------------------------------------------- 1 | // Execution Parameters 2 | seed: 1756465372 3 | -------------------------------------------------------------------------------- /Ch03/Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n/parametersCustomize.txt: -------------------------------------------------------------------------------- 1 | // Execution Parameters 2 | seed: 1648820111 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/compile/equal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('fast-deep-equal'); 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/scripts/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-console: 0 3 | no-empty: [2, allowEmptyCatch: true] 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/aws4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "4.2" 6 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .nyc_output/ 3 | coverage/ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/Makefile: -------------------------------------------------------------------------------- 1 | .SUFFIXES:.cc .o .c 2 | 3 | all: sim 4 | 5 | sim: 6 | make -C src 7 | 8 | clean: 9 | make -C src clean -------------------------------------------------------------------------------- /Ch05/Teleport-1_IdealSimulator.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch05/Teleport-1_IdealSimulator.tar -------------------------------------------------------------------------------- /Ch06_BattleShip/etc/BattleShip.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/etc/BattleShip.war -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.pde.api.tools.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | knownEEFragments= 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.jsdt.web.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | jspIndexState=1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.jboss.tools.runtime.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | firstStart=false 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch06_BattleShip/2018/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1522944027679 Delete element 2 | -------------------------------------------------------------------------------- /Ch02/bin/ch02/QuantumTunneling.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch02/bin/ch02/QuantumTunneling.class -------------------------------------------------------------------------------- /Ch03/Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n/distributionCSV.csv: -------------------------------------------------------------------------------- 1 | "c[2]","n" 2 | "11",42 3 | "10",5 4 | "00",49 5 | "01",4 6 | -------------------------------------------------------------------------------- /Ch03/Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT/distributionCSV.csv: -------------------------------------------------------------------------------- 1 | "c[2]","n" 2 | "11",39 3 | "10",6 4 | "00",46 5 | "01",9 6 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/http-signature/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools -------------------------------------------------------------------------------- /Ch06/battleship/etc/debug_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/etc/debug_error.png -------------------------------------------------------------------------------- /.metadata/.mylyn/repositories.xml.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.mylyn/repositories.xml.zip -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | pref_first_startup=false 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.ui/OpenTypeHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/delayed-stream/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | .PHONY: test 7 | 8 | -------------------------------------------------------------------------------- /Ch04/__pycache__/Qconfig.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/__pycache__/Qconfig.cpython-36.pyc -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/img/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/WebContent/img/bomb.png -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/img/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/WebContent/img/ship.png -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch06_BattleShip/2018/4/15/refactorings.index: -------------------------------------------------------------------------------- 1 | 1523217704115 Move compilation unit 2 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al/distributionCSV.csv: -------------------------------------------------------------------------------- 1 | "c[3]","n" 2 | "011",34 3 | "101",23 4 | "110",23 5 | "000",20 6 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/getpass/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools 8 | coverage 9 | -------------------------------------------------------------------------------- /Config/__pycache__/Qconfig.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Config/__pycache__/Qconfig.cpython-36.pyc -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.j2ee.webservice.ui.prefs: -------------------------------------------------------------------------------- 1 | areThereWebServices=false 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | mylyn.attention.migrated=true 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.pde.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | platform_path=C\:\\Temp\\eclipse-KEPLER 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.team.ui.first_time=false 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | - "6" 5 | - "4" 6 | - "0.12" 7 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.html.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | newFileTemplateName=New HTML File (5) 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.ui/QualifiedTypeNameHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.m2e.discovery.pref.projects= 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.java.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.mylyn.java.ui.run.count.3_1_0=1 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require coffee-script/register 2 | --compilers coffee:coffee-script/register 3 | --reporter spec -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./parse'); 4 | 5 | require('./stringify'); 6 | 7 | require('./utils'); 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/safe-buffer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'node' 4 | - '5' 5 | - '4' 6 | - '0.12' 7 | - '0.10' 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/v3.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var md5 = require('./lib/md5'); 3 | 4 | module.exports = v35('v3', 0x30, md5); -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1522851383451 Delete resource 'Ch06/battleship/NewFile.html' 2 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/form-data/lib/browser.js: -------------------------------------------------------------------------------- 1 | /* eslint-env browser */ 2 | module.exports = typeof self == 'object' ? self.FormData : window.FormData; 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/jsbn/example.js: -------------------------------------------------------------------------------- 1 | var BigInteger = require('./'); 2 | var a = new BigInteger('91823918239182398123'); 3 | console.log(a.bitLength()); -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/sshpk/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools 8 | coverage 9 | man/src 10 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/v5.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var sha1 = require('./lib/sha1'); 3 | module.exports = v35('v5', 0x50, sha1); 4 | -------------------------------------------------------------------------------- /Ch06/battleship/__pycache__/Qconfig.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/__pycache__/Qconfig.cpython-36.pyc -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/WEB-INF/lib/json-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/WebContent/WEB-INF/lib/json-1.0.jar -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/ch06/io/IOTools.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/ch06/io/IOTools.class -------------------------------------------------------------------------------- /Servers/.settings/org.eclipse.wst.server.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Apr 05 10:44:55 EDT 2018 2 | org.eclipse.wst.server.core.isServerProject=true 3 | eclipse.preferences.version=1 4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.rse.preferences.order.connections=VLADS5014.Local 3 | -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/ch06/io/SysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/ch06/io/SysRunner.class -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/ch06/ws/WSMessages.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/ch06/ws/WSMessages.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | lineNumberRuler=true 3 | overviewRuler_migration=migrated_3.1 4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1075156909.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1075156909.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1143014137.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1143014137.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1144188029.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1144188029.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1262622903.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1262622903.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/135936188.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/135936188.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1435321767.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1435321767.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1485044014.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1485044014.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1820024274.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1820024274.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1965301315.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/1965301315.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2082571954.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2082571954.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2144648300.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2144648300.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/221979875.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/221979875.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2265412338.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2265412338.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2302811751.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2302811751.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2387712100.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2387712100.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2687790720.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2687790720.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2699899854.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2699899854.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2706502329.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2706502329.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2708239607.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2708239607.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2993303256.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/2993303256.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3015671029.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3015671029.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3108731229.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3108731229.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3129927180.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3129927180.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3256372620.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3256372620.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3267748049.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3267748049.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3521617142.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3521617142.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3626931047.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3626931047.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3710613527.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3710613527.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3811958767.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3811958767.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/384216248.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/384216248.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3893835914.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/3893835914.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/4018706093.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/4018706093.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/4149142647.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/4149142647.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/465581470.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/465581470.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/620286925.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/620286925.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/643015801.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/643015801.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/683184654.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/683184654.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/728132027.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/728132027.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/739078005.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/739078005.index -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/oauth-sign/README.md: -------------------------------------------------------------------------------- 1 | oauth-sign 2 | ========== 3 | 4 | OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/ch06/ws/WSConnector.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/ch06/ws/WSConnector.class -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/simple/TestSysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/simple/TestSysRunner.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/15.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.root/15.tree -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-deep-equal/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'fast-deep-equal' { 2 | const equal: (a: any, b: any) => boolean; 3 | export = equal; 4 | } 5 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win32/lib/libblas.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win32/lib/libblas.lib -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libblas.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libblas.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/lib/libblas.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/lib/libblas.lib -------------------------------------------------------------------------------- /Ch06/battleship/cgi-bin/__pycache__/Qconfig.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06/battleship/cgi-bin/__pycache__/Qconfig.cpython-36.pyc -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/simple/WebTestSysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/simple/WebTestSysRunner.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/example/str.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | var obj = { c: 6, b: [4,5], a: 3 }; 3 | console.log(stringify(obj)); 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema-traverse/spec/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | parserOptions: 2 | ecmaVersion: 6 3 | globals: 4 | beforeEach: false 5 | describe: false 6 | it: false 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/tunnel-agent/README.md: -------------------------------------------------------------------------------- 1 | tunnel-agent 2 | ============ 3 | 4 | HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/verror/.npmignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .gitmodules 3 | deps 4 | examples 5 | experiments 6 | jsl.node.conf 7 | Makefile 8 | Makefile.targ 9 | test 10 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libblas.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libblas.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win32/lib/liblapack.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win32/lib/liblapack.lib -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libgomp-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libgomp-1.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/liblapack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/liblapack.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/lib/liblapack.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/lib/liblapack.lib -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.search.defaultPerspective=org.eclipse.search.defaultPerspective.none 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jst.j2ee/earLibrariesCache.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jst.j2ee/earLibrariesCache.index -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/stdafx.h -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/liblapack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/liblapack.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win32/lib/liblapacke.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win32/lib/liblapacke.lib -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/lib/liblapacke.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/lib/liblapacke.lib -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.sse.core/task-tags.properties: -------------------------------------------------------------------------------- 1 | # 2 | #Thu Apr 05 15:29:55 EDT 2018 3 | task-tag-projects-already-scanned=RemoteSystemsTempFiles,Servers,Ch02,Ch06,Ch06_BattleShip 4 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_IdealSimulator_55mbxXqO2jQOc0/visualIBMQASM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch03/3Q_GHZ_State_IdealSimulator_55mbxXqO2jQOc0/visualIBMQASM.png -------------------------------------------------------------------------------- /Ch06_BattleShip/build/classes/ch06/ws/WSConnectionDescriptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch06_BattleShip/build/classes/ch06/ws/WSConnectionDescriptor.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch02/.markers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.projects/Ch02/.markers -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jst.j2ee.web/webLibrariesCache.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jst.j2ee.web/webLibrariesCache.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1057233527.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1057233527.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1143014137.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1143014137.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1185304157.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1185304157.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1734058339.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/1734058339.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/2433243561.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/2433243561.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/4220665475.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/4220665475.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/publish/publish0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/publish/publish0.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.sse.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/aws-sign2/README.md: -------------------------------------------------------------------------------- 1 | aws-sign 2 | ======== 3 | 4 | AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/example/nested.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 3 | console.log(stringify(obj)); 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/index.js: -------------------------------------------------------------------------------- 1 | var v1 = require('./v1'); 2 | var v4 = require('./v4'); 3 | 4 | var uuid = v4; 5 | uuid.v1 = v1; 6 | uuid.v4 = v4; 7 | 8 | module.exports = uuid; 9 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/targetver.h -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libgfortran_64-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libgfortran_64-3.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libquadmath_64-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/libquadmath_64-0.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/qiskit_simulator.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/x64/Debug/qiskit_simulator.exe -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libgcc_s_sjlj-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libgcc_s_sjlj-1.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libgfortran_64-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libgfortran_64-3.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libquadmath_64-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libquadmath_64-0.dll -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/src/third-party/win64/dll/libwinpthread-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/src/third-party/win64/dll/libwinpthread-1.dll -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | spelling_locale_initialized=true 3 | useAnnotationsPrefPage=true 4 | useQuickDiffPrefPage=true 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.launching/.install.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jst.jsp.core/taglibindex/1143014137.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.jst.jsp.core/taglibindex/1143014137.dat -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema-traverse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "7" 6 | - "8" 7 | after_script: 8 | - coveralls < coverage/lcov.info 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Servers/.indexes/b3/properties.index: -------------------------------------------------------------------------------- 1 | 2/Tomcat v7.0 Server at localhost-config/server.xmlcom.android.ide.eclipse.adtCommonXmlEditor_current_page0 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.web.core/jssearch/1957689332.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.web.core/jssearch/1957689332.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.web.core/jssearch/2766341499.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.jsdt.web.core/jssearch/2766341499.index -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "7" 6 | - "8" 7 | after_script: 8 | - coveralls < coverage/lcov.info 9 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/getpass/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5.10" 4 | - "4.4" 5 | - "4.1" 6 | - "0.12" 7 | - "0.10" 8 | before_install: 9 | - "make check" 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs: -------------------------------------------------------------------------------- 1 | PROBLEMS_FILTERS_MIGRATE=true 2 | eclipse.preferences.version=1 3 | platformState=1535551554975 4 | quickStart=true 5 | tipsAndTricks=true 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.sse.ui.prefs: -------------------------------------------------------------------------------- 1 | content_assist_number_of_computers=18 2 | eclipse.preferences.version=1 3 | useAnnotationsPrefPage=true 4 | useQuickDiffPrefPage=true 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dotjs/README.md: -------------------------------------------------------------------------------- 1 | These files are compiled dot templates from dot folder. 2 | 3 | Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. 4 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/qiskit-simulator.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/qiskit-simulator.aps -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/qiskit-simulator.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/qiskit-simulator.rc -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.rse.systemtype.local.systemType.defaultUserId=VSilva 3 | useridperkey=VLADS5014.Local\=VSilva; 4 | -------------------------------------------------------------------------------- /Ch03/Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n/visualIBMQASM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch03/Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n/visualIBMQASM.png -------------------------------------------------------------------------------- /Ch03/Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT/visualIBMQASM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch03/Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT/visualIBMQASM.png -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06/.indexes/f4/properties.index: -------------------------------------------------------------------------------- 1 | /battleship/BattleShip.py7org.eclipse.ui.internal.registry.ResourceEditorRegistryEditorProperty org.eclipse.ui.DefaultTextEditor -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/.markers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/.markers -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/publish.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al/visualIBMQASM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch03/3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al/visualIBMQASM.png -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ecc-jsbn/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | npm-debug.log 15 | node_modules 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/stringstream/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | node_modules 15 | npm-debug.log -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | { 3 | parallel : require('./parallel.js'), 4 | serial : require('./serial.js'), 5 | serialOrdered : require('./serialOrdered.js') 6 | }; 7 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/Debug/qiskit-simulator.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/Debug/qiskit-simulator.res -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.server.tomcat.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | locationorg.eclipse.jst.server.tomcat.runtime.70=C\:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.mylyn.tasks.ui.filters.nonmatching=true 3 | org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true 4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/_0.cfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/_0.cfs -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/_0.cfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/_0.cfs -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/_0.cfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/_0.cfs -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/forever-agent/README.md: -------------------------------------------------------------------------------- 1 | forever-agent 2 | ============= 3 | 4 | HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/AUTHORS: -------------------------------------------------------------------------------- 1 | Robert Kieffer 2 | Christoph Tavan 3 | AJ ONeal 4 | Vincent Voyer 5 | Roman Shtylman 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments_2 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/segments_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/segments_2 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments_2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments_2 -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/uuid.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\uuid\bin\uuid" %* 7 | ) -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/compile/schema_obj.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var util = require('./util'); 4 | 5 | module.exports = SchemaObject; 6 | 7 | function SchemaObject(obj) { 8 | util.copy(obj, this); 9 | } 10 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch02/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.projects/Ch02/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments.gen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments.gen -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/segments.gen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/51fa3e7ed0a3bc820058da18b94ad8d4/segments.gen -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments.gen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments.gen -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/img/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/img/bomb.png -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/img/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/img/ship.png -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vlads5014_496/node.properties: -------------------------------------------------------------------------------- 1 | # RSE DOM Node 2 | 00-name=VLADS5014 3 | 01-type=Profile 4 | 03-attr.defaultPrivate=true 5 | 03-attr.isActive=true 6 | 05-ref.00000=FP.local.files_0 7 | 05-ref.00001=H.local_16 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp-data.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-conv.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-conv" %* 7 | ) -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-sign.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-sign" %* 7 | ) -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/http-signature/.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((nil . ((indent-tabs-mode . nil) 2 | (tab-width . 8) 3 | (fill-column . 80))) 4 | (js-mode . ((js-indent-level . 2) 5 | (indent-tabs-mode . nil) 6 | ))) -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-03/examples/geo: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "A geographical coordinate", 3 | "type" : "object", 4 | "properties" : { 5 | "latitude" : { "type" : "number" }, 6 | "longitude" : { "type" : "number" } 7 | } 8 | } -------------------------------------------------------------------------------- /Ch06/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ch06 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-verify.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-verify" %* 7 | ) -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/isstream/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | branches: 7 | only: 8 | - master 9 | notifications: 10 | email: 11 | - rod@vagg.org 12 | script: npm test 13 | -------------------------------------------------------------------------------- /Servers/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Servers 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/lib/json-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/lib/json-1.0.jar -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/org.eclipse.wst.jsdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/org.eclipse.wst.jsdt.core/state.dat -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/.tm_properties: -------------------------------------------------------------------------------- 1 | excludeDirectories = "{.git,node_modules}" 2 | excludeInFolderSearch = "{excludeDirectories,lib}" 3 | 4 | includeFiles = "{.gitignore,.npmignore,.travis.yml}" 5 | 6 | [ attr.untitled ] 7 | fileType = 'source.coffee' -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/test/scripts/difference.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | # Expected output is above 0.005 and below 0.07. 4 | 5 | now = require('../../lib/performance-now') 6 | console.log -(now() - now()).toFixed 3 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/example/key_cmp.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | 3 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 4 | var s = stringify(obj, function (a, b) { 5 | return a.key < b.key ? 1 : -1; 6 | }); 7 | console.log(s); 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/form-data/lib/populate.js: -------------------------------------------------------------------------------- 1 | // populates missing values 2 | module.exports = function(dst, src) { 3 | 4 | Object.keys(src).forEach(function(prop) 5 | { 6 | dst[prop] = dst[prop] || src[prop]; 7 | }); 8 | 9 | return dst; 10 | }; 11 | -------------------------------------------------------------------------------- /Config/Qconfig.py: -------------------------------------------------------------------------------- 1 | APItoken = 'YOU-TOKEN' 2 | 3 | config = { 4 | 'url': 'https://quantumexperience.ng.bluemix.net/api', 5 | # The following should only be needed for IBM Q users. 6 | 'hub': 'MY_HUB', 7 | 'group': 'MY_GROUP', 8 | 'project': 'MY_PROJECT' 9 | } 10 | 11 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/io/IOTools.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/io/IOTools.class -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/assert-plus/AUTHORS: -------------------------------------------------------------------------------- 1 | Dave Eddy 2 | Fred Kuo 3 | Lars-Magnus Skog 4 | Mark Cavage 5 | Patrick Mooney 6 | Rob Gulewich 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/example/value_cmp.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | 3 | var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; 4 | var s = stringify(obj, function (a, b) { 5 | return a.value < b.value ? 1 : -1; 6 | }); 7 | console.log(s); 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/sshpk/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5.10" 4 | - "4.4" 5 | - "4.1" 6 | - "0.12" 7 | - "0.10" 8 | before_install: 9 | - "make check" 10 | after_success: 11 | - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/io/SysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/io/SysRunner.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSMessages.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSMessages.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.adt.prefs: -------------------------------------------------------------------------------- 1 | com.android.ide.eclipse.adt.fixLegacyEditors=1 2 | com.android.ide.eclipse.adt.sdk=C\:\\eclipse-SDK\\adt-bundle-windows-x86-20140321\\sdk 3 | com.android.ide.eclipse.adt.xmlEditor=true 4 | eclipse.preferences.version=1 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch06/2018/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1522761071476 Move 1 resources to 'battleship' 2 | 1522761188394 Move 1 resources to 'battleship' 3 | 1522761696802 Rename resource 'battleship.html' 4 | 1522960151503 Copy folders 5 | 1522960159702 Copy file 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSConnector.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSConnector.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/simple/TestSysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/simple/TestSysRunner.class -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/jsbn/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch06/battleship/Qconfig.py: -------------------------------------------------------------------------------- 1 | APItoken = 'API-TOKEN' 2 | 3 | 4 | config = { 5 | 'url': 'https://quantumexperience.ng.bluemix.net/api', 6 | # The following should only be needed for IBM Q users. 7 | 'hub': 'MY_HUB', 8 | 'group': 'MY_GROUP', 9 | 'project': 'MY_PROJECT' 10 | } 11 | 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/simple/WebTestSysRunner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/simple/WebTestSysRunner.class -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/indexes/savedIndexNames.txt: -------------------------------------------------------------------------------- 1 | INDEX VERSION 1.3+C:\Users\vsilva\Documents\Books\Quantum\Workspace\.metadata\.plugins\org.eclipse.wst.jsdt.core\indexes 2 | 1057233527.index 3 | 1185304157.index 4 | 1734058339.index 5 | 1143014137.index 6 | 2433243561.index 7 | 4220665475.index 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/src/index.d.ts: -------------------------------------------------------------------------------- 1 | // This file describes the package to typescript. 2 | 3 | /** 4 | * Returns the number of milliseconds since the page was loaded (if browser) 5 | * or the node process was started. 6 | */ 7 | declare function now(): number; 8 | export = now; 9 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringify = require('./stringify'); 4 | var parse = require('./parse'); 5 | var formats = require('./formats'); 6 | 7 | module.exports = { 8 | formats: formats, 9 | parse: parse, 10 | stringify: stringify 11 | }; 12 | -------------------------------------------------------------------------------- /Ch06/battleship/cgi-bin/Qconfig.py: -------------------------------------------------------------------------------- 1 | APItoken = 'API-TOKEN' 2 | 3 | 4 | config = { 5 | 'url': 'https://quantumexperience.ng.bluemix.net/api', 6 | # The following should only be needed for IBM Q users. 7 | 'hub': 'MY_HUB', 8 | 'group': 'MY_GROUP', 9 | 'project': 'MY_PROJECT' 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/har.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "har.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "log" 7 | ], 8 | "properties": { 9 | "log": { 10 | "$ref": "log.json#" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSConnectionDescriptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/practical-quantum-computing/HEAD/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/WEB-INF/classes/ch06/ws/WSConnectionDescriptor.class -------------------------------------------------------------------------------- /Ch03/Bell_State_ZW-Measurement_IdealSimulator_61H2TRfjHI2qyT/codeIBMQASM.qasm: -------------------------------------------------------------------------------- 1 | //OPENQASM 2.0 2 | IBMQASM 2.0; 3 | 4 | include "qelib1.inc"; 5 | 6 | qreg q[2]; 7 | creg c[2]; 8 | 9 | h q[0]; 10 | cx q[0],q[1]; 11 | s q[1]; 12 | h q[1]; 13 | t q[1]; 14 | h q[1]; 15 | measure q[0] -> c[0]; 16 | measure q[1] -> c[1]; 17 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/lib/rng.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In node.js 2 | // this is pretty straight-forward - we use the crypto API. 3 | 4 | var crypto = require('crypto'); 5 | 6 | module.exports = function nodeRNG() { 7 | return crypto.randomBytes(16); 8 | }; 9 | -------------------------------------------------------------------------------- /Ch06/battleship/etc/http-response.txt: -------------------------------------------------------------------------------- 1 | { 2 | "status": 200, 3 | "message": "Ship Pos: [[0, 1, 2], [2, 3, 4]] Bomb counts: [[1, 0, 0, 0, 0], [1, 0, 0, 0, 0]]
Device: local_qasm_simulator Shots:1024
Damage: [[1.0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
", 4 | "damage": [ 5 | [1, 0, 0, 0, 0], 6 | [0, 0, 0, 0, 0] 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/python/Qconfig.py: -------------------------------------------------------------------------------- 1 | APItoken = 'API-TOKEN' 2 | 3 | 4 | config = { 5 | 'url': 'https://quantumexperience.ng.bluemix.net/api', 6 | # The following should only be needed for IBM Q users. 7 | 'hub': 'MY_HUB', 8 | 'group': 'MY_GROUP', 9 | 'project': 'MY_PROJECT' 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Ch02/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/scripts/prepare-tests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | mkdir -p .browser 6 | 7 | find spec -type f -name '*.spec.js' | \ 8 | xargs -I {} sh -c \ 9 | 'export f="{}"; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");' 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.xml.core/default_catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Ch03/Bell_State_XW-Measurement_IdealSimulator_65hzRHL77u0C5n/codeIBMQASM.qasm: -------------------------------------------------------------------------------- 1 | //OPENQASM 2.0 2 | IBMQASM 2.0; 3 | 4 | include "qelib1.inc"; 5 | 6 | qreg q[2]; 7 | creg c[2]; 8 | 9 | h q[0]; 10 | cx q[0],q[1]; 11 | h q[0]; 12 | s q[1]; 13 | h q[1]; 14 | t q[1]; 15 | h q[1]; 16 | measure q[0] -> c[0]; 17 | measure q[1] -> c[1]; 18 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/Ch06_BattleShip/.indexes/5b/24/properties.index: -------------------------------------------------------------------------------- 1 | #/WebContent/python/qiskit-driver.sh7org.eclipse.ui.internal.registry.ResourceEditorRegistryEditorProperty org.eclipse.ui.DefaultTextEditor%/WebContent/python/qbattleship-sim.pyEditorProperty org.eclipse.ui.DefaultTextEditor -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n 3 | preferredDetailPanes=DefaultDetailPane\:DefaultDetailPane| 4 | preferredTargets=default\:default| 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.ddms.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | logcat.view.colsize.Application=143 3 | logcat.view.colsize.Level=29 4 | logcat.view.colsize.PID=50 5 | logcat.view.colsize.TID=50 6 | logcat.view.colsize.Tag=107 7 | logcat.view.colsize.Text=543 8 | logcat.view.colsize.Time=130 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | /org.eclipse.core.resourcescontentCacheState2contentCacheTimestamp 1535551554975org.eclipse.jdt.corestateVersionNumber27org.eclipse.jst.jsp.core+org.eclipse.jst.jsp.core.taglib.TaglibIndexCLEANorg.eclipse.wst.jsdt.corestateVersionNumber21 -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/lib/ber/errors.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | 4 | module.exports = { 5 | 6 | newInvalidAsn1Error: function(msg) { 7 | var e = new Error(); 8 | e.name = 'InvalidAsn1Error'; 9 | e.message = msg || ''; 10 | return e; 11 | } 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /Ch05/p05-teleport.asm: -------------------------------------------------------------------------------- 1 | include "qelib1.inc"; 2 | qreg q[3]; 3 | creg c0[1]; 4 | creg c1[1]; 5 | creg c2[1]; 6 | h q[1]; 7 | cx q[1],q[2]; 8 | ry(0.785398163397448) q[0]; 9 | cx q[0],q[1]; 10 | h q[0]; 11 | barrier q[0],q[1],q[2]; 12 | measure q[0] -> c0[0]; 13 | measure q[1] -> c1[0]; 14 | if(c0==1) z q[2]; 15 | if(c1==1) x q[2]; 16 | measure q[2] -> c2[0]; -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ROOT/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /RemoteSystemsTempFiles/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RemoteSystemsTempFiles 4 | 5 | 6 | 7 | 8 | 9 | 10 | org.eclipse.rse.ui.remoteSystemsTempNature 11 | 12 | 13 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.ws.service.policy.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.wst.ws.service.policy.ui.servicepols.wsiprofilecomp.wsiap.defaultProtocol=http\://schemas.xmlsoap.org/wsdl/soap/ 3 | org.eclipse.wst.ws.service.policy.ui.servicepols.wsiprofilecomp.wsissbp.defaultProtocol=http\://schemas.xmlsoap.org/wsdl/soap/ 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/const.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{? !$isData }} 7 | var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; 8 | {{?}} 9 | var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); 10 | {{# def.checkError:'const' }} 11 | {{? $breakOnError }} else { {{?}} 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/scripts/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | var fs = require('fs'); 6 | var name = process.argv[2] || '.'; 7 | var property = process.argv[3] || 'version'; 8 | if (name != '.') name = 'node_modules/' + name; 9 | var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8')); 10 | console.log(json[property]); 11 | -------------------------------------------------------------------------------- /Ch06/battleship/cgi-bin/qiskit-driver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # home dir 4 | root=/home/centos 5 | 6 | #program=qiskit-basic-test.py 7 | program=qbattleship.py 8 | 9 | # Activate python 3 10 | source $root/qiskit/qiskit/bin/activate 11 | 12 | #echo -e "Content-type: text/html\n\n" 13 | #echo "Hello, World from Bash." 14 | 15 | # execute python quantum program 16 | python $program 17 | 18 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /errata.md: -------------------------------------------------------------------------------- 1 | # Errata for *Practical Quantum Computing for Developers* 2 | 3 | On **page 75** [added citation]: 4 | 5 | The table at the top of page 75 lists the average temperature of Earth (surface temperature) as 58 degrees Celsius. The author has added the following citation to support this statistic: 6 | 7 | https://www.space.com/17816-earth-temperature.html 8 | 9 | *** 10 | 11 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../uuid/bin/uuid" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "IBMQuantumExperience", 3 | "version": "1.0.0", 4 | "description": "IBM Quantum Experience REST Client", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Vladimir Silva", 10 | "license": "ISC", 11 | "dependencies": { 12 | "request": "^2.85.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-conv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-conv" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-sign: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-sign" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/.bin/sshpk-verify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-verify" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/_limitItems.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitItems' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/_limitLength.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitLength' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/test/scripts/initial-value.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 100 and below 350. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | now = require '../../lib/performance-now' 10 | console.log now().toFixed 3 11 | -------------------------------------------------------------------------------- /Ch02/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ch02 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/_limitProperties.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitProperties' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "header.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/pageTimings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "pageTimings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "properties": { 6 | "onContentLoad": { 7 | "type": "number", 8 | "min": -1 9 | }, 10 | "onLoad": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "comment": { 15 | "type": "string" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/query.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "query.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | module-start-timeout=300000 3 | runtimes=\r\n\r\n \r\n\r\n 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/lib/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | // If you have no idea what ASN.1 or BER is, see this: 4 | // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc 5 | 6 | var Ber = require('./ber/index'); 7 | 8 | 9 | 10 | ///--- Exported API 11 | 12 | module.exports = { 13 | 14 | Ber: Ber, 15 | 16 | BerReader: Ber.Reader, 17 | 18 | BerWriter: Ber.Writer 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/README.md: -------------------------------------------------------------------------------- 1 | JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). 2 | 3 | Code is licensed under the AFL or BSD license as part of the Persevere 4 | project which is administered under the Dojo foundation, 5 | and all contributions require a Dojo CLA. -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/pattern.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ 7 | var $regexp = $isData 8 | ? '(new RegExp(' + $schemaValue + '))' 9 | : it.usePattern($schema); 10 | }} 11 | 12 | if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { 13 | {{# def.error:'pattern' }} 14 | } {{? $breakOnError }} else { {{?}} 15 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "browser.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/creator.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "creator.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "consistent-return": 2, 6 | "max-lines": 0, 7 | "max-nested-callbacks": [2, 3], 8 | "max-statements": 0, 9 | "no-buffer-constructor": 0, 10 | "no-extend-native": 0, 11 | "no-magic-numbers": 0, 12 | "object-curly-newline": 0, 13 | "sort-keys": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06_BattleShip/etc/test.json: -------------------------------------------------------------------------------- 1 | {"status": 200, "message":"['/home/centos/apache-tomcat-8.5.6/webapps/BattleShip/WEB-INF/classes/../..//python/qbattleship-sim.py', '/home/centos/apache-tomcat-8.5.6/webapps/BattleShip/WEB-INF/classes/../..//python/qbattleship-sim.py']", "damage":[[0.07947558763612506, 0.2718752773716122, 0.4991285047683087, 0.62758055548089, 0.9690984631261894], [0.2797695590216406, 0.5466411987348488, 0.15330268998140506, 0.18734101964412397, 0.7451779448087201]] } 2 | -------------------------------------------------------------------------------- /Ch03/3Q_GHZ_State_YYX-Measurement_IdealSimulator_594ccDnsX625Al/codeIBMQASM.qasm: -------------------------------------------------------------------------------- 1 | //OPENQASM 2.0 2 | IBMQASM 2.0; 3 | 4 | include "qelib1.inc"; 5 | 6 | qreg q[3]; 7 | creg c[3]; 8 | 9 | h q[0]; 10 | h q[1]; 11 | x q[2]; 12 | cx q[1],q[2]; 13 | cx q[0],q[2]; 14 | h q[0]; 15 | h q[1]; 16 | h q[2]; 17 | barrier q[0],q[1],q[2]; 18 | sdg q[0]; 19 | sdg q[1]; 20 | h q[0]; 21 | h q[1]; 22 | h q[2]; 23 | measure q[0] -> c[0]; 24 | measure q[1] -> c[1]; 25 | measure q[2] -> c[2]; 26 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ecc-jsbn/README.md: -------------------------------------------------------------------------------- 1 | ecc-jsbn 2 | ======== 3 | 4 | ECC package based on [jsbn](https://github.com/andyperlitch/jsbn) from [Tom Wu](http://www-cs-students.stanford.edu/~tjw/). 5 | 6 | This is a subset of the same interface as the [node compiled module](https://github.com/quartzjer/ecc), but works in the browser too. 7 | 8 | Also uses point compression now from [https://github.com/kaielvin](https://github.com/kaielvin/jsbn-ec-point-compression). 9 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/test/cmp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('custom comparison function', function (t) { 7 | t.plan(1); 8 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 9 | var s = stringify(obj, function (a, b) { 10 | return a.key < b.key ? 1 : -1; 11 | }); 12 | t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); 13 | }); 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 |
11 |
12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/python/Qconfig.py: -------------------------------------------------------------------------------- 1 | APItoken = 'dcd6b501ffa4b88a796bc5e526b6cf6d96479aa5616b7126938e1aca27cf6ebb3824ad07b7f3cfb4ea22b03a5b40a3fbc45c7d7c819610172ac21e2f2600213d' 2 | 3 | 4 | config = { 5 | 'url': 'https://quantumexperience.ng.bluemix.net/api', 6 | # The following should only be needed for IBM Q users. 7 | 'hub': 'MY_HUB', 8 | 'group': 'MY_GROUP', 9 | 'project': 'MY_PROJECT' 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/test/scripts/delayed-call.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 350 and below 600. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | delay = require "call-delayed" 10 | now = require "../../lib/performance-now" 11 | delay 250, -> console.log now().toFixed 3 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jst.j2ee.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/4/14/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/test/scripts/delayed-require.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 350 and below 600. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | delay = require "call-delayed" 10 | delay 250, -> 11 | now = require "../../lib/performance-now" 12 | console.log now().toFixed 3 13 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/qiskit-simulator.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(SolutionDir)\..\test\inputs\clifford_hcx.json 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/hawk/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Export sub-modules 4 | 5 | exports.error = exports.Error = require('boom'); 6 | exports.sntp = require('sntp'); 7 | 8 | exports.server = require('./server'); 9 | exports.client = require('./client'); 10 | exports.crypto = require('./crypto'); 11 | exports.utils = require('./utils'); 12 | 13 | exports.uri = { 14 | authenticate: exports.server.authenticateBewit, 15 | getBewit: exports.client.getBewit 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-validator/lib/error.js: -------------------------------------------------------------------------------- 1 | function HARError (errors) { 2 | var message = 'validation failed' 3 | 4 | this.name = 'HARError' 5 | this.message = message 6 | this.errors = errors 7 | 8 | if (typeof Error.captureStackTrace === 'function') { 9 | Error.captureStackTrace(this, this.constructor) 10 | } else { 11 | this.stack = (new Error(message)).stack 12 | } 13 | } 14 | 15 | HARError.prototype = Error.prototype 16 | 17 | module.exports = HARError 18 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/qiskit-simulator/qiskit-simulator/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by qiskit-simulator.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extend/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": [2, 15], 8 | "eqeqeq": [2, "allow-null"], 9 | "func-name-matching": [1], 10 | "max-depth": [1, 4], 11 | "max-statements": [2, 26], 12 | "no-extra-parens": [1], 13 | "no-magic-numbers": [0], 14 | "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], 15 | "sort-keys": [0], 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | module.exports = { 7 | 'default': 'RFC3986', 8 | formatters: { 9 | RFC1738: function (value) { 10 | return replace.call(value, percentTwenties, '+'); 11 | }, 12 | RFC3986: function (value) { 13 | return value; 14 | } 15 | }, 16 | RFC1738: 'RFC1738', 17 | RFC3986: 'RFC3986' 18 | }; 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_VM_XML=\r\n\r\n\r\n\r\n\r\n\r\n 3 | -------------------------------------------------------------------------------- /Ch06_BattleShip/src/ch06/ws/WSConnectionDescriptor.java: -------------------------------------------------------------------------------- 1 | package ch06.ws; 2 | 3 | import javax.websocket.Session; 4 | 5 | final class WSConnectionDescriptor { 6 | String clientId; 7 | Session session; 8 | 9 | public WSConnectionDescriptor(String clientId, /*String windowId,*/ Session session) { 10 | super(); 11 | this.clientId = clientId; 12 | this.session = session; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return String.format("%s %s", clientId, session.getRequestURI()); 18 | } 19 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/assert-plus/CHANGES.md: -------------------------------------------------------------------------------- 1 | # assert-plus Changelog 2 | 3 | ## 1.0.0 4 | 5 | - *BREAKING* assert.number (and derivatives) now accept Infinity as valid input 6 | - Add assert.finite check. Previous assert.number callers should use this if 7 | they expect Infinity inputs to throw. 8 | 9 | ## 0.2.0 10 | 11 | - Fix `assert.object(null)` so it throws 12 | - Fix optional/arrayOf exports for non-type-of asserts 13 | - Add optiona/arrayOf exports for Stream/Date/Regex/uuid 14 | - Add basic unit test coverage 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch02/2018/4/14/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/cache.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cache.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "properties": { 5 | "beforeRequest": { 6 | "oneOf": [ 7 | { "type": "null" }, 8 | { "$ref": "beforeRequest.json#" } 9 | ] 10 | }, 11 | "afterRequest": { 12 | "oneOf": [ 13 | { "type": "null" }, 14 | { "$ref": "afterRequest.json#" } 15 | ] 16 | }, 17 | "comment": { 18 | "type": "string" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.search/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 |
11 |
12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs: -------------------------------------------------------------------------------- 1 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.applicationLaunchType=org.eclipse.cdt.dsf.gdb.launch.localCLaunch,debug;org.eclipse.cdt.cdi.launch.localCLaunch,run 2 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.attachLaunchType=org.eclipse.cdt.dsf.gdb.launch.attachCLaunch,debug 3 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=org.eclipse.cdt.dsf.gdb.launch.coreCLaunch,debug 4 | eclipse.preferences.version=1 5 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/log.js: -------------------------------------------------------------------------------- 1 | var _debug = false; 2 | 3 | function LOGD( tag, txt ) { 4 | if ( _debug ) { 5 | console.log('[DBG-QX] ' + tag + ' ' + (txt ? txt : '')); 6 | } 7 | } 8 | 9 | function LOGE( tag, txt ) { 10 | console.error('[ERR-QX] ' + tag + ' ' + (txt ? txt : '')); 11 | } 12 | 13 | function buildStatus(code, text ) { 14 | return { 'code' : code, 'message': text}; 15 | } 16 | 17 | function init (debug) { 18 | _debug = debug; 19 | } 20 | 21 | exports.init = init; 22 | exports.debug = LOGD; 23 | exports.error = LOGE; 24 | exports.status = buildStatus; -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/.tonic_example.js: -------------------------------------------------------------------------------- 1 | var Ajv = require('ajv'); 2 | var ajv = new Ajv({allErrors: true}); 3 | 4 | var schema = { 5 | "properties": { 6 | "foo": { "type": "string" }, 7 | "bar": { "type": "number", "maximum": 3 } 8 | } 9 | }; 10 | 11 | var validate = ajv.compile(schema); 12 | 13 | test({"foo": "abc", "bar": 2}); 14 | test({"foo": 2, "bar": 4}); 15 | 16 | function test(data) { 17 | var valid = validate(data); 18 | if (valid) console.log('Valid!'); 19 | else console.log('Invalid: ' + ajv.errorsText(validate.errors)); 20 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/cache.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Cache = module.exports = function Cache() { 5 | this._cache = {}; 6 | }; 7 | 8 | 9 | Cache.prototype.put = function Cache_put(key, value) { 10 | this._cache[key] = value; 11 | }; 12 | 13 | 14 | Cache.prototype.get = function Cache_get(key) { 15 | return this._cache[key]; 16 | }; 17 | 18 | 19 | Cache.prototype.del = function Cache_del(key) { 20 | delete this._cache[key]; 21 | }; 22 | 23 | 24 | Cache.prototype.clear = function Cache_clear() { 25 | this._cache = {}; 26 | }; 27 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch06_BattleShip/2018/4/14/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-00/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-00/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-00/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-01/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-01/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-01/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-02/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-02/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-02/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 140 11 | 12 | [test/*] 13 | max_line_length = off 14 | 15 | [*.md] 16 | max_line_length = off 17 | 18 | [*.json] 19 | max_line_length = off 20 | 21 | [Makefile] 22 | max_line_length = off 23 | 24 | [CHANGELOG.md] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [LICENSE] 29 | indent_size = 2 30 | max_line_length = off 31 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-03/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-03/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-03/json-ref#", 4 | 5 | "additionalItems" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{id}", 11 | "rel" : "self" 12 | }, 13 | 14 | { 15 | "href" : "{$ref}", 16 | "rel" : "full" 17 | }, 18 | 19 | { 20 | "href" : "{$schema}", 21 | "rel" : "describedby" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/defer.js: -------------------------------------------------------------------------------- 1 | module.exports = defer; 2 | 3 | /** 4 | * Runs provided function on next iteration of the event loop 5 | * 6 | * @param {function} fn - function to run 7 | */ 8 | function defer(fn) 9 | { 10 | var nextTick = typeof setImmediate == 'function' 11 | ? setImmediate 12 | : ( 13 | typeof process == 'object' && typeof process.nextTick == 'function' 14 | ? process.nextTick 15 | : null 16 | ); 17 | 18 | if (nextTick) 19 | { 20 | nextTick(fn); 21 | } 22 | else 23 | { 24 | setTimeout(fn, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apress Source Code 2 | 3 | This repository accompanies [*Practical Quantum Computing for Developers*](https://www.apress.com/9781484242179) by Vladimir Silva (Apress, 2019). 4 | 5 | [comment]: #cover 6 | ![Cover image](9781484242179.jpg) 7 | 8 | Download the files as a zip using the green button, or clone the repository to your machine using Git. 9 | 10 | ## Releases 11 | 12 | Release v1.0 corresponds to the code in the published book, without corrections or updates. 13 | 14 | ## Contributions 15 | 16 | See the file Contributing.md for more information on how you can contribute to this repository. -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/combined-stream/lib/defer.js: -------------------------------------------------------------------------------- 1 | module.exports = defer; 2 | 3 | /** 4 | * Runs provided function on next iteration of the event loop 5 | * 6 | * @param {function} fn - function to run 7 | */ 8 | function defer(fn) 9 | { 10 | var nextTick = typeof setImmediate == 'function' 11 | ? setImmediate 12 | : ( 13 | typeof process == 'object' && typeof process.nextTick == 'function' 14 | ? process.nextTick 15 | : null 16 | ); 17 | 18 | if (nextTick) 19 | { 20 | nextTick(fn); 21 | } 22 | else 23 | { 24 | setTimeout(fn, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/serial.js: -------------------------------------------------------------------------------- 1 | var serialOrdered = require('./serialOrdered.js'); 2 | 3 | // Public API 4 | module.exports = serial; 5 | 6 | /** 7 | * Runs iterator over provided array elements in series 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {function} - jobs terminator 13 | */ 14 | function serial(list, iterator, callback) 15 | { 16 | return serialOrdered(list, iterator, null, callback); 17 | } 18 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/lib/ber/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | var errors = require('./errors'); 4 | var types = require('./types'); 5 | 6 | var Reader = require('./reader'); 7 | var Writer = require('./writer'); 8 | 9 | 10 | ///--- Exports 11 | 12 | module.exports = { 13 | 14 | Reader: Reader, 15 | 16 | Writer: Writer 17 | 18 | }; 19 | 20 | for (var t in types) { 21 | if (types.hasOwnProperty(t)) 22 | module.exports[t] = types[t]; 23 | } 24 | for (var e in errors) { 25 | if (errors.hasOwnProperty(e)) 26 | module.exports[e] = errors[e]; 27 | } 28 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "content.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "size", 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "size": { 11 | "type": "integer" 12 | }, 13 | "compression": { 14 | "type": "integer" 15 | }, 16 | "mimeType": { 17 | "type": "string" 18 | }, 19 | "text": { 20 | "type": "string" 21 | }, 22 | "encoding": { 23 | "type": "string" 24 | }, 25 | "comment": { 26 | "type": "string" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Ch04/p04-01-result.json: -------------------------------------------------------------------------------- 1 | { 2 | "backend": "local_qiskit_simulator", 3 | "id": "aA46vJHgnKQko3u5L1QqbUDk31sY2m", 4 | "result": [{ 5 | "data": { 6 | "counts": { 7 | "1": 1024 8 | }, 9 | "time_taken": 0.0780002 10 | }, 11 | "name": "Circuit", 12 | "seed": 123, 13 | "shots": 1024, 14 | "status": "DONE", 15 | "success": true, 16 | "threads_shot": 4 17 | }], 18 | "simulator": "qubit", 19 | "status": "COMPLETED", 20 | "success": true, 21 | "time_taken": 0.0780002 22 | } 23 | -------------------------------------------------------------------------------- /Ch02/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/refs/$data.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#", 4 | "description": "Meta-schema for $data reference (JSON-schema extension proposal)", 5 | "type": "object", 6 | "required": [ "$data" ], 7 | "properties": { 8 | "$data": { 9 | "type": "string", 10 | "anyOf": [ 11 | { "format": "relative-json-pointer" }, 12 | { "format": "json-pointer" } 13 | ] 14 | } 15 | }, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.debug.core/.launches/QuantumTunneling.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/abort.js: -------------------------------------------------------------------------------- 1 | // API 2 | module.exports = abort; 3 | 4 | /** 5 | * Aborts leftover active jobs 6 | * 7 | * @param {object} state - current state object 8 | */ 9 | function abort(state) 10 | { 11 | Object.keys(state.jobs).forEach(clean.bind(state)); 12 | 13 | // reset leftover jobs 14 | state.jobs = {}; 15 | } 16 | 17 | /** 18 | * Cleans up leftover job by invoking abort function for the provided job id 19 | * 20 | * @this state 21 | * @param {string|number} key - job id to abort 22 | */ 23 | function clean(key) 24 | { 25 | if (typeof this.jobs[key] == 'function') 26 | { 27 | this.jobs[key](); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/is-typedarray/README.md: -------------------------------------------------------------------------------- 1 | # is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) 2 | 3 | Detect whether or not an object is a 4 | [Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). 5 | 6 | ## Usage 7 | 8 | [![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) 9 | 10 | ### isTypedArray(array) 11 | 12 | Returns `true` when array is a Typed Array, and `false` when it is not. 13 | 14 | ## License 15 | 16 | MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. 17 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/verror/CHANGES.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Not yet released 4 | 5 | None yet. 6 | 7 | ## v1.10.0 8 | 9 | * #49 want convenience functions for MultiErrors 10 | 11 | ## v1.9.0 12 | 13 | * #47 could use VError.hasCauseWithName() 14 | 15 | ## v1.8.1 16 | 17 | * #39 captureStackTrace lost when inheriting from WError 18 | 19 | ## v1.8.0 20 | 21 | * #23 Preserve original stack trace(s) 22 | 23 | ## v1.7.0 24 | 25 | * #10 better support for extra properties on Errors 26 | * #11 make it easy to find causes of a particular kind 27 | * #29 No documentation on how to Install this package 28 | * #36 elide development-only files from npm package 29 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/qs/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": [2, 28], 8 | "consistent-return": 1, 9 | "func-name-matching": 0, 10 | "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], 11 | "indent": [2, 4], 12 | "max-params": [2, 12], 13 | "max-statements": [2, 45], 14 | "no-continue": 1, 15 | "no-magic-numbers": 0, 16 | "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], 17 | "operator-linebreak": [2, "before"], 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.debug.core/.launches/SysRunner.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extsprintf/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2012, Joyent, Inc. All rights reserved. 3 | # 4 | # Makefile: top-level Makefile 5 | # 6 | # This Makefile contains only repo-specific logic and uses included makefiles 7 | # to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are 8 | # used by other repos as well. 9 | # 10 | 11 | # 12 | # Files 13 | # 14 | JSL = jsl 15 | JSSTYLE = jsstyle 16 | JS_FILES := $(shell find examples lib -name '*.js') 17 | JSL_FILES_NODE = $(JS_FILES) 18 | JSSTYLE_FILES = $(JS_FILES) 19 | JSL_CONF_NODE = jsl.node.conf 20 | 21 | # Default target is "check" 22 | check: 23 | 24 | include ./Makefile.targ 25 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.debug.core/.launches/TestSysRunner.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/src/performance-now.coffee: -------------------------------------------------------------------------------- 1 | if performance? and performance.now 2 | module.exports = -> performance.now() 3 | else if process? and process.hrtime 4 | module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6 5 | hrtime = process.hrtime 6 | getNanoSeconds = -> 7 | hr = hrtime() 8 | hr[0] * 1e9 + hr[1] 9 | moduleLoadTime = getNanoSeconds() 10 | upTime = process.uptime() * 1e9 11 | nodeLoadTime = moduleLoadTime - upTime 12 | else if Date.now 13 | module.exports = -> Date.now() - loadTime 14 | loadTime = Date.now() 15 | else 16 | module.exports = -> new Date().getTime() - loadTime 17 | loadTime = new Date().getTime() 18 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/servers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/compile/ucs2length.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // https://mathiasbynens.be/notes/javascript-encoding 4 | // https://github.com/bestiejs/punycode.js - punycode.ucs2.decode 5 | module.exports = function ucs2length(str) { 6 | var length = 0 7 | , len = str.length 8 | , pos = 0 9 | , value; 10 | while (pos < len) { 11 | length++; 12 | value = str.charCodeAt(pos++); 13 | if (value >= 0xD800 && value <= 0xDBFF && pos < len) { 14 | // high surrogate, and there is a next character 15 | value = str.charCodeAt(pos); 16 | if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate 17 | } 18 | } 19 | return length; 20 | }; 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/terminator.js: -------------------------------------------------------------------------------- 1 | var abort = require('./abort.js') 2 | , async = require('./async.js') 3 | ; 4 | 5 | // API 6 | module.exports = terminator; 7 | 8 | /** 9 | * Terminates jobs in the attached state context 10 | * 11 | * @this AsyncKitState# 12 | * @param {function} callback - final callback to invoke after termination 13 | */ 14 | function terminator(callback) 15 | { 16 | if (!Object.keys(this.jobs).length) 17 | { 18 | return; 19 | } 20 | 21 | // fast forward iteration index 22 | this.index = this.size; 23 | 24 | // abort jobs 25 | abort(this); 26 | 27 | // send back results we have so far 28 | async(callback)(null, this.results); 29 | } 30 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/lib/md5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function md5(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('md5').update(bytes).digest(); 23 | } 24 | 25 | module.exports = md5; 26 | -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Apress Source Code 2 | 3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. 4 | 5 | ## How to Contribute 6 | 7 | 1. Make sure you have a GitHub account. 8 | 2. Fork the repository for the relevant book. 9 | 3. Create a new branch on which to make your change, e.g. 10 | `git checkout -b my_code_contribution` 11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. 12 | 5. Submit a pull request. 13 | 14 | Thank you for your contribution! -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/enum.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ 7 | var $i = 'i' + $lvl 8 | , $vSchema = 'schema' + $lvl; 9 | }} 10 | 11 | {{? !$isData }} 12 | var {{=$vSchema}} = validate.schema{{=$schemaPath}}; 13 | {{?}} 14 | var {{=$valid}}; 15 | 16 | {{?$isData}}{{# def.check$dataIsArray }}{{?}} 17 | 18 | {{=$valid}} = false; 19 | 20 | for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) 21 | if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { 22 | {{=$valid}} = true; 23 | break; 24 | } 25 | 26 | {{? $isData }} } {{?}} 27 | 28 | {{# def.checkError:'enum' }} 29 | 30 | {{? $breakOnError }} else { {{?}} 31 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/lib/sha1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function sha1(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('sha1').update(bytes).digest(); 23 | } 24 | 25 | module.exports = sha1; 26 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: eslint:recommended 2 | env: 3 | node: true 4 | browser: true 5 | rules: 6 | block-scoped-var: 2 7 | callback-return: 2 8 | dot-notation: 2 9 | indent: 2 10 | linebreak-style: [2, unix] 11 | new-cap: 2 12 | no-console: [2, allow: [warn, error]] 13 | no-else-return: 2 14 | no-eq-null: 2 15 | no-fallthrough: 2 16 | no-invalid-this: 2 17 | no-return-assign: 2 18 | no-shadow: 1 19 | no-trailing-spaces: 2 20 | no-use-before-define: [2, nofunc] 21 | quotes: [2, single, avoid-escape] 22 | semi: [2, always] 23 | strict: [2, global] 24 | valid-jsdoc: [2, requireReturn: false] 25 | no-control-regex: 0 26 | no-useless-escape: 2 27 | -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/python/qiskit-driver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Usage qiskit-driver.sh [QPROGRAM-PATH] 4 | # Example: qiskit-driver.sh /home/centos/public_html/cgi-bin/qiskit-basic-test.py 5 | 6 | # home of the python env (update this) 7 | root=/home/centos 8 | pythonEnv=$root/qiskit/qiskit 9 | 10 | #program=qiskit-basic-test.py 11 | #program=qbattleship.py 12 | program=$1 13 | 14 | # Activate python 3 15 | source $pythonEnv/bin/activate 16 | 17 | #echo -e "Content-type: text/html\n\n" 18 | #echo "Hello, World from Bash." 19 | 20 | # http://localhost:8080/BattleShip/TestSysRunner?p1=/home/centos/public_html/cgi-bin/qiskit-driver.sh 21 | # execute python quantum program @ /home/centos/public_html/cgi-bin/ 22 | 23 | python $program $@ 24 | 25 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/isstream/isstream.js: -------------------------------------------------------------------------------- 1 | var stream = require('stream') 2 | 3 | 4 | function isStream (obj) { 5 | return obj instanceof stream.Stream 6 | } 7 | 8 | 9 | function isReadable (obj) { 10 | return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object' 11 | } 12 | 13 | 14 | function isWritable (obj) { 15 | return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object' 16 | } 17 | 18 | 19 | function isDuplex (obj) { 20 | return isReadable(obj) && isWritable(obj) 21 | } 22 | 23 | 24 | module.exports = isStream 25 | module.exports.isReadable = isReadable 26 | module.exports.isWritable = isWritable 27 | module.exports.isDuplex = isDuplex 28 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/multipleOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | var division{{=$lvl}}; 7 | if ({{?$isData}} 8 | {{=$schemaValue}} !== undefined && ( 9 | typeof {{=$schemaValue}} != 'number' || 10 | {{?}} 11 | (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, 12 | {{? it.opts.multipleOfPrecision }} 13 | Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} 14 | {{??}} 15 | division{{=$lvl}} !== parseInt(division{{=$lvl}}) 16 | {{?}} 17 | ) 18 | {{?$isData}} ) {{?}} ) { 19 | {{# def.error:'multipleOf' }} 20 | } {{? $breakOnError }} else { {{?}} 21 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/extend/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extend", 3 | "author": "Stefan Thomas (http://www.justmoon.net)", 4 | "version": "3.0.0", 5 | "description": "Port of jQuery.extend for node.js and the browser.", 6 | "scripts": [ 7 | "index.js" 8 | ], 9 | "contributors": [ 10 | { 11 | "name": "Jordan Harband", 12 | "url": "https://github.com/ljharb" 13 | } 14 | ], 15 | "keywords": [ 16 | "extend", 17 | "clone", 18 | "merge" 19 | ], 20 | "repository" : { 21 | "type": "git", 22 | "url": "https://github.com/justmoon/node-extend.git" 23 | }, 24 | "dependencies": { 25 | }, 26 | "devDependencies": { 27 | "tape" : "~3.0.0", 28 | "covert": "~0.4.0", 29 | "jscs": "~1.6.2" 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/test/to-json.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('toJSON function', function (t) { 7 | t.plan(1); 8 | var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; 9 | t.equal(stringify(obj), '{"one":1}' ); 10 | }); 11 | 12 | test('toJSON returns string', function (t) { 13 | t.plan(1); 14 | var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; 15 | t.equal(stringify(obj), '"one"'); 16 | }); 17 | 18 | test('toJSON returns array', function (t) { 19 | t.plan(1); 20 | var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; 21 | t.equal(stringify(obj), '["one"]'); 22 | }); 23 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-00/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-00/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-00/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "method" : { 16 | "type" : "string", 17 | "default" : "GET", 18 | "optional" : true 19 | }, 20 | 21 | "enctype" : { 22 | "type" : "string", 23 | "requires" : "method", 24 | "optional" : true 25 | }, 26 | 27 | "properties" : { 28 | "type" : "object", 29 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, 30 | "optional" : true 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-01/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-01/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-01/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "method" : { 16 | "type" : "string", 17 | "default" : "GET", 18 | "optional" : true 19 | }, 20 | 21 | "enctype" : { 22 | "type" : "string", 23 | "requires" : "method", 24 | "optional" : true 25 | }, 26 | 27 | "properties" : { 28 | "type" : "object", 29 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, 30 | "optional" : true 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ecc-jsbn/test.js: -------------------------------------------------------------------------------- 1 | var ecc = require("./index.js"); 2 | var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1); 3 | var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1); 4 | console.log(key1.deriveSharedSecret(key2)); 5 | var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey); 6 | var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true); 7 | console.log(key3.deriveSharedSecret(key4)); 8 | 9 | var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1); 10 | var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1); 11 | console.log(key1.deriveSharedSecret(key2)); 12 | var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey); 13 | var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true); 14 | console.log(key3.deriveSharedSecret(key4)); 15 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/cookie.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cookie.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "path": { 17 | "type": "string" 18 | }, 19 | "domain": { 20 | "type": "string" 21 | }, 22 | "expires": { 23 | "type": ["string", "null"], 24 | "format": "date-time" 25 | }, 26 | "httpOnly": { 27 | "type": "boolean" 28 | }, 29 | "secure": { 30 | "type": "boolean" 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Ch05/qrnd-stdout.txt: -------------------------------------------------------------------------------- 1 | 47 137 149 7 87 146 15 164 94 112 86 100 236 84 220 58 241 145 195 196 121 60 106 84 170 27 163 47 228 208 131 43 25 77 56 235 216 161 25 59 11 75 158 46 230 101 148 184 181 132 105 201 84 114 149 145 204 13 26 21 156 228 86 188 149 142 236 98 108 210 43 198 112 148 148 170 104 58 30 229 42 60 152 56 226 208 38 11 210 43 58 170 182 114 206 170 27 168 101 21 50 248 177 178 25 106 147 153 198 232 43 11 101 40 197 77 106 52 101 58 196 202 174 97 78 47 60 226 134 184 146 216 169 149 180 197 67 92 146 147 50 212 96 93 234 201 106 157 213 105 52 13 164 250 14 135 143 14 165 225 53 75 201 47 146 57 98 53 181 27 100 38 129 140 109 86 37 185 135 54 104 69 38 105 150 38 138 216 3 202 26 149 112 67 18 78 163 113 186 118 212 149 18 27 51 112 196 78 200 124 138 27 114 42 200 193 62 172 241 68 160 25 113 138 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/python/qiskit-driver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Usage qiskit-driver.sh [QPROGRAM-PATH] 4 | # Example: qiskit-driver.sh /home/centos/public_html/cgi-bin/qiskit-basic-test.py 5 | 6 | # home of the python env (update this) 7 | root=/home/centos 8 | pythonEnv=$root/qiskit/qiskit 9 | 10 | #program=qiskit-basic-test.py 11 | #program=qbattleship.py 12 | program=$1 13 | 14 | # Activate python 3 15 | source $pythonEnv/bin/activate 16 | 17 | #echo -e "Content-type: text/html\n\n" 18 | #echo "Hello, World from Bash." 19 | 20 | # http://localhost:8080/BattleShip/TestSysRunner?p1=/home/centos/public_html/cgi-bin/qiskit-driver.sh 21 | # execute python quantum program @ /home/centos/public_html/cgi-bin/ 22 | 23 | python $program $@ 24 | 25 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/async.js: -------------------------------------------------------------------------------- 1 | var defer = require('./defer.js'); 2 | 3 | // API 4 | module.exports = async; 5 | 6 | /** 7 | * Runs provided callback asynchronously 8 | * even if callback itself is not 9 | * 10 | * @param {function} callback - callback to invoke 11 | * @returns {function} - augmented callback 12 | */ 13 | function async(callback) 14 | { 15 | var isAsync = false; 16 | 17 | // check if async happened 18 | defer(function() { isAsync = true; }); 19 | 20 | return function async_callback(err, result) 21 | { 22 | if (isAsync) 23 | { 24 | callback(err, result); 25 | } 26 | else 27 | { 28 | defer(function nextTick_callback() 29 | { 30 | callback(err, result); 31 | }); 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/log.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "log.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "version", 7 | "creator", 8 | "entries" 9 | ], 10 | "properties": { 11 | "version": { 12 | "type": "string" 13 | }, 14 | "creator": { 15 | "$ref": "creator.json#" 16 | }, 17 | "browser": { 18 | "$ref": "browser.json#" 19 | }, 20 | "pages": { 21 | "type": "array", 22 | "items": { 23 | "$ref": "page.json#" 24 | } 25 | }, 26 | "entries": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "entry.json#" 30 | } 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/http-signature/lib/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Joyent, Inc. 2 | 3 | var parser = require('./parser'); 4 | var signer = require('./signer'); 5 | var verify = require('./verify'); 6 | var utils = require('./utils'); 7 | 8 | 9 | 10 | ///--- API 11 | 12 | module.exports = { 13 | 14 | parse: parser.parseRequest, 15 | parseRequest: parser.parseRequest, 16 | 17 | sign: signer.signRequest, 18 | signRequest: signer.signRequest, 19 | createSigner: signer.createSigner, 20 | isSigner: signer.isSigner, 21 | 22 | sshKeyToPEM: utils.sshKeyToPEM, 23 | sshKeyFingerprint: utils.fingerprint, 24 | pemToRsaSSHKey: utils.pemToRsaSSHKey, 25 | 26 | verify: verify.verifySignature, 27 | verifySignature: verify.verifySignature, 28 | verifyHMAC: verify.verifyHMAC 29 | }; 30 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.cdt.debug.core.cDebug.default_source_containers=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n 3 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema-traverse/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: eslint:recommended 2 | env: 3 | node: true 4 | browser: true 5 | rules: 6 | block-scoped-var: 2 7 | complexity: [2, 13] 8 | curly: [2, multi-or-nest, consistent] 9 | dot-location: [2, property] 10 | dot-notation: 2 11 | indent: [2, 2, SwitchCase: 1] 12 | linebreak-style: [2, unix] 13 | new-cap: 2 14 | no-console: [2, allow: [warn, error]] 15 | no-else-return: 2 16 | no-eq-null: 2 17 | no-fallthrough: 2 18 | no-invalid-this: 2 19 | no-return-assign: 2 20 | no-shadow: 1 21 | no-trailing-spaces: 2 22 | no-use-before-define: [2, nofunc] 23 | quotes: [2, single, avoid-escape] 24 | semi: [2, always] 25 | strict: [2, global] 26 | valid-jsdoc: [2, requireReturn: false] 27 | no-control-regex: 0 28 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-03/examples/address: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "An Address following the convention of http://microformats.org/wiki/hcard", 3 | "type" : "object", 4 | "properties" : { 5 | "post-office-box" : { "type" : "string" }, 6 | "extended-address" : { "type" : "string" }, 7 | "street-address" : { "type":"string" }, 8 | "locality" : { "type" : "string", "required" : true }, 9 | "region" : { "type" : "string", "required" : true }, 10 | "postal-code" : { "type" : "string" }, 11 | "country-name" : { "type" : "string", "required" : true } 12 | }, 13 | "dependencies" : { 14 | "post-office-box" : "street-address", 15 | "extended-address" : "street-address", 16 | "street-address" : "region", 17 | "locality" : "region", 18 | "region" : "country-name" 19 | } 20 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/readable_serial.js: -------------------------------------------------------------------------------- 1 | var serial = require('../serial.js'); 2 | 3 | // API 4 | module.exports = ReadableSerial; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.serial` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableSerial(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableSerial)) 17 | { 18 | return new ReadableSerial(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableSerial.super_.call(this, {objectMode: true}); 23 | 24 | this._start(serial, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /Ch06_BattleShip/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/Ch06_BattleShip/2018/4/15/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/allOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | {{ 7 | var $currentBaseId = $it.baseId 8 | , $allSchemasEmpty = true; 9 | }} 10 | 11 | {{~ $schema:$sch:$i }} 12 | {{? {{# def.nonEmptySchema:$sch }} }} 13 | {{ 14 | $allSchemasEmpty = false; 15 | $it.schema = $sch; 16 | $it.schemaPath = $schemaPath + '[' + $i + ']'; 17 | $it.errSchemaPath = $errSchemaPath + '/' + $i; 18 | }} 19 | 20 | {{# def.insertSubschemaCode }} 21 | 22 | {{# def.ifResultValid }} 23 | {{?}} 24 | {{~}} 25 | 26 | {{? $breakOnError }} 27 | {{? $allSchemasEmpty }} 28 | if (true) { 29 | {{??}} 30 | {{= $closingBraces.slice(0,-1) }} 31 | {{?}} 32 | {{?}} 33 | 34 | {{# def.cleanUp }} 35 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/stream.js: -------------------------------------------------------------------------------- 1 | var inherits = require('util').inherits 2 | , Readable = require('stream').Readable 3 | , ReadableAsyncKit = require('./lib/readable_asynckit.js') 4 | , ReadableParallel = require('./lib/readable_parallel.js') 5 | , ReadableSerial = require('./lib/readable_serial.js') 6 | , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') 7 | ; 8 | 9 | // API 10 | module.exports = 11 | { 12 | parallel : ReadableParallel, 13 | serial : ReadableSerial, 14 | serialOrdered : ReadableSerialOrdered, 15 | }; 16 | 17 | inherits(ReadableAsyncKit, Readable); 18 | 19 | inherits(ReadableParallel, ReadableAsyncKit); 20 | inherits(ReadableSerial, ReadableAsyncKit); 21 | inherits(ReadableSerialOrdered, ReadableAsyncKit); 22 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asynckit/lib/readable_parallel.js: -------------------------------------------------------------------------------- 1 | var parallel = require('../parallel.js'); 2 | 3 | // API 4 | module.exports = ReadableParallel; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.parallel` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableParallel(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableParallel)) 17 | { 18 | return new ReadableParallel(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableParallel.super_.call(this, {objectMode: true}); 23 | 24 | this._start(parallel, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Ahmad Nassri 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-stringify-safe/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Unreleased 2 | - Fixes stringify to only take ancestors into account when checking 3 | circularity. 4 | It previously assumed every visited object was circular which led to [false 5 | positives][issue9]. 6 | Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. 7 | - Fixes calling the `replacer` function in the proper context (`thisArg`). 8 | - Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). 9 | - Speeds serializing by a factor of 10 | Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching 11 | only the ancestors for a circular references speeds up things considerably. 12 | 13 | [must]: https://github.com/moll/js-must 14 | [issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 15 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/lib/bytesToUuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert array of 16 byte values to UUID string format of the form: 3 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 4 | */ 5 | var byteToHex = []; 6 | for (var i = 0; i < 256; ++i) { 7 | byteToHex[i] = (i + 0x100).toString(16).substr(1); 8 | } 9 | 10 | function bytesToUuid(buf, offset) { 11 | var i = offset || 0; 12 | var bth = byteToHex; 13 | return bth[buf[i++]] + bth[buf[i++]] + 14 | bth[buf[i++]] + bth[buf[i++]] + '-' + 15 | bth[buf[i++]] + bth[buf[i++]] + '-' + 16 | bth[buf[i++]] + bth[buf[i++]] + '-' + 17 | bth[buf[i++]] + bth[buf[i++]] + '-' + 18 | bth[buf[i++]] + bth[buf[i++]] + 19 | bth[buf[i++]] + bth[buf[i++]] + 20 | bth[buf[i++]] + bth[buf[i++]]; 21 | } 22 | 23 | module.exports = bytesToUuid; 24 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/uuid/v4.js: -------------------------------------------------------------------------------- 1 | var rng = require('./lib/rng'); 2 | var bytesToUuid = require('./lib/bytesToUuid'); 3 | 4 | function v4(options, buf, offset) { 5 | var i = buf && offset || 0; 6 | 7 | if (typeof(options) == 'string') { 8 | buf = options === 'binary' ? new Array(16) : null; 9 | options = null; 10 | } 11 | options = options || {}; 12 | 13 | var rnds = options.random || (options.rng || rng)(); 14 | 15 | // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 16 | rnds[6] = (rnds[6] & 0x0f) | 0x40; 17 | rnds[8] = (rnds[8] & 0x3f) | 0x80; 18 | 19 | // Copy bytes to buffer, if provided 20 | if (buf) { 21 | for (var ii = 0; ii < 16; ++ii) { 22 | buf[i + ii] = rnds[ii]; 23 | } 24 | } 25 | 26 | return buf || bytesToUuid(rnds); 27 | } 28 | 29 | module.exports = v4; 30 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/asn1/lib/ber/types.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | 4 | module.exports = { 5 | EOC: 0, 6 | Boolean: 1, 7 | Integer: 2, 8 | BitString: 3, 9 | OctetString: 4, 10 | Null: 5, 11 | OID: 6, 12 | ObjectDescriptor: 7, 13 | External: 8, 14 | Real: 9, // float 15 | Enumeration: 10, 16 | PDV: 11, 17 | Utf8String: 12, 18 | RelativeOID: 13, 19 | Sequence: 16, 20 | Set: 17, 21 | NumericString: 18, 22 | PrintableString: 19, 23 | T61String: 20, 24 | VideotexString: 21, 25 | IA5String: 22, 26 | UTCTime: 23, 27 | GeneralizedTime: 24, 28 | GraphicString: 25, 29 | VisibleString: 26, 30 | GeneralString: 28, 31 | UniversalString: 29, 32 | CharacterString: 30, 33 | BMPString: 31, 34 | Constructor: 32, 35 | Context: 128 36 | }; 37 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-validator/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Ahmad Nassri 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | afterRequest: require('./afterRequest.json'), 5 | beforeRequest: require('./beforeRequest.json'), 6 | browser: require('./browser.json'), 7 | cache: require('./cache.json'), 8 | content: require('./content.json'), 9 | cookie: require('./cookie.json'), 10 | creator: require('./creator.json'), 11 | entry: require('./entry.json'), 12 | har: require('./har.json'), 13 | header: require('./header.json'), 14 | log: require('./log.json'), 15 | page: require('./page.json'), 16 | pageTimings: require('./pageTimings.json'), 17 | postData: require('./postData.json'), 18 | query: require('./query.json'), 19 | request: require('./request.json'), 20 | response: require('./response.json'), 21 | timings: require('./timings.json') 22 | } 23 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "page.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "startedDateTime", 8 | "id", 9 | "title", 10 | "pageTimings" 11 | ], 12 | "properties": { 13 | "startedDateTime": { 14 | "type": "string", 15 | "format": "date-time", 16 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))" 17 | }, 18 | "id": { 19 | "type": "string", 20 | "unique": true 21 | }, 22 | "title": { 23 | "type": "string" 24 | }, 25 | "pageTimings": { 26 | "$ref": "pageTimings.json#" 27 | }, 28 | "comment": { 29 | "type": "string" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-02/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-02/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-02/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, 16 | 17 | "method" : { 18 | "type" : "string", 19 | "default" : "GET", 20 | "optional" : true 21 | }, 22 | 23 | "enctype" : { 24 | "type" : "string", 25 | "requires" : "method", 26 | "optional" : true 27 | }, 28 | 29 | "properties" : { 30 | "type" : "object", 31 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, 32 | "optional" : true 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-stringify-safe/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-stringify-safe/Makefile: -------------------------------------------------------------------------------- 1 | NODE_OPTS = 2 | TEST_OPTS = 3 | 4 | love: 5 | @echo "Feel like makin' love." 6 | 7 | test: 8 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) 9 | 10 | spec: 11 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) 12 | 13 | autotest: 14 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) 15 | 16 | autospec: 17 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) 18 | 19 | pack: 20 | @file=$$(npm pack); echo "$$file"; tar tf "$$file" 21 | 22 | publish: 23 | npm publish 24 | 25 | tag: 26 | git tag "v$$(node -e 'console.log(require("./package").version)')" 27 | 28 | clean: 29 | rm -f *.tgz 30 | npm prune --production 31 | 32 | .PHONY: love 33 | .PHONY: test spec autotest autospec 34 | .PHONY: pack publish tag 35 | .PHONY: clean 36 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-03/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-03/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-03/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string", 9 | "required" : true, 10 | "format" : "link-description-object-template" 11 | }, 12 | 13 | "rel" : { 14 | "type" : "string", 15 | "required" : true 16 | }, 17 | 18 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, 19 | 20 | "method" : { 21 | "type" : "string", 22 | "default" : "GET" 23 | }, 24 | 25 | "enctype" : { 26 | "type" : "string", 27 | "requires" : "method" 28 | }, 29 | 30 | "properties" : { 31 | "type" : "object", 32 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/timings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "timings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "required": [ 5 | "send", 6 | "wait", 7 | "receive" 8 | ], 9 | "properties": { 10 | "dns": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "connect": { 15 | "type": "number", 16 | "min": -1 17 | }, 18 | "blocked": { 19 | "type": "number", 20 | "min": -1 21 | }, 22 | "send": { 23 | "type": "number", 24 | "min": -1 25 | }, 26 | "wait": { 27 | "type": "number", 28 | "min": -1 29 | }, 30 | "receive": { 31 | "type": "number", 32 | "min": -1 33 | }, 34 | "ssl": { 35 | "type": "number", 36 | "min": -1 37 | }, 38 | "comment": { 39 | "type": "string" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/jsprim/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new 4 | changes. Anyone can submit changes. To get started, see the [cr.joyent.us user 5 | guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). 6 | This repo does not use GitHub pull requests. 7 | 8 | See the [Joyent Engineering 9 | Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general 10 | best practices expected in this repository. 11 | 12 | Contributions should be "make prepush" clean. The "prepush" target runs the 13 | "check" target, which requires these separate tools: 14 | 15 | * https://github.com/davepacheco/jsstyle 16 | * https://github.com/davepacheco/javascriptlint 17 | 18 | If you're changing something non-trivial or user-facing, you may want to submit 19 | an issue first. 20 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/verror/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new 4 | changes. Anyone can submit changes. To get started, see the [cr.joyent.us user 5 | guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). 6 | This repo does not use GitHub pull requests. 7 | 8 | See the [Joyent Engineering 9 | Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general 10 | best practices expected in this repository. 11 | 12 | Contributions should be "make prepush" clean. The "prepush" target runs the 13 | "check" target, which requires these separate tools: 14 | 15 | * https://github.com/davepacheco/jsstyle 16 | * https://github.com/davepacheco/javascriptlint 17 | 18 | If you're changing something non-trivial or user-facing, you may want to submit 19 | an issue first. 20 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/afterRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "afterRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/beforeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "beforeRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/cryptiles/README.md: -------------------------------------------------------------------------------- 1 | cryptiles 2 | ========= 3 | 4 | General purpose crypto utilities 5 | 6 | [![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles) 7 | 8 | Lead Maintainer - [C J Silverio](https://github.com/ceejbot) 9 | 10 | ## Methods 11 | 12 | ### `randomString( size)` 13 | Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string. 14 | 15 | ### `randomDigits( size)` 16 | Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string. 17 | 18 | ### `fixedTimeComparison( a, b)` 19 | Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ. 20 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-04/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-04/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-04/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "rel" : { 8 | "type" : "string" 9 | }, 10 | 11 | "href" : { 12 | "type" : "string" 13 | }, 14 | 15 | "template" : { 16 | "type" : "string" 17 | }, 18 | 19 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, 20 | 21 | "method" : { 22 | "type" : "string", 23 | "default" : "GET" 24 | }, 25 | 26 | "enctype" : { 27 | "type" : "string" 28 | }, 29 | 30 | "properties" : { 31 | "type" : "object", 32 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} 33 | } 34 | }, 35 | 36 | "required" : ["rel", "href"], 37 | 38 | "dependencies" : { 39 | "enctype" : "method" 40 | } 41 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/fast-json-stable-stringify/benchmark/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Benchmark = require('benchmark'); 4 | const suite = new Benchmark.Suite; 5 | const testData = require('./test.json'); 6 | 7 | 8 | const stringifyPackages = { 9 | // 'JSON.stringify': JSON.stringify, 10 | 'fast-json-stable-stringify': require('../index'), 11 | 'json-stable-stringify': true, 12 | 'fast-stable-stringify': true, 13 | 'faster-stable-stringify': true 14 | }; 15 | 16 | 17 | for (const name in stringifyPackages) { 18 | let func = stringifyPackages[name]; 19 | if (func === true) func = require(name); 20 | 21 | suite.add(name, function() { 22 | func(testData); 23 | }); 24 | } 25 | 26 | suite 27 | .on('cycle', (event) => console.log(String(event.target))) 28 | .on('complete', function () { 29 | console.log('The fastest is ' + this.filter('fastest').map('name')); 30 | }) 31 | .run({async: true}); 32 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/test/inputs/save_command.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test_save_command", 3 | "config": { 4 | "shots": 1, 5 | "seed": 1, 6 | "data": ["saved_quantum_states"] 7 | }, 8 | "circuits": [ 9 | { 10 | "name": "save_command", 11 | "compiled_circuit": { 12 | "header": { 13 | "clbit_labels": [], 14 | "number_of_clbits": 0, 15 | "number_of_qubits": 3, 16 | "qubit_labels": [["q", 0], ["q", 1], ["q", 2]] 17 | }, 18 | "operations": [ 19 | {"name": "save", "qubits": [0], "params": [0]}, 20 | {"name": "h", "qubits": [0]}, 21 | {"name": "save", "qubits": [0], "params": [1]}, 22 | {"name": "cx", "qubits": [0, 1]}, 23 | {"name": "save", "qubits": [0], "params": [2]}, 24 | {"name": "cx", "qubits": [1, 2]}, 25 | {"name": "save", "qubits": [0], "params": [3]} 26 | ] 27 | } 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/getpass/README.md: -------------------------------------------------------------------------------- 1 | ## getpass 2 | 3 | Get a password from the terminal. Sounds simple? Sounds like the `readline` 4 | module should be able to do it? NOPE. 5 | 6 | ## Install and use it 7 | 8 | ```bash 9 | npm install --save getpass 10 | ``` 11 | 12 | ```javascript 13 | const mod_getpass = require('getpass'); 14 | ``` 15 | 16 | ## API 17 | 18 | ### `mod_getpass.getPass([options, ]callback)` 19 | 20 | Gets a password from the terminal. If available, this uses `/dev/tty` to avoid 21 | interfering with any data being piped in or out of stdio. 22 | 23 | This function prints a prompt (by default `Password:`) and then accepts input 24 | without echoing. 25 | 26 | Parameters: 27 | 28 | * `options`, an Object, with properties: 29 | * `prompt`, an optional String 30 | * `callback`, a `Func(error, password)`, with arguments: 31 | * `error`, either `null` (no error) or an `Error` instance 32 | * `password`, a String 33 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/stringstream/example.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var zlib = require('zlib') 3 | var strs = require('stringstream') 4 | 5 | var utf8Stream = fs.createReadStream('massiveLogFile.gz') 6 | .pipe(zlib.createGunzip()) 7 | .pipe(strs('utf8')) 8 | 9 | utf8Stream.pipe(process.stdout) 10 | 11 | // Stream from utf8 to hex to base64... Why not, ay. 12 | var hex64Stream = fs.createReadStream('myFile') 13 | .pipe(strs('utf8', 'hex')) 14 | .pipe(strs('hex', 'base64')) 15 | 16 | hex64Stream.pipe(process.stdout) 17 | 18 | // Deals with base64 correctly by aligning chunks 19 | var stream = fs.createReadStream('myFile').pipe(strs('base64')) 20 | 21 | var base64Str = '' 22 | 23 | stream.on('data', function(data) { base64Str += data }) 24 | stream.on('end', function() { 25 | console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() 26 | console.log('Original file is: ' + new Buffer(base64Str, 'base64')) 27 | }) 28 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/har-schema/lib/postData.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "postData.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "mimeType": { 11 | "type": "string" 12 | }, 13 | "text": { 14 | "type": "string" 15 | }, 16 | "params": { 17 | "type": "array", 18 | "required": [ 19 | "name" 20 | ], 21 | "properties": { 22 | "name": { 23 | "type": "string" 24 | }, 25 | "value": { 26 | "type": "string" 27 | }, 28 | "fileName": { 29 | "type": "string" 30 | }, 31 | "contentType": { 32 | "type": "string" 33 | }, 34 | "comment": { 35 | "type": "string" 36 | } 37 | } 38 | }, 39 | "comment": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt: -------------------------------------------------------------------------------- 1 | INDEX VERSION 1.126+C:\Users\vsilva\Documents\Books\Quantum\Workspace\.metadata\.plugins\org.eclipse.jdt.core 2 | 221979875.index 3 | 3267748049.index 4 | 3626931047.index 5 | 2687790720.index 6 | 643015801.index 7 | 3521617142.index 8 | 3893835914.index 9 | 2387712100.index 10 | 2144648300.index 11 | 2082571954.index 12 | 2993303256.index 13 | 4018706093.index 14 | 3710613527.index 15 | 3129927180.index 16 | 2265412338.index 17 | 620286925.index 18 | 1144188029.index 19 | 683184654.index 20 | 2708239607.index 21 | 1485044014.index 22 | 1143014137.index 23 | 3256372620.index 24 | 384216248.index 25 | 465581470.index 26 | 2706502329.index 27 | 728132027.index 28 | 739078005.index 29 | 3811958767.index 30 | 1075156909.index 31 | 3015671029.index 32 | 1820024274.index 33 | 2699899854.index 34 | 135936188.index 35 | 3108731229.index 36 | 1965301315.index 37 | 2302811751.index 38 | 1262622903.index 39 | 4149142647.index 40 | 1435321767.index 41 | -------------------------------------------------------------------------------- /Ch04/qiskit-simulator/test/inputs/clifford_save_command.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test_save_command", 3 | "config": { 4 | "shots": 1, 5 | "seed": 1, 6 | "simulator": "clifford", 7 | "data": ["saved_quantum_states"] 8 | }, 9 | "circuits": [ 10 | { 11 | "name": "save_command", 12 | "compiled_circuit": { 13 | "header": { 14 | "clbit_labels": [], 15 | "number_of_clbits": 0, 16 | "number_of_qubits": 3, 17 | "qubit_labels": [["q", 0], ["q", 1], ["q", 2]] 18 | }, 19 | "operations": [ 20 | {"name": "save", "qubits": [0], "params": [0]}, 21 | {"name": "h", "qubits": [0]}, 22 | {"name": "save", "qubits": [0], "params": [1]}, 23 | {"name": "cx", "qubits": [0, 1]}, 24 | {"name": "save", "qubits": [0], "params": [2]}, 25 | {"name": "cx", "qubits": [1, 2]}, 26 | {"name": "save", "qubits": [0], "params": [3]} 27 | ] 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /Ch06_BattleShip/src/ch06/ws/WSMessages.java: -------------------------------------------------------------------------------- 1 | package ch06.ws; 2 | 3 | import org.json.JSONObject; 4 | 5 | 6 | public class WSMessages { 7 | 8 | static JSONObject createStatusMessage(String type, int status, String message) { 9 | try { 10 | JSONObject root = new JSONObject(); 11 | root.put("type", type); 12 | root.put("status", status); 13 | root.put("message", message); 14 | return root; 15 | } catch (Exception e) { 16 | WSConnector.LOGE("createStatusMessage " + type + " " + message, e); 17 | return null; 18 | } 19 | } 20 | 21 | static JSONObject createStatusMessage(int status, String message) { 22 | try { 23 | JSONObject root = new JSONObject(); 24 | root.put("status", status); 25 | root.put("message", message); 26 | return root; 27 | } catch (Exception e) { 28 | WSConnector.LOGE("createStatusMessage " + message, e); 29 | return null; 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Ch06_BattleShip/WebContent/python/qbattleship-sim.py: -------------------------------------------------------------------------------- 1 | ##C:/Python27/python.exe 2 | 3 | # Simulates damage data for Win32 Test 4 | 5 | import sys 6 | #from qiskit import QuantumProgram 7 | #import Qconfig 8 | import getpass, random, math 9 | 10 | import cgi 11 | import cgitb 12 | 13 | # solve the relative dependencies if you clone QISKit from the Git repo and use like a global. 14 | sys.path.append('../../qiskit-sdk-py/') 15 | 16 | # debug 17 | cgitb.enable(display=0, logdir=".") 18 | 19 | form = cgi.FieldStorage() 20 | 21 | # Damage [[0,0,0,0,0],[0,0,0,0,0]] 22 | damage = [ [0]*5 for _ in range(2)] # this will hold the prob of a 1 for each qubit for each player 23 | #randPos = random.sample(range(5), 3) 24 | 25 | for ship in range(5): 26 | damage[0][ship] = random.random() # randPos[ship] 27 | damage[1][ship] = random.random() 28 | 29 | #print ("Content-type: application/json\n\n") 30 | print ("{\"status\": 200, \"message\":\"" + str(sys.argv) + "\", \"damage\":" + str(damage) + " }") 31 | 32 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/json-schema/draft-03/examples/interfaces: -------------------------------------------------------------------------------- 1 | { 2 | "extends":"http://json-schema.org/hyper-schema", 3 | "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", 4 | "properties":{ 5 | "methods":{ 6 | "type":"object", 7 | "description":"This defines the set of methods available to the class instances", 8 | "additionalProperties":{ 9 | "type":"object", 10 | "description":"The definition of the method", 11 | "properties":{ 12 | "parameters":{ 13 | "type":"array", 14 | "description":"The set of parameters that should be passed to the method when it is called", 15 | "items":{"$ref":"#"}, 16 | "required": true 17 | }, 18 | "returns":{"$ref":"#"} 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/scripts/travis-gh-pages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then 6 | git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { 7 | rm -rf ../gh-pages 8 | git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages 9 | mkdir -p ../gh-pages/_source 10 | cp *.md ../gh-pages/_source 11 | cp LICENSE ../gh-pages/_source 12 | currentDir=$(pwd) 13 | cd ../gh-pages 14 | $currentDir/node_modules/.bin/gh-pages-generator 15 | # remove logo from README 16 | sed -i -E "s/]+ajv_logo[^>]+>//" index.md 17 | git config user.email "$GIT_USER_EMAIL" 18 | git config user.name "$GIT_USER_NAME" 19 | git add . 20 | git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" 21 | git push --quiet origin gh-pages > /dev/null 2>&1 22 | } 23 | fi 24 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/compile/error_classes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var resolve = require('./resolve'); 4 | 5 | module.exports = { 6 | Validation: errorSubclass(ValidationError), 7 | MissingRef: errorSubclass(MissingRefError) 8 | }; 9 | 10 | 11 | function ValidationError(errors) { 12 | this.message = 'validation failed'; 13 | this.errors = errors; 14 | this.ajv = this.validation = true; 15 | } 16 | 17 | 18 | MissingRefError.message = function (baseId, ref) { 19 | return 'can\'t resolve reference ' + ref + ' from id ' + baseId; 20 | }; 21 | 22 | 23 | function MissingRefError(baseId, ref, message) { 24 | this.message = message || MissingRefError.message(baseId, ref); 25 | this.missingRef = resolve.url(baseId, ref); 26 | this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); 27 | } 28 | 29 | 30 | function errorSubclass(Subclass) { 31 | Subclass.prototype = Object.create(Error.prototype); 32 | Subclass.prototype.constructor = Subclass; 33 | return Subclass; 34 | } 35 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/tweetnacl/AUTHORS.md: -------------------------------------------------------------------------------- 1 | List of TweetNaCl.js authors 2 | ============================ 3 | 4 | Alphabetical order by first name. 5 | Format: Name (GitHub username or URL) 6 | 7 | * AndSDev (@AndSDev) 8 | * Devi Mandiri (@devi) 9 | * Dmitry Chestnykh (@dchest) 10 | 11 | List of authors of third-party public domain code from which TweetNaCl.js code was derived 12 | ========================================================================================== 13 | 14 | [TweetNaCl](http://tweetnacl.cr.yp.to/) 15 | -------------------------------------- 16 | 17 | * Bernard van Gastel 18 | * Daniel J. Bernstein 19 | * Peter Schwabe 20 | * Sjaak Smetsers 21 | * Tanja Lange 22 | * Wesley Janssen 23 | 24 | 25 | [Poly1305-donna](https://github.com/floodyberry/poly1305-donna) 26 | -------------------------------------------------------------- 27 | 28 | * Andrew Moon (@floodyberry) 29 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.jsdt.core/variablesAndContainers.dat: -------------------------------------------------------------------------------- 1 | Ch06_BattleShip)org.eclipse.wst.jsdt.launching.WebProject,org.eclipse.wst.jsdt.launching.JRE_CONTAINERrC:/Users/vsilva/Documents/Books/Quantum/Workspace/.metadata/.plugins/org.eclipse.wst.jsdt.core/libraries/system.js1org.eclipse.wst.jsdt.launching.baseBrowserLibrary~C:/Users/vsilva/Documents/Books/Quantum/Workspace/.metadata/.plugins/org.eclipse.wst.jsdt.core/libraries/baseBrowserLibrary.jsyC:/Users/vsilva/Documents/Books/Quantum/Workspace/.metadata/.plugins/org.eclipse.wst.jsdt.core/libraries/browserWindow.jsoC:/Users/vsilva/Documents/Books/Quantum/Workspace/.metadata/.plugins/org.eclipse.wst.jsdt.core/libraries/xhr.js pC:/Users/vsilva/Documents/Books/Quantum/Workspace/.metadata/.plugins/org.eclipse.wst.jsdt.core/libraries/dom5.js -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/defaults.def: -------------------------------------------------------------------------------- 1 | {{## def.assignDefault: 2 | if ({{=$passData}} === undefined) 3 | {{=$passData}} = {{? it.opts.useDefaults == 'shared' }} 4 | {{= it.useDefault($sch.default) }} 5 | {{??}} 6 | {{= JSON.stringify($sch.default) }} 7 | {{?}}; 8 | #}} 9 | 10 | 11 | {{## def.defaultProperties: 12 | {{ 13 | var $schema = it.schema.properties 14 | , $schemaKeys = Object.keys($schema); }} 15 | {{~ $schemaKeys:$propertyKey }} 16 | {{ var $sch = $schema[$propertyKey]; }} 17 | {{? $sch.default !== undefined }} 18 | {{ var $passData = $data + it.util.getProperty($propertyKey); }} 19 | {{# def.assignDefault }} 20 | {{?}} 21 | {{~}} 22 | #}} 23 | 24 | 25 | {{## def.defaultItems: 26 | {{~ it.schema.items:$sch:$i }} 27 | {{? $sch.default !== undefined }} 28 | {{ var $passData = $data + '[' + $i + ']'; }} 29 | {{# def.assignDefault }} 30 | {{?}} 31 | {{~}} 32 | #}} 33 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ch06_BattleShip/python/qbattleship-sim.py: -------------------------------------------------------------------------------- 1 | ##C:/Python27/python.exe 2 | 3 | # Simulates damage data for Win32 Test 4 | 5 | import sys 6 | #from qiskit import QuantumProgram 7 | #import Qconfig 8 | import getpass, random, math 9 | 10 | import cgi 11 | import cgitb 12 | 13 | # solve the relative dependencies if you clone QISKit from the Git repo and use like a global. 14 | sys.path.append('../../qiskit-sdk-py/') 15 | 16 | # debug 17 | cgitb.enable(display=0, logdir=".") 18 | 19 | form = cgi.FieldStorage() 20 | 21 | # Damage [[0,0,0,0,0],[0,0,0,0,0]] 22 | damage = [ [0]*5 for _ in range(2)] # this will hold the prob of a 1 for each qubit for each player 23 | #randPos = random.sample(range(5), 3) 24 | 25 | for ship in range(5): 26 | damage[0][ship] = random.random() # randPos[ship] 27 | damage[1][ship] = random.random() 28 | 29 | #print ("Content-type: application/json\n\n") 30 | print ("{\"status\": 200, \"message\":\"" + str(sys.argv) + "\", \"damage\":" + str(damage) + " }") 31 | 32 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/performance-now/lib/performance-now.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "performance-now.js", 4 | "sourceRoot": "..", 5 | "sources": [ 6 | "src/performance-now.coffee" 7 | ], 8 | "names": [], 9 | "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL" 10 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.launching/libraryInfos.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Ch03/IBMQuantumExperience/node_modules/ajv/lib/dot/uniqueItems.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | 7 | {{? ($schema || $isData) && it.opts.uniqueItems !== false }} 8 | {{? $isData }} 9 | var {{=$valid}}; 10 | if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) 11 | {{=$valid}} = true; 12 | else if (typeof {{=$schemaValue}} != 'boolean') 13 | {{=$valid}} = false; 14 | else { 15 | {{?}} 16 | 17 | var {{=$valid}} = true; 18 | if ({{=$data}}.length > 1) { 19 | var i = {{=$data}}.length, j; 20 | outer: 21 | for (;i--;) { 22 | for (j = i; j--;) { 23 | if (equal({{=$data}}[i], {{=$data}}[j])) { 24 | {{=$valid}} = false; 25 | break outer; 26 | } 27 | } 28 | } 29 | } 30 | 31 | {{? $isData }} } {{?}} 32 | 33 | if (!{{=$valid}}) { 34 | {{# def.error:'uniqueItems' }} 35 | } {{? $breakOnError }} else { {{?}} 36 | {{??}} 37 | {{? $breakOnError }} if (true) { {{?}} 38 | {{?}} 39 | -------------------------------------------------------------------------------- /Ch04/p04-01.obj: -------------------------------------------------------------------------------- 1 | { 2 | "id": "aA46vJHgnKQko3u5L1QqbUDk31sY2m", 3 | "config": { 4 | "max_credits": 10, 5 | "backend": "local_qasm_simulator", 6 | "shots": 1024 7 | }, 8 | "circuits": [{ 9 | "name": "Circuit", 10 | "config": { 11 | "coupling_map": "None", 12 | "layout": "None", 13 | "basis_gates": "u1,u2,u3,cx,id", 14 | "seed": 123 15 | }, 16 | "compiled_circuit": { 17 | "operations": [{ 18 | "name": "u3", 19 | "params": [3.141592653589793, 0.0, 3.141592653589793], 20 | "texparams": ["\\pi", "0", "\\pi"], 21 | "qubits": [0] 22 | }, { 23 | "name": "measure", 24 | "qubits": [0], 25 | "clbits": [0] 26 | }], 27 | "header": { 28 | "number_of_qubits": 1, 29 | "qubit_labels": [ 30 | ["qr", 0] 31 | ], 32 | "number_of_clbits": 1, 33 | "clbit_labels": [ 34 | ["cr", 1] 35 | ] 36 | } 37 | }, 38 | "compiled_circuit_qasm": "OPENQASM 2.0;\ninclude \"qelib1.inc \";\nqreg qr[1];\ncreg cr[1];\nu3(3.14159265358979,0,3.14159265358979) qr[0];\nmeasure qr[0] -> cr[0];\n" 39 | }] 40 | } -------------------------------------------------------------------------------- /Ch06/battleship/js/notify.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Growl notifications 3 | * 4 | * See http://bootstrap-notify.remabledesigns.com/ 5 | * 6 | * Requires: JQuery 7 | */ 8 | 9 | /** 10 | * Display a notification on the top right of the window: 11 | *
12 |  * notify('Welcome back.', 'warning');
13 |  * 
14 | * 15 | * @param message The text 16 | * @param type Notification type: success, info, danger , inverse, warning. 17 | */ 18 | function notify(message, type) { 19 | $.growl({ 20 | message : message 21 | /* 22 | * icon: 'glyphicon glyphicon-warning-sign', url: 23 | * 'https://github.com/mouse0270/bootstrap-notify', target: '_blank' 24 | */ 25 | }, { 26 | type : type, 27 | allow_dismiss : true, 28 | label : 'Cancel', 29 | className : 'btn-xs btn-inverse', 30 | placement : { 31 | from : 'top', 32 | align : 'right' 33 | }, 34 | delay : 10000, 35 | animate : { 36 | enter : 'animated fadeIn', 37 | exit : 'animated fadeOut' 38 | }, 39 | offset : { 40 | x : 20, 41 | y : 85 42 | } 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | --------------------------------------------------------------------------------