úÎ!ÔžÂĸ˜      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   Ą Ē Ģ Ī Ĩ Ķ § Ļ Đ Š Ŧ Ž ­ Ū Ŋ ° ą ē ģ ī ĩ ķ · ļ đ š ŧ ž ― ū ŋ Ā Á Â Ã Ä Å Æ Į Č É Ę Ë Ė Í Î Ï Ð Ņ Ō Ó Ô Õ Ö Ũ Ø Ų Ú Û Ü Ý Þ ß ā á â ã ä å æ į č é ę ë ė í î ï ð ņ ō ó ô õ ö ũ ø ų ú û ü ý þ ĸ                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—(c) Scott N. Walck 2012-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe'  learn-physicsA type for vectors. learn-physics x component learn-physics y component learn-physics z component learn-physics3Form a vector by giving its x, y, and z components. learn-physicsCross product. learn-physicsUnit vector in the x direction. learn-physicsUnit vector in the y direction. learn-physicsUnit vector in the z direction. learn-physics x component learn-physics y component learn-physics z component  7(c) Scott N. Walck 2011-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafeFTD    (c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe<)œ learn-physicsComposite Trapezoid Rule learn-physicsComposite Simpson's Rule learn-physicsFnumber of intervals (one less than the number of function evaluations) learn-physics lower limit learn-physics upper limit learn-physicsfunction to be integrated learn-physicsdefinite integral learn-physicsKnumber of half-intervals (one less than the number of function evaluations) learn-physics lower limit learn-physics upper limit learn-physicsfunction to be integrated learn-physicsdefinite integral(c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe;=lĐ learn-physicsAA coordinate system is a function from three parameters to space. learn-physicstSometimes we want to be able to talk about a field without saying whether it is a scalar field or a vector field.  learn-physics?A vector field associates a vector with each position in space.! learn-physics?A scalar field associates a number with each position in space." learn-physicsA displacement is a vector.# learn-physics\A type for position. Position is not a vector because it makes no sense to add positions.$ learn-physics+Add two scalar fields or two vector fields.% learn-physics:The Cartesian coordinate system. Coordinates are (x,y,z).& learn-physics’The cylindrical coordinate system. Coordinates are (s,phi,z), where s is the distance from the z axis and phi is the angle with the x axis.' learn-physicsģThe spherical coordinate system. Coordinates are (r,theta,phi), where r is the distance from the origin, theta is the angle with the z axis, and phi is the azimuthal angle.( learn-physicsvA helping function to take three numbers x, y, and z and form the appropriate position using Cartesian coordinates.) learn-physicszA helping function to take three numbers s, phi, and z and form the appropriate position using cylindrical coordinates.* learn-physics|A helping function to take three numbers r, theta, and phi and form the appropriate position using spherical coordinates.+ learn-physicsDReturns the three Cartesian coordinates as a triple from a position., learn-physicsFReturns the three cylindrical coordinates as a triple from a position.- learn-physicsDReturns the three spherical coordinates as a triple from a position.. learn-physics5Displacement from source position to target position./ learn-physics#Shift a position by a displacement.0 learn-physicsAn object is a map into #.1 learn-physicsA field is a map from #.2 learn-physicsĸ The vector field in which each point in space is associated with a unit vector in the direction of increasing spherical coordinate r, while spherical coordinates theta and phi are held constant. Defined everywhere except at the origin. The unit vector 2 points in different directions at different points in space. It is therefore better interpreted as a vector field, rather than a vector.3 learn-physicsôThe vector field in which each point in space is associated with a unit vector in the direction of increasing spherical coordinate theta, while spherical coordinates r and phi are held constant. Defined everywhere except on the z axis.4 learn-physicsĸ-The vector field in which each point in space is associated with a unit vector in the direction of increasing (cylindrical or spherical) coordinate phi, while cylindrical coordinates s and z (or spherical coordinates r and theta) are held constant. Defined everywhere except on the z axis.5 learn-physicsũThe vector field in which each point in space is associated with a unit vector in the direction of increasing cylindrical coordinate s, while cylindrical coordinates phi and z are held constant. Defined everywhere except on the z axis.6 learn-physicsÜThe vector field in which each point in space is associated with a unit vector in the direction of increasing Cartesian coordinate x, while Cartesian coordinates y and z are held constant. Defined everywhere.7 learn-physicsÜThe vector field in which each point in space is associated with a unit vector in the direction of increasing Cartesian coordinate y, while Cartesian coordinates x and z are held constant. Defined everywhere.8 learn-physicsÜThe vector field in which each point in space is associated with a unit vector in the direction of increasing Cartesian coordinate z, while Cartesian coordinates x and y are held constant. Defined everywhere.( learn-physics x coordinate learn-physics y coordinate learn-physics z coordinate) learn-physics s coordinate learn-physicsphi coordinate learn-physics z coordinate* learn-physics r coordinate learn-physicstheta coordinate learn-physicsphi coordinate. learn-physicssource position learn-physicstarget position !"#$%&'()*+,-./012345678#"! %&'()*+,-./01$2345678(c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe<FTĢd: learn-physics:R is a parametrized function into three-space, an initial limit, and a final limit.< learn-physics&function from one parameter into space= learn-physicsstarting value of the parameter> learn-physicsending value of the parameter? learn-physics4A dotted line integral. Convenience function for K.@ learn-physicsDCalculates integral vf x dl over curve. Convenience function for L.A learn-physics<A dotted line integral, performed in an unsophisticated way.B learn-physicsACalculates integral vf x dl over curve in an unsophisticated way.C learn-physicsGCalculates integral f dl over curve, where dl is a scalar line element.D learn-physics"Reparametrize a curve from 0 to 1.E learn-physicsConcatenate two curves.F learn-physics=Concatenate a list of curves. Parametrizes curves equally.G learn-physicsReverse a curve.H learn-physics0Evaluate the position of a curve at a parameter.I learn-physics Shift a curve by a displacement.J learn-physics5The straight-line curve from one position to another.K learn-physics}Quadratic approximation to vector field. Quadratic approximation to curve. Composite strategy. Dotted line integral.L learn-physics~Quadratic approximation to vector field. Quadratic approximation to curve. Composite strategy. Crossed line integral. ? learn-physicsNnumber of half-intervals (one less than the number of function evaluations) learn-physics vector field learn-physicscurve to integrate over learn-physics scalar result@ learn-physicsNnumber of half-intervals (one less than the number of function evaluations) learn-physics vector field learn-physicscurve to integrate over learn-physics vector resultA learn-physicsnumber of intervals learn-physics vector field learn-physicscurve to integrate over learn-physics scalar resultB learn-physicsnumber of intervals learn-physics vector field learn-physicscurve to integrate over learn-physics vector resultC learn-physicsnumber of intervals learn-physicsscalar or vector field learn-physicscurve to integrate over learn-physicsscalar or vector resultE learn-physicsgo first along this curve learn-physicsthen along this curve learn-physicsto produce this new curveH learn-physics the curve learn-physics the parameter learn-physics4position of the point on the curve at that parameterI learn-physicsamount to shift learn-physicsoriginal curve learn-physics shifted curveJ learn-physicsstarting position learn-physicsending position learn-physicsstraight-line curve˜ learn-physicsvector field low learn-physicsvector field mid learn-physicsvector field high learn-physics dl low to mid learn-physicsdl mid to high learn-physicsquadratic approximationK learn-physicsNnumber of half-intervals (one less than the number of function evaluations) learn-physics vector field learn-physicscurve to integrate over learn-physics scalar result™ learn-physicsvector field low learn-physicsvector field mid learn-physicsvector field high learn-physics dl low to mid learn-physicsdl mid to high learn-physicsquadratic approximationL learn-physicsNnumber of half-intervals (one less than the number of function evaluations) learn-physics vector field learn-physicscurve to integrate over learn-physics vector result:;<=>?@ABCDEFGHIJKL:;<=>DEFGHIJC?@ABKL(c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafeą3M learn-physics}Specification of a coordinate system requires a map from coordinates into space, and a map from space into coordinates.O learn-physics!a map from coordinates into spaceP learn-physics!a map from space into coordinatesQ learn-physics(The standard Cartesian coordinate systemR learn-physics*The standard cylindrical coordinate systemS learn-physics(The standard spherical coordinate systemT learn-physicsÐDefine a new coordinate system in terms of an existing one. First parameter is a map from old coordinates to new coordinates. Second parameter is the inverse map from new coordinates to old coordinates.T learn-physics(x',y',z') = f(x,y,z) learn-physics(x,y,z) = g(x',y',z') learn-physicsold coordinate systemMNOPQRSTMNOPQRST(c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafeūCU learn-physics)The x Cartesian coordinate of a position.V learn-physics)The y Cartesian coordinate of a position.W learn-physics:The z Cartesian (or cylindrical) coordinate of a position.X learn-physicsdThe s cylindrical coordinate of a position. This is the distance of the position from the z axis.Y learn-physicsĢThe phi cylindrical (or spherical) coordinate of a position. This is the angle from the positive x axis to the projection of the position onto the xy plane.Z learn-physicsbThe r spherical coordinate of a position. This is the distance of the position from the origin.[ learn-physicslThe theta spherical coordinate of a position. This is the angle from the positive z axis to the position.UVWXYZ[UVWXYZ[(c) Scott N. Walck 2016-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental TrustworthyR)^ learn-physics The state resulting from a measurement of spin angular momentum in the x direction on a spin-1/2 particle when the result of the measurement is hbar/2._ learn-physicsĄThe state resulting from a measurement of spin angular momentum in the x direction on a spin-1/2 particle when the result of the measurement is -hbar/2.` learn-physics The state resulting from a measurement of spin angular momentum in the y direction on a spin-1/2 particle when the result of the measurement is hbar/2.a learn-physicsĄThe state resulting from a measurement of spin angular momentum in the y direction on a spin-1/2 particle when the result of the measurement is -hbar/2.b learn-physics The state resulting from a measurement of spin angular momentum in the z direction on a spin-1/2 particle when the result of the measurement is hbar/2.c learn-physicsĄThe state resulting from a measurement of spin angular momentum in the z direction on a spin-1/2 particle when the result of the measurement is -hbar/2.d learn-physicsðThe state resulting from a measurement of spin angular momentum in the direction specified by spherical angles theta (polar angle) and phi (azimuthal angle) on a spin-1/2 particle when the result of the measurement is hbar/2.e learn-physicsņThe state resulting from a measurement of spin angular momentum in the direction specified by spherical angles theta (polar angle) and phi (azimuthal angle) on a spin-1/2 particle when the result of the measurement is -hbar/2.f learn-physicsDimension of a vector.g learn-physics+Scale a complex vector by a complex number.h learn-physics5Complex inner product. First vector gets conjugated.i learn-physicsLength of a complex vector.j learn-physics4Return a normalized version of a given state vector.k learn-physics:Return a vector of probabilities for a given state vector.l learn-physics"Conjugate the entries of a vector.m learn-physics2Construct a vector from a list of complex numbers.n learn-physics0Produce a list of complex numbers from a vector.o learn-physicsThe Pauli X matrix.p learn-physicsThe Pauli Y matrix.q learn-physicsThe Pauli Z matrix.r learn-physics+Scale a complex matrix by a complex number.s learn-physicsMatrix product.t learn-physicsMatrix-vector product.u learn-physicsVector-matrix productv learn-physics Conjugate transpose of a matrix.w learn-physics;Construct a matrix from a list of lists of complex numbers.x learn-physics9Produce a list of lists of complex numbers from a matrix.y learn-physicsSize of a matrix.z learn-physicsApply a function to a matrix. Assumes the matrix is a normal matrix (a matrix with an orthonormal basis of eigenvectors).{ learn-physicsComplex outer product| learn-physics6Build a pure-state density matrix from a state vector.} learn-physicsTrace of a matrix.~ learn-physics4Normalize a density matrix so that it has trace one. learn-physics"The one-qubit totally mixed state.€ learn-physicsĪGiven a time step and a Hamiltonian matrix, produce a unitary time evolution matrix. Unless you really need the time evolution matrix, it is better to use z, which gives the same numerical results without doing an explicit matrix inversion. The function assumes hbar = 1. learn-physics“Given a time step and a Hamiltonian matrix, advance the state vector using the Schrodinger equation. This method should be faster than using €q since it solves a linear system rather than calculating an inverse matrix. The function assumes hbar = 1.‚ learn-physics‚Given a Hamiltonian matrix, return a function from time to evolution matrix. Uses spectral decomposition. Assumes hbar = 1.ƒ learn-physics|The possible outcomes of a measurement of an observable. These are the eigenvalues of the matrix of the observable.„ learn-physicsfGiven an obervable, return a list of pairs of possible outcomes and projectors for each outcome.… learn-physics|Given an observable and a state vector, return a list of pairs of possible outcomes and probabilites for each outcome.† learn-physicscForm an orthonormal list of complex vectors from a linearly independent list of complex vectors.k learn-physics state vector learn-physicsvector of probabilities.\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†.^_`abcdefghijk†lmnopqrstuvwxyz{|}~€‚\]ƒ„… (c) Scott N. Walck 2016-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe;=>?A;öŽ learn-physicsAn orthonormal basis of kets.’ learn-physicsGThe adjoint operation on complex numbers, kets, bras, and operators.” learn-physicsĢGeneric multiplication including inner product, outer product, operator product, and whatever else makes sense. No conjugation takes place in this operation.– learn-physics5A bra vector describes the state of a quantum system.— learn-physics`An operator describes an observable (a Hermitian operator) or an action (a unitary operator).˜ learn-physics5A ket vector describes the state of a quantum system.› learn-physicsCMake an orthonormal basis from a list of linearly independent kets.ž learn-physicsfState of a spin-1/2 particle if measurement in the x-direction would give angular momentum +hbar/2.Ÿ learn-physicsfState of a spin-1/2 particle if measurement in the x-direction would give angular momentum -hbar/2.  learn-physicsfState of a spin-1/2 particle if measurement in the y-direction would give angular momentum +hbar/2.Ą learn-physicsfState of a spin-1/2 particle if measurement in the y-direction would give angular momentum -hbar/2.Ē learn-physicsfState of a spin-1/2 particle if measurement in the z-direction would give angular momentum +hbar/2.Ģ learn-physicsfState of a spin-1/2 particle if measurement in the z-direction would give angular momentum -hbar/2.Ī learn-physicsŽState of a spin-1/2 particle if measurement in the n-direction, described by spherical polar angle theta and azimuthal angle phi, would give angular momentum +hbar/2.Ĩ learn-physicsŽState of a spin-1/2 particle if measurement in the n-direction, described by spherical polar angle theta and azimuthal angle phi, would give angular momentum -hbar/2.Ķ learn-physics"The orthonormal basis composed of ž and Ÿ.§ learn-physics"The orthonormal basis composed of   and Ą.Ļ learn-physics"The orthonormal basis composed of Ē and Ģ.Đ learn-physics`Given spherical polar angle theta and azimuthal angle phi, the orthonormal basis composed of Ī theta phi and Ĩ theta phi.Š learn-physicsThe Pauli X operator.Ŧ learn-physicsThe Pauli Y operator.Ž learn-physicsThe Pauli Z operator.­ learn-physicsZPauli operator for an arbitrary direction given by spherical coordinates theta and phi.Ū learn-physicsGAlternative definition of Pauli operator for an arbitrary direction.Ŋ learn-physicsŠGiven a time step and a Hamiltonian operator, produce a unitary time evolution operator. Unless you really need the time evolution operator, it is better to use °z, which gives the same numerical results without doing an explicit matrix inversion. The function assumes hbar = 1.° learn-physics’Given a time step and a Hamiltonian operator, advance the state ket using the Schrodinger equation. This method should be faster than using Ŋq since it solves a linear system rather than calculating an inverse matrix. The function assumes hbar = 1.ą learn-physics~The possible outcomes of a measurement of an observable. These are the eigenvalues of the operator of the observable.ē learn-physicsfGiven an obervable, return a list of pairs of possible outcomes and projectors for each outcome.ģ learn-physicsyGiven an observable and a state ket, return a list of pairs of possible outcomes and probabilites for each outcome.š learn-physicsMForm an orthonormal list of kets from a list of linearly independent kets.,‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģ,š™˜–—žŸ ĄĒĢĪĨŠŦŽ­ŪŊ°‰Šąē씕’“‘‹ŒŽ›œĶ§ĻĐ•7 (c) Scott N. Walck 2016-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthy_RÔ learn-physics/A beam of randomly oriented spin-1/2 particles.Õ learn-physics+Return the intensities of a stack of beams.Ö learn-physics+Remove the most recent beam from the stack.Ũ learn-physics Return the number of beams in a Ó.Ø learn-physics3Interchange the two most recent beams on the stack.Ų learn-physicsâGiven angles describing the orientation of the splitter, removes an incoming beam from the stack and replaces it with two beams, a spin-up and a spin-down beam. The spin-down beam is the most recent beam on the stack.Ú learn-physicssGiven angles describing the orientation of the recombiner, returns a single beam from an incoming pair of beams.Û learn-physicsČGiven angles describing the direction of a uniform magnetic field, and given an angle describing the product of the Larmor frequency and the time, return an output beam from an input beam.Ü learn-physics,A Stern-Gerlach splitter in the x direction.Ý learn-physics,A Stern-Gerlach splitter in the y direction.Þ learn-physics,A Stern-Gerlach splitter in the z direction.ß learn-physicsĐGiven an angle in radians describing the product of the Larmor frequency and the time, apply a magnetic in the x direction to the most recent beam on the stack.ā learn-physicsĐGiven an angle in radians describing the product of the Larmor frequency and the time, apply a magnetic in the y direction to the most recent beam on the stack.á learn-physicsĐGiven an angle in radians describing the product of the Larmor frequency and the time, apply a magnetic in the z direction to the most recent beam on the stack.â learn-physics.A Stern-Gerlach recombiner in the x direction.ã learn-physics.A Stern-Gerlach recombiner in the y direction.ä learn-physics.A Stern-Gerlach recombiner in the z direction.å learn-physics0Filter for spin-up particles in the x direction.æ learn-physics2Filter for spin-down particles in the x direction.į learn-physics0Filter for spin-up particles in the z direction.č learn-physics2Filter for spin-down particles in the z direction.ÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčÓÔŲÚÛÖØŨÕÜÝÞßāáâãäåæįč (c) Scott N. Walck 2012-2017BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafevsę learn-physics•Given an initial bracketing of a root (an interval (a,b) for which f(a) f(b) <= 0), produce a bracket (c,d) for which |c-d| < desired accuracy.ë learn-physics4Given a bracketed root, return a half-width bracket.ė learn-physicsmFind a single root in a bracketed region. The algorithm continues until it exhausts the precision of a ›). This could cause the function to hang.í learn-physicsÚFind a list of roots for a function over a given range. First parameter is the initial number of intervals to use to find the roots. If roots are closely spaced, this number of intervals may need to be large.î learn-physicsyFind a list of roots for a function over a given range. There are no guarantees that all roots will be found. Uses í with 1000 intervals.ę learn-physicsdesired accuracy learn-physicsfunction learn-physicsinitial bracket learn-physics final bracketë learn-physicsfunction learn-physicsoriginal bracket learn-physics new bracketė learn-physicsfunction learn-physicsinitial bracket learn-physicsapproximate rootí learn-physics"initial number of intervals to use learn-physicsfunction learn-physicsrange over which to search learn-physics list of rootsî learn-physicsfunction learn-physicsrange over which to search learn-physics list of rootsęëėíîîíėęë (c) Scott N. Walck 2015-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental TrustworthyŸnï learn-physics;Free potential. The potential energy is zero everywhere.ð learn-physicsGHarmonic potential. This is the potential energy of a linear spring.ņ learn-physicsĄA double well potential. Potential energy is a quartic function of position that gives two wells, each approximately harmonic at the bottom of the well.ō learn-physicsˆFinite square well potential. Potential is zero inside the well, and constant outside the well. Well is centered at the origin.ó learn-physicsAA step barrier potential. Potential is zero to left of origin.ô learn-physics.A potential barrier with thickness and height.ø learn-physics-Transform a wavefunction into a state vector.û learn-physicsProduce a gloss œ( of state vector for 1D wavefunction.ï learn-physicsposition learn-physicspotential energyð learn-physicsspring constant learn-physicsposition learn-physicspotential energyņ learn-physics*width (for both wells and well separation) learn-physics&energy height of barrier between wells learn-physicsposition learn-physicspotential energyō learn-physics well width learn-physicsenergy height of well learn-physicsposition learn-physicspotential energyó learn-physics1energy height of barrier (to the right of origin) learn-physicsposition learn-physicspotential energyô learn-physicsthickness of wall learn-physicsenergy height of barrier learn-physicsposition of center of barrier learn-physicsposition learn-physicspotential energyõ learn-physics#length scale = sqrt(hbar / m omega) learn-physics parameter z learn-physics wavefunctionö learn-physicswidth parameter learn-physicscenter of wave packet learn-physics wavefunctionũ learn-physicswidth parameter learn-physicscenter of wave packet learn-physicsl0 = hbar / p0 learn-physics wavefunctionø learn-physicslowest x learn-physics highest x learn-physicsdimension of state vector learn-physics wavefunction learn-physics state vectorų learn-physicslowest x learn-physics highest x learn-physicsdimension of state vector learn-physicshbar learn-physicsmass learn-physicspotential energy function learn-physicsHamiltonian Matrixú learn-physics state vector learn-physicsvector of x values learn-physics X, expectation value of X learn-physics(screenWidth,screenHeight) learn-physics (xmin,xmax) learn-physics (ymin,ymax) learn-physics(x,y)û learn-physicsy range learn-physicsxs learn-physics state vectorïðņōóôõöũøųúûüýïðōņóôõöũøųúûýü (c) Scott N. Walck 2012-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafeа ĸ learn-physicsThe zero vector. learn-physics!The additive inverse of a vector. learn-physicsSum of a list of vectors. learn-physicsVector addition. learn-physicsVector subtraction. learn-physicsYScalar multiplication, where the scalar is on the left and the vector is on the right. learn-physicsYScalar multiplication, where the scalar is on the right and the vector is on the left. learn-physics!Division of a vector by a scalar. learn-physicsDot product of two vectors. learn-physicsMagnitude of a vector. þĸ þĸ667777(c) Scott N. Walck 2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthy;<=FTĘß   learn-physics–An evolution method is a way of approximating the state after advancing a finite interval in the independent variable (time) from a given state.  learn-physicsŪA (numerical) solution method is a way of converting an initial value problem into a list of states (a solution). The list of states need not be equally spaced in time.  learn-physicsPAn initial value problem is a differential equation along with an initial state.  learn-physicsĸ;A differential equation expresses how the dependent variables (state) change with the independent variable (time). A differential equation is specified by giving the (time) derivative of the state as a function of the state. The (time) derivative of a state is an element of the associated vector space.  learn-physicsOThe scalars of the associated vector space can be thought of as time intervals. learn-physicsAn instance of Q is a data type that can serve as the state of some system. Alternatively, a M is a collection of dependent variables for a differential equation. A ‹ has an associated vector space for the (time) derivatives of the state. The associated vector space is a linearized version of the . learn-physicsAssociated vector space learn-physicsSubtract points learn-physicsPoint plus vector learn-physicsPoint minus vector learn-physicsÚGiven an evolution method and a time step, return the solution method which applies the evolution method repeatedly with with given time step. The solution method returned will produce an infinite list of states. learn-physicstThe Euler method is the simplest evolution method. It increments the state by the derivative times the time step. learn-physicsPPosition is not a vector, but displacement (difference in position) is a vector.  learn-physicsdifferential equation learn-physics time interval learn-physics initial state learn-physics evolved state            666(c) Scott N. Walck 2012-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthy<ώ learn-physics(Take a single 4th-order Runge-Kutta step learn-physicsOSolve a first-order system of differential equations with 4th-order Runge-Kutta(c) Scott N. Walck 2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental TrustworthyFTí learn-physicsyAn acceleration function gives a list of accelerations (one for each particle) as a function of the system's state.  learn-physicsjThe state of a system of many particles is given by the current time and a list of one-particle states.! learn-physicsŠAn acceleration function gives a pair of accelerations (one for particle 1, one for particle 2) as a function of the system's state." learn-physics The state of a system of two particles is given by the current time, the position and velocity of particle 1, and the position and velocity of particle 2.# learn-physicsdAn acceleration function gives the particle's acceleration as a function of the particle's state.$ learn-physicsÛThe state of a system of one particle is given by the current time, the position of the particle, and the velocity of the particle. Including time in the state like this allows us to have time-dependent forces.% learn-physicsBThe associated vector space for the state of a single particle.' learn-physicslThe state of a single particle is given by the position of the particle and the velocity of the particle.+ learn-physicsĸ|An acceleration function gives the particle's acceleration as a function of the particle's state. The specification of this function is what makes one single-particle mechanics problem different from another. In order to write this function, add all of the forces that act on the particle, and divide this net force by the particle's mass. (Newton's second law)., learn-physicsVA simple one-particle state, to get started quickly with mechanics of one particle.- learn-physics Velocity of a particle (in m/s).. learn-physicsA time step (in s)./ learn-physics Time (in s).0 learn-physicsGTime derivative of state for a single particle with a constant mass.1 learn-physicsSingle Runge-Kutta step2 learn-physicsGTime derivative of state for a single particle with a constant mass.3 learn-physicsSingle Runge-Kutta step4 learn-physicsList of system states5 learn-physicsATime derivative of state for two particles with constant mass.6 learn-physics/Single Runge-Kutta step for two-particle system7 learn-physicsBTime derivative of state for many particles with constant mass.8 learn-physics0Single Runge-Kutta step for many-particle system 0 learn-physics&acceleration function for the particle learn-physicsdifferential equation1 learn-physics&acceleration function for the particle learn-physics time step learn-physics initial state learn-physicsstate after one time step2 learn-physics&acceleration function for the particle learn-physicsdifferential equation3 learn-physics&acceleration function for the particle learn-physics time step learn-physics initial state learn-physicsstate after one time step4 learn-physics&acceleration function for the particle learn-physics time step learn-physics initial state learn-physicsstate after one time step5 learn-physics'acceleration function for two particles learn-physicsdifferential equation6 learn-physicsacceleration function learn-physics time step learn-physics initial state learn-physicsstate after one time step7 learn-physics(acceleration function for many particles learn-physicsdifferential equation8 learn-physicsacceleration function learn-physics time step learn-physics initial state learn-physicsstate after one time step !"#$%&'()*+,-./012345678/.-,+01'()*%&$#234"!56 78(c) Scott N. Walck 2012-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental TrustworthyFT> learn-physicsÝSurface is a parametrized function from two parameters to space, lower and upper limits on the first parameter, and lower and upper limits for the second parameter (expressed as functions of the first parameter).@ learn-physics-function from two parameters (s,t) into spaceA learn-physicss_lB learn-physicss_uC learn-physicst_l(s)D learn-physicst_u(s)E learn-physics&A unit sphere, centered at the origin.F learn-physics2A sphere with given radius centered at the origin.G learn-physics$Sphere with given radius and center.H learn-physics8The upper half of a unit sphere, centered at the origin.I learn-physics1A disk with given radius, centered at the origin.J learn-physics<A plane surface integral, in which area element is a scalar.K learn-physics=A dotted surface integral, in which area element is a vector.L learn-physics"Shift a surface by a displacement.J learn-physics*number of intervals for first parameter, s learn-physics+number of intervals for second parameter, t learn-physics'the scalar or vector field to integrate learn-physics#the surface over which to integrate learn-physicsthe resulting scalar or vectorK learn-physics*number of intervals for first parameter, s learn-physics+number of intervals for second parameter, t learn-physicsthe vector field to integrate learn-physics#the surface over which to integrate learn-physicsthe resulting scalar>?@ABCDEFGHIJKL>?@ABCDEFGHILJKNone'xM learn-physicsassumes radians coming inN learn-physics6theta=0 is positive x axis, output angle in radiansO learn-physicsAn arrowž learn-physics9Rotate takes its angle in degrees, and rotates clockwise.P learn-physics A think arrowO learn-physicslocation of base of arrow learn-physicsdisplacement vectorž learn-physicsdisplacement vectorP learn-physicsarrow thickness learn-physicslocation of base of arrow learn-physicsdisplacement vectorMNOPMNOP(c) Scott N. Walck 2011-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalSafe.äQ learn-physicsAn Ÿ( with a given label at a given position.R learn-physicsAn Ÿ! that requests postscript output.S learn-physicsAn Ÿ! giving the postscript file name.T learn-physicsAn example of the use of Q. See the source code.U learn-physicsAn example of the use of R and S. See the source code.V learn-physics*Plot a Curve in the xy plane using GnuplotQRSTUVQRSTUVNone7§W learn-physicsMake a   object from a  .X learn-physicsMake a   object from a #.Y learn-physicsDisplay a vector field.Z learn-physics$A displayable VisObject for a curve.[ learn-physics(Place a vector at a particular position.\ learn-physicsA VisObject arrow from a vectorY learn-physicscolor for the vector field learn-physics scale factor learn-physics#list of positions to show the field learn-physicsvector field to display learn-physicsthe displayable objectĄ learn-physics in radiansĒ learn-physics in radiansWXYZ[\WX\[YZ(c) Scott N. Walck 2012-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental TrustworthyFTQ7_ learn-physicsĸPVolume is a parametrized function from three parameters to space, lower and upper limits on the first parameter, lower and upper limits for the second parameter (expressed as functions of the first parameter), and lower and upper limits for the third parameter (expressed as functions of the first and second parameters).a learn-physics#function from 3 parameters to spaceb learn-physicss_ac learn-physicss_bd learn-physicst_a(s)e learn-physicst_b(s)f learn-physicsu_a(s,t)g learn-physicsu_b(s,t)h learn-physics$A unit ball, centered at the origin.i learn-physicsIA unit ball, centered at the origin. Specified in Cartesian coordinates.j learn-physics1A ball with given radius, centered at the origin.k learn-physics"Ball with given radius and center.l learn-physics1Upper half ball, unit radius, centered at origin.m learn-physics–Cylinder with given radius and height. Circular base of the cylinder is centered at the origin. Circular top of the cylinder lies in plane z = h.n learn-physicsA volume integralĢ learn-physics n+1 pointso learn-physics!Shift a volume by a displacement.k learn-physicsradius learn-physicscenter learn-physics!ball with given radius and centern learn-physics-number of intervals for first parameter (s) learn-physics-number of intervals for second parameter (t) learn-physics-number of intervals for third parameter (u) learn-physicsscalar or vector field learn-physics the volume learn-physicsscalar or vector result_`abcdefghijklmno_`abcdefghijklmon(c) Scott N. Walck 2012-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthyo„ p learn-physicsA current distribution is a line current (current through a wire), a surface current, a volume current, or a combination of these. The  D describes a surface current density or a volume current density.q learn-physicscurrent through a wirer learn-physics ! is surface current density (A/m)s learn-physics " is volume current density (A/m^2)t learn-physics$combination of current distributionsu learn-physics)Electric current, in units of Amperes (A)v learn-physicsTMagnetic field produced by a line current (current through a wire). The function yR calls this function to evaluate the magnetic field produced by a line current.w learn-physics>Magnetic field produced by a surface current. The function yā calls this function to evaluate the magnetic field produced by a surface current. This function assumes that surface current density will be specified parallel to the surface, and does not check if that is true.x learn-physics=Magnetic field produced by a volume current. The function yT calls this function to evaluate the magnetic field produced by a volume current.y learn-physicsČThe magnetic field produced by a current distribution. This is the simplest way to find the magnetic field, because it works for any current distribution (line, surface, volume, or combination).z learn-physicsGThe magnetic flux through a surface produced by a current distribution.v learn-physicscurrent (in Amps) learn-physicsgeometry of the line current learn-physicsmagnetic field (in Tesla)w learn-physicssurface current density learn-physicsgeometry of the surface current learn-physicsmagnetic field (in T)x learn-physicsvolume current density learn-physicsgeometry of the volume current learn-physicsmagnetic field (in T) pqrstuvwxyz upqrstyvwxz(c) Scott N. Walck 2011-2014BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthyž { learn-physics€A charge distribution is a point charge, a line charge, a surface charge, a volume charge, or a combination of these. The !\ describes a linear charge density, a surface charge density, or a volume charge density.| learn-physics point charge} learn-physics! is linear charge density (C/m)~ learn-physics!" is surface charge density (C/m^2) learn-physics!! is volume charge density (C/m^3)€ learn-physics#combination of charge distributions learn-physics)Electric charge, in units of Coulombs (C)‚ learn-physics-Total charge (in C) of a charge distribution.ƒ learn-physics;Electric field produced by a point charge. The function ‡R calls this function to evaluate the electric field produced by a point charge.„ learn-physics:Electric field produced by a line charge. The function ‡Q calls this function to evaluate the electric field produced by a line charge.… learn-physics=Electric field produced by a surface charge. The function ‡T calls this function to evaluate the electric field produced by a surface charge.† learn-physics<Electric field produced by a volume charge. The function ‡S calls this function to evaluate the electric field produced by a volume charge.‡ learn-physicsÍThe electric field produced by a charge distribution. This is the simplest way to find the electric field, because it works for any charge distribution (point, line, surface, volume, or combination).ˆ learn-physicsFThe electric flux through a surface produced by a charge distribution.‰ learn-physicsaElectric potential from electric field, given a position to be the zero of electric potential.Š learn-physicsƒElectric potential produced by a charge distribution. The position where the electric potential is zero is taken to be infinity. ƒ learn-physicscharge (in Coulombs) learn-physicsof point charge learn-physicselectric field (in V/m)„ learn-physicslinear charge density lambda learn-physicsgeometry of the line charge learn-physicselectric field (in V/m)… learn-physicssurface charge density sigma learn-physicsgeometry of the surface charge learn-physicselectric field (in V/m)† learn-physicsvolume charge density rho learn-physicsgeometry of the volume charge learn-physicselectric field (in V/m)‰ learn-physics)position where electric potential is zero learn-physicselectric field learn-physicselectric potentialĪ learn-physicscharge (in Coulombs) learn-physicsof point charge learn-physicselectric potentialĨ learn-physicslinear charge density lambda learn-physicsgeometry of the line charge learn-physicselectric potentialĶ learn-physicssurface charge density sigma learn-physicsgeometry of the surface charge learn-physicselectric potential§ learn-physicsvolume charge density rho learn-physicsgeometry of the volume charge learn-physicselectric potential{|}~€‚ƒ„…†‡ˆ‰Š{|}~€‚‡ƒ„…†ˆ‰Š(c) Scott N. Walck 2014-2018BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimental Trustworthy ÖĶ  !"#$%&'()*+,-./012345678:;<=>?@CDEFGHIJ      !"#$%&'()*+,-./012345678>?@ABCDEFGHIJKLMNOPQRSWXYZ[\_`abcdefghijklmnopqrstuyz{|}~€‚‡ˆ‰ŠĶ/.-,+01'()*%&$#234"!56 78{|}~€‚upqrst‡ˆ‰Šyz   #"! %&'()*+,-./01$2345678:;<=>DEFGHIJC?@>?@ABCDEFGHILJK_`abcdefghijklmon     QRSMNOPWX\[YZ(c) Scott N. Walck 2016BSD3 (see LICENSE)Scott N. Walck <walck@lvc.edu> experimentalNonežV ‹ learn-physics A Vis object.Œ learn-physicsQConvert a 2x1 complex state vector for a qubit into Bloch (x,y,z) coordinates. learn-physics6Convert a qubit ket into Bloch (x,y,z) coordinates.Ž learn-physics A static ‹ for the state of a qubit. learn-physics<Display a qubit state vector as a point on the Bloch Sphere. learn-physics8Given a Bloch vector as a function of time, return a ‹ as a function of time.‘ learn-physicsqGiven a sample rate, initial qubit state vector, and state propagation function, produce a simulation. The ĻX in the state propagation function is the time since the beginning of the simulation.’ learn-physicsnGiven a sample rate, initial qubit state ket, and state propagation function, produce a simulation. The ĻX in the state propagation function is the time since the beginning of the simulation.“ learn-physicsGProduce a state propagation function from a time-dependent Hamiltonian.” learn-physicsGProduce a state propagation function from a time-dependent Hamiltonian.• learn-physicsZGiven an initial qubit state and a time-dependent Hamiltonian, produce a visualization.– learn-physicsXGiven an initial qubit ket and a time-dependent Hamiltonian, produce a visualization.— learn-physicsMHamiltonian for nuclear magnetic resonance. Explain omega0, omegaR, omega. ‹ŒŽ‘’“”•–— ‹ŒŽ‘’“”•–—Đ !"#$"#%"#&"#'"#(")*")+"),")-").//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_`abcdefghijkl??mnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ § { Ļ Đ „ Š Ŧ ‡ ˆ Ž ­ Ū ‘ Ŋ ° ą $ ē ģ — ī | } ~  €  ‚ ƒ ĩ ķ · ļ  Ž  đ š ŧ Ÿ Ą Ē Ģ ž ― ū ŋ Ā Á Â Ã Ä Å Æ Į Č É Ę Ë Ė Í Î Ï Ð Ņ Ō Ó Ô Õ Ö Ũ Ø Ų Ú Û Ü Ý Þ ß ā á â ã ä å æ į č é ę ë ė í î ï ð ņ ō ó ô õ ö ũ ø ų ú û ü ý þ ĸ        . , * - + ' % & ( $      !"##$$%&'()*+,-./0123456789::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“ Ī”•–—˜™ š›œžŸ ĄĒĢĪĨͧϔ•ĐŠ)learn-physics-0.6.3-QVBb4KlSXRLjJwvIzqmhaPhysics.Learn.QuantumMatPhysics.Learn.CarrotVecPhysics.Learn.CommonVec!Physics.Learn.CompositeQuadraturePhysics.Learn.PositionPhysics.Learn.CurvePhysics.Learn.CoordinateSystemPhysics.Learn.CoordinateFieldsPhysics.Learn.KetPhysics.Learn.BeamStackPhysics.Learn.RootFindingPhysics.Learn.Schrodinger1DPhysics.Learn.SimpleVecPhysics.Learn.StateSpacePhysics.Learn.RungeKuttaPhysics.Learn.MechanicsPhysics.Learn.SurfacePhysics.Learn.Visual.GlossToolsPhysics.Learn.Visual.PlotToolsPhysics.Learn.Visual.VisToolsPhysics.Learn.VolumePhysics.Learn.CurrentPhysics.Learn.ChargePhysics.Learn.BlochSphere Physics.Learn'hmatrix-0.19.0.0-7QiYd2ii0uQ9UkfuO4R78uInternal.MatrixMatrixInternal.VectorC&vector-0.12.0.1-GC2xzdMF0QQGz7ZCcRBJRLData.Vector.StorableVector(vector-space-0.14-BeT3wiALwxdKU9jykQ90xDData.VectorSpace magnitude^*^/*^<.>Data.AdditiveGroupsumV^-^negateV^+^zeroVVecxCompyCompzCompvec><iHatjHatkHat $fShowVec$fEqVec$fInnerSpaceVec$fVectorSpaceVec$fAdditiveGroupVeccompositeTrapezoidcompositeSimpsonCoordinateSystemField VectorField ScalarField DisplacementPosition addFields cartesian cylindrical sphericalcartcylsphcartesianCoordinatescylindricalCoordinatessphericalCoordinates displacement shiftPosition shiftObject shiftFieldrHatthetaHatphiHatsHatxHatyHatzHat$fShowPositionCurve curveFuncstartingCurveParamendingCurveParamdottedLineIntegralcrossedLineIntegral$compositeTrapezoidDottedLineIntegral%compositeTrapezoidCrossedLineIntegralsimpleLineIntegralnormalizeCurve concatCurvesconcatenateCurves reverseCurve evalCurve shiftCurve straightLine"compositeSimpsonDottedLineIntegral#compositeSimpsonCrossedLineIntegral toPosition fromPositionstandardCartesianstandardCylindricalstandardSphericalnewCoordinateSystemxyzsphirtheta KroneckerkronxpxmypymzpzmnpnmdimscaleVinnernorm normalize probVectorconjVfromListtoListsxsyszscaleM<>#><#conjugateTranspose fromListstoListssizematrixFunctioncouterdmtrace normalizeDM oneQubitMixed timeEvMattimeEv timeEvMatSpecpossibleOutcomesoutcomesProjectorsoutcomesProbabilities gramSchmidt$fKroneckerMatrix$fKroneckerVectorKron RepresentablerepOrthonormalBasisHasNormDaggerdaggerMultBraOperatorKetimakeOB listBasisxBasisyBasiszBasisnBasissnsn'timeEvOp$fNumKet $fNumOperator$fNumBra $fShowBra$fMultOperatorOperatorOperator$fMultKetBraOperator$fMultOperatorKetKet$fMultBraOperatorBra$fMultBraKetComplex$fMultOperatorComplexOperator$fMultBraComplexBra$fMultKetComplexKet$fMultComplexOperatorOperator$fMultComplexBraBra$fMultComplexKetKet$fMultComplexComplexComplex$fDaggerComplexComplex$fDaggerOperatorOperator$fDaggerBraKet$fDaggerKetBra $fHasNormBra $fHasNormKet$fRepresentableOperatorMatrix$fRepresentableBraVector$fRepresentableKetVector$fShowOperator $fShowKet$fKronOperator $fKronBra $fKronKet$fShowOrthonormalBasis BeamStack randomBeamdetectdropBeamnumBeams flipBeamssplit recombine applyBFieldsplitXsplitYsplitZ applyBFieldX applyBFieldY applyBFieldZ recombineX recombineY recombineZxpFilterxmFilterzpFilterzmFilter$fShowBeamStack bracketRootbracketRootStepfindRoot findRootsN findRootsfreeV harmonicV doubleWell squareWellstepVwallcoherentgaussianmovingGaussianstateVectorFromWavefunctionhamiltonianMatrixexpectXpicturelistFormxRangeREvolutionMethodSolutionMethodInitialValueProblemDifferentialEquationTime StateSpaceDiff.-..+^.-^ stepSolution eulerMethod$fVectorSpace[]$fAdditiveGroup[]$fStateSpace[]$fStateSpacePosition$fStateSpaceVec$fStateSpaceDouble$fStateSpace(,,)$fStateSpace(,) rungeKutta4integrateSystem ManyParticleAccelerationFunctionManyParticleSystemStateTwoParticleAccelerationFunctionTwoParticleSystemStateOneParticleAccelerationFunctionOneParticleSystemStateDStStpositionvelocitySimpleAccelerationFunction SimpleStateVelocityTimeStepTheTimesimpleStateDerivsimpleRungeKuttaSteponeParticleStateDerivoneParticleRungeKuttaSteponeParticleRungeKuttaSolutiontwoParticleStateDerivtwoParticleRungeKuttaStepmanyParticleStateDerivmanyParticleRungeKuttaStep$fStateSpaceSt$fVectorSpaceDSt$fAdditiveGroupDSt$fShowSt $fShowDStSurface surfaceFunc lowerLimit upperLimit lowerCurve upperCurve unitSpherecenteredSpherespherenorthernHemispheredisksurfaceIntegraldottedSurfaceIntegral shiftSurface polarToCart cartToPolararrow thickArrowlabel postscriptpsFile examplePlot1 examplePlot2 plotXYCurve v3FromVec v3FromPosdisplayVectorField curveObject oneVectorvisVec $fShowCart $fShowSphVolume volumeFuncloLimitupLimitloCurveupCurveloSurfupSurfunitBallunitBallCartesian centeredBallballnorthernHalfBallcenteredCylindervolumeIntegral shiftVolumeCurrentDistribution LineCurrentSurfaceCurrent VolumeCurrentMultipleCurrentsCurrentbFieldFromLineCurrentbFieldFromSurfaceCurrentbFieldFromVolumeCurrentbField magneticFluxChargeDistribution PointCharge LineCharge SurfaceCharge VolumeChargeMultipleChargesCharge totalChargeeFieldFromPointChargeeFieldFromLineChargeeFieldFromSurfaceChargeeFieldFromVolumeChargeeField electricFluxelectricPotentialFromFieldelectricPotentialFromChargeVisObjtoPosketToPosstaticBlochSpheredisplayStaticStateanimatedBlochSpheresimulateBlochSpheresimulateBlochSphereK stateProp statePropKevolutionBlochSphereevolutionBlochSphereKhamRabi dottedSimp crossedSimpghc-prim GHC.TypesDouble/gloss-rendering-1.13.0.2-CykkBg4uXhOFdwvrMxdvhl%Graphics.Gloss.Internals.Data.PicturePictureglossScalePoint originArrow&gnuplot-0.5.5.3-LuigrOdDVGj1TLAIsAn5joGraphics.Gnuplot.Simple Attribute$linear-1.20.8-Cuqr9cUt7baCx5O7ryjwgq Linear.V3V3rotYrotZ linSpacedePotFromPointChargeePotFromLineChargeePotFromSurfaceChargeePotFromVolumeChargeFloat