Code Monkey home page Code Monkey logo

jsqubits's People

Contributors

davidbkemp avatar paneraallday avatar tearsofphoenix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsqubits's Issues

dist/commonjs/index.js not found

Looks like jsqubits runner has stable architecture, but this repo doesn't.
It says
Failed to load resource: the server responded with a status of 404 (File not found).
So I can be sure there must be some directory like dist, but there isn't(at least in this github repo). Perhaps there are some differences between runner's version and repo.

Basically, I need some help of this library's author...to make some working quantum program.

Provide easy to use js file (even better: url to include directly)

Hello,

First, thanks a lot for this great simulator, it will be quite practical for me. I just have a minor issue: would it be possible to provide from time to time a packed .js file for simple in-browser use? Because otherwise one need to install nodejs to write the code, or download the .js file used in the demo that may be outdated.

By the way, the README says:

Use it in your own web application by including the JavaScript files available from GitHub: https://github.com/davidbkemp/jsqubits/tree/master/lib (jsqubits.js is the core library, while jsqubitsmath.js ...)

However, neither jsqubits.js nor jsqubitsmath.js exist in this folder.

quantum gate conjugate

Would you like to ask how to realize the conjugate calculation of quantum gate, or how to get the conjugate quantum gate

declaration for TypeScript

Hello,
Since I want to use jsqubits with TypeScript, I wrote d.ts of jsqubits.

https://github.com/qramana/jsqubits.d.ts

This type definition mostly covers the I/F of jsqubits.

I'm already happy, but I think it would be more useful if this was published npm.

May I create PR of this for DefinitelyTyped? (DefinitelyTyped is TypeScript d.ts repository)

This d.ts maybe named @types/jsqubits when publish.
This name is same as your library.
If you do not want this publish, please let me know.

Document QState.each()

QState.each() is likely to be useful to anyone wanting to add new operators and should be documented.

Publish new npm version

If anyone is following this and can help me get my head around the implications of the ES6 transpiling with respect to publishing to npm and node modules it would be greatly appreciated.

Currently you can do this as npm is using the pre-ES6 version of the code:

$ npm install jsqubits
$ node
> qubits = require('jsqubits').jsqubits

With the move to ES6, you need to use require('jsqubits').default instead of require('jsqubits').jsqubits

I am thinking I should maintain backward compatibility by exporting Qubits as both the default and as jsqubits. It looks like this could be done by adding a line to lib/index.js

Either way, I might increment the major version in npm and in github to 2.0.0 just in case this has introduced any breaking changes.

Improve the objects returned by each()

StateWithAmplitude is a lame name. QStateComponent would be better. The meaning of the index attribute is not clear (do we need it?). The method names are not obvious and they should probably cache (or precompute) their values.

Support Complex.getPhase()

It would be nice if Complex had a function that returned the phase of the complex number (i.e. the angle when expressed in polar co-ordinates).

Measure and destroy a qubit

Hello,

First, thanks for this nice library. I'd like to perform sometimes some measurements that require auxiliary qubits (a.k.a. ancillae), but after the measurement the qubits are not useful anymore. I can add qubits using the tensor mechanism, but is there a way to remove qubits that have been measured? It could be useful to avoid to have an increasing number of qubits in use, to simplify the states, and also to simplify the code (one solution to avoid the explosion of the number of qubits in simple cases is to keep in mind which qubit is auxiliary and which one is not, but it complicates the code, and if at one point one needs lots of auxiliary for a particular measurement, then the state will stay big for the rest of the computation).

Thanks!

Decide what to do about bower support

Bower is no longer all that popular. Even the Bower web site recommends using "Yarn and Webpack or Parcel".

So, I think that the bower.json should be deleted, but what should I replace it with?

Examples don't run out of the box.

Exception looking for: dist/commonjs/index.js
So I downloaded the distribution release which also lacks a dist folder.

I'm assuming there is a command that will produce a runnable example but I'm not so inclined to fix a broken distribution. Cost / benefit and all.

"As a new user of this library I would like the demo examples to work so I don't need to invest time in development to find out if this code actually works as advertised."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.