Coder Social home page Coder Social logo

juxingzhe / qcircuit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ooovector/qcircuit

0.0 0.0 0.0 779 KB

A simple Python module to obtain energy levels of superconducting qubits by sparse Hamiltonian diagonalization

Python 4.88% Jupyter Notebook 95.12%

qcircuit's Introduction

QCircuit

A simple Python module to calculate energy levels of superconducting qubits.

In order to define a circuit, the following steps should be performed: 0. All loops should be broken apart. For that, a tree must be selected. One end of each branch should be connected to the tree. All resulting nodes should be named. One of the nodes should be called 'GND'.

  1. Create a QCircuit object.
  2. The library defines three types of elements: capacitors, inductances and Josephson junctions. Each of these elements should be connected to two distinct nodes of the circuit. This is done with the QCircuit.add_element() function.
  3. The phase variables used to described the quantum state of the circuit (i.e. the wavefunction variables) should be decleared by instantizing the QVariable class. External controls, such as gate voltages and external fluxes should be also assinged a variable. The variables should be added to the QCircuit object.
  4. A discrete grid should be defined for each of the wavefunction variables with the QCircuit.create_grid() function.
  5. The variables should be mapped onto the nodes. This is done with QCircuit.map_nodes_linear() function. Only linear maps are supported. The third argument defnes the linear transform matrix from the variables to the nodes. The correspondence of the rows and columns of the matrix is given by the order of the varibles and nodes in the first two arguments.
  6. The critical currents of the josephson junctions, capacitances of the capacitors and inductances of the inductances are set.
  7. External variables are set with the QVariable.set_parameter() function. The first argument is the external phase difference (implements external fluxes), and the second one is the external charge (implements external voltages).
  8. The potential and kinetic energy landscapes should be evaluated with the QCircuit.calculate_potentials() function.
  9. The energy levels and wavefunctions can be obtained by sparse diaglonalization with the QCircuit.diagonalize_phase() function.

For examples, see the transmon and 3JJ flux qubit ipython notebooks.

qcircuit's People

Contributors

ooovector avatar

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.